Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdf8a58818 | ||
|
|
e1d51c881a | ||
|
|
28212808f8 | ||
|
|
74f08f8f98 | ||
|
|
cb5c29fbce | ||
|
|
4d775d3a17 | ||
|
|
fd94ef9fa7 | ||
|
|
2e0331305a | ||
|
|
fb560f8f01 | ||
|
|
ef80c9f7fd | ||
|
|
99a4a0a22f | ||
|
|
136853853a | ||
|
|
ebf3299c30 | ||
|
|
036b49a871 | ||
|
|
67d5f88d34 | ||
|
|
b1e0b9af33 | ||
|
|
c30b012787 | ||
|
|
c8c6305757 | ||
|
|
ee1d090e62 | ||
|
|
9e56a86492 | ||
|
|
e6b83877f1 | ||
|
|
b567e39aef | ||
|
|
ae62dba0a6 | ||
|
|
df1e8abf50 | ||
|
|
31cfb26c3b | ||
|
|
e5f34dc464 | ||
|
|
601031e55d | ||
|
|
a9aadbe6a8 | ||
|
|
f9a4b71037 | ||
|
|
0f10e9dc1f | ||
|
|
0647deb06c | ||
|
|
daf4e5aca2 |
No files matched your search
@@ -18,7 +18,17 @@ The minimum supported Android version is 5.0 Lollipop. There are two ways to ins
|
||||
The app can be launched by opening **LBRY** from the device's app drawer or via the shortcut on the home screen if that was created upon installation.
|
||||
|
||||
## Running from Source
|
||||
Clone the repository and open the project in Android Studio. Android Studio will automatically run the initial build process. Click the Run button to launch the app on your simulator or connected debugging device after the build process is complete.
|
||||
Clone the repository and open the project in Android Studio. Android Studio will automatically run the initial build process.
|
||||
|
||||
Create file 'twitter.properties' in app/ folder with the following content:
|
||||
|
||||
```
|
||||
twitterConsumerKey=XXXXXX
|
||||
|
||||
twitterConsumerSecret=XXXXXX
|
||||
```
|
||||
|
||||
Click the Sync button and when process finishes, the Run button to launch the app on your simulator or connected debugging device after the build process is complete.
|
||||
|
||||
## Contributing
|
||||
Contributions to this project are welcome, encouraged, and compensated. For more details, see https://lbry.io/faq/contributing
|
||||
|
||||
+12
-9
@@ -16,8 +16,8 @@ android {
|
||||
applicationId "io.lbry.browser"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 1610
|
||||
versionName "0.16.10"
|
||||
versionCode 1613
|
||||
versionName "0.16.13"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -104,11 +104,11 @@ dependencies {
|
||||
implementation 'com.android.billingclient:billing:3.0.2'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.12.2'
|
||||
|
||||
implementation 'com.google.android:flexbox:2.0.1'
|
||||
|
||||
@@ -119,6 +119,7 @@ dependencies {
|
||||
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.3.1.LTS'
|
||||
|
||||
implementation 'commons-codec:commons-codec:1.15'
|
||||
implementation 'org.bitcoinj:bitcoinj-tools:0.14.7'
|
||||
implementation 'org.java-websocket:Java-WebSocket:1.5.1'
|
||||
|
||||
@@ -127,11 +128,13 @@ dependencies {
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation 'androidx.test:rules:1.3.0'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
|
||||
__32bitImplementation 'io.lbry:lbrysdk32:0.86.1'
|
||||
__64bitImplementation 'io.lbry:lbrysdk64:0.86.1'
|
||||
__32bitImplementation 'io.lbry:lbrysdk32:0.87.0'
|
||||
__64bitImplementation 'io.lbry:lbrysdk64:0.87.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package io.lbry.browser.utils;
|
||||
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@SmallTest
|
||||
public class HelperTest {
|
||||
@Test
|
||||
public void SHA256() {
|
||||
assertEquals("de9edb2044d012f04553e49b04d54cbec8e8a46a40ad5a19bc5dcce1da00ecfd", Helper.SHA256(String.valueOf(12345678912345L)));
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -40,12 +40,14 @@ import android.view.KeyEvent;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Menu;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -106,6 +108,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import org.java_websocket.client.WebSocketClient;
|
||||
import org.java_websocket.handshake.ServerHandshake;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -136,6 +139,7 @@ import javax.net.ssl.SSLParameters;
|
||||
|
||||
import io.lbry.browser.adapter.NavigationMenuAdapter;
|
||||
import io.lbry.browser.adapter.NotificationListAdapter;
|
||||
import io.lbry.browser.adapter.StartupStageAdapter;
|
||||
import io.lbry.browser.adapter.UrlSuggestionListAdapter;
|
||||
import io.lbry.browser.data.DatabaseHelper;
|
||||
import io.lbry.browser.dialog.ContentScopeDialogFragment;
|
||||
@@ -155,6 +159,7 @@ import io.lbry.browser.listener.WalletBalanceListener;
|
||||
import io.lbry.browser.model.Claim;
|
||||
import io.lbry.browser.model.ClaimCacheKey;
|
||||
import io.lbry.browser.model.NavMenuItem;
|
||||
import io.lbry.browser.model.StartupStage;
|
||||
import io.lbry.browser.model.Tag;
|
||||
import io.lbry.browser.model.UrlSuggestion;
|
||||
import io.lbry.browser.model.WalletBalance;
|
||||
@@ -218,6 +223,8 @@ import lombok.Setter;
|
||||
import lombok.SneakyThrows;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
import static android.os.Build.VERSION_CODES.M;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements SdkStatusListener,
|
||||
SharedPreferences.OnSharedPreferenceChangeListener,
|
||||
ActionMode.Callback, SelectionModeListener {
|
||||
@@ -431,7 +438,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
initKeyStore();
|
||||
loadAuthToken();
|
||||
|
||||
if (!isDarkMode()) {
|
||||
if (Build.VERSION.SDK_INT >= M && !isDarkMode()) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
initSpecialRouteMap();
|
||||
@@ -1312,7 +1319,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
private void toggleUrlSuggestions(boolean visible) {
|
||||
View container = findViewById(R.id.url_suggestions_container);
|
||||
View closeIcon = findViewById(R.id.wunderbar_close);
|
||||
EditText wunderbar = findViewById(R.id.wunderbar);
|
||||
//EditText wunderbar = findViewById(R.id.wunderbar);
|
||||
//wunderbar.setPadding(0, 0, visible ? getScaledValue(36) : 0, 0);
|
||||
|
||||
container.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
@@ -1860,17 +1867,13 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
new DecimalFormat(Helper.LBC_CURRENCY_FORMAT_PATTERN).format(amountClaimed));
|
||||
}
|
||||
Snackbar.make(findViewById(R.id.content_main), message, Snackbar.LENGTH_LONG).show();
|
||||
if (sp != null) {
|
||||
sp.edit().putBoolean(PREFERENCE_KEY_INTERNAL_NEW_ANDROID_REWARD_CLAIMED, true).apply();
|
||||
}
|
||||
sp.edit().putBoolean(PREFERENCE_KEY_INTERNAL_NEW_ANDROID_REWARD_CLAIMED, true).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception error) {
|
||||
// pass. fail silently
|
||||
if (sp != null) {
|
||||
sp.edit().putBoolean(PREFERENCE_KEY_INTERNAL_NEW_ANDROID_REWARD_CLAIMED, true).apply();
|
||||
}
|
||||
sp.edit().putBoolean(PREFERENCE_KEY_INTERNAL_NEW_ANDROID_REWARD_CLAIMED, true).apply();
|
||||
}
|
||||
});
|
||||
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
@@ -1955,7 +1958,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
notificationListAdapter.setInSelectionMode(false);
|
||||
notificationListAdapter.notifyDataSetChanged();
|
||||
}
|
||||
if (isDarkMode()) {
|
||||
if (Build.VERSION.SDK_INT >= M && isDarkMode()) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
this.actionMode = null;
|
||||
@@ -2019,8 +2022,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
if (nowPlayingClaimUrl != null) {
|
||||
Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(nowPlayingClaimUrl));
|
||||
launchIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
PendingIntent intent = PendingIntent.getActivity(MainActivity.this, 0, launchIntent, 0);
|
||||
return intent;
|
||||
return PendingIntent.getActivity(MainActivity.this, 0, launchIntent, 0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -2233,8 +2235,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
@Override
|
||||
public void onSyncSetSuccess(String hash) {
|
||||
Lbryio.lastRemoteHash = hash;
|
||||
WalletSync walletSync = new WalletSync(hash, data);
|
||||
Lbryio.lastWalletSync = walletSync;
|
||||
Lbryio.lastWalletSync = new WalletSync(hash, data);
|
||||
|
||||
if (pendingSyncSetQueue.size() > 0) {
|
||||
fullSyncInProgress = true;
|
||||
@@ -2414,8 +2415,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
pendingFollowingReload = true;
|
||||
}
|
||||
private void handleOpenChannelUrl(Intent intent) {
|
||||
String url = intent.getStringExtra("url");
|
||||
pendingChannelUrl = url;
|
||||
pendingChannelUrl = intent.getStringExtra("url");
|
||||
}
|
||||
};
|
||||
registerReceiver(requestsReceiver, intentFilter);
|
||||
@@ -2575,7 +2575,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
public void onRequestPermissionsResult(int requestCode, @NotNull String[] permissions, @NotNull int[] grantResults) {
|
||||
switch (requestCode) {
|
||||
case REQUEST_STORAGE_PERMISSION:
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
@@ -2610,7 +2610,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_FILE_PICKER) {
|
||||
startingFilePickerActivity = false;
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
Uri fileUri = data.getData();
|
||||
String filePath = Helper.getRealPathFromURI_API19(this, fileUri);
|
||||
for (FilePickerListener listener : filePickerListeners) {
|
||||
@@ -2721,8 +2721,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
int backCount = getSupportFragmentManager().getBackStackEntryCount();
|
||||
if (backCount > 0) {
|
||||
try {
|
||||
Fragment fragment = getSupportFragmentManager().getFragments().get(backCount - 1);
|
||||
return fragment;
|
||||
return getSupportFragmentManager().getFragments().get(backCount - 1);
|
||||
} catch (IndexOutOfBoundsException ex) {
|
||||
return null;
|
||||
}
|
||||
@@ -2742,23 +2741,28 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
actionBar.show();
|
||||
}
|
||||
}
|
||||
private void renderStartupFailed(Map<Integer, Boolean> startupStages) {
|
||||
Map<Integer, Integer> startupStageIconIds = new HashMap<>();
|
||||
startupStageIconIds.put(STARTUP_STAGE_INSTALL_ID_LOADED, R.id.startup_stage_icon_install_id);
|
||||
startupStageIconIds.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, R.id.startup_stage_icon_known_tags);
|
||||
startupStageIconIds.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, R.id.startup_stage_icon_exchange_rate);
|
||||
startupStageIconIds.put(STARTUP_STAGE_USER_AUTHENTICATED, R.id.startup_stage_icon_user_authenticated);
|
||||
startupStageIconIds.put(STARTUP_STAGE_NEW_INSTALL_DONE, R.id.startup_stage_icon_install_new);
|
||||
startupStageIconIds.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, R.id.startup_stage_icon_subscriptions_loaded);
|
||||
startupStageIconIds.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, R.id.startup_stage_icon_subscriptions_resolved);
|
||||
private void renderStartupFailed(List<StartupStage> startupStages) {
|
||||
ListView listView = findViewById(R.id.startup_stage_error_listview);
|
||||
StartupStageAdapter adapter = new StartupStageAdapter(this, startupStages);
|
||||
listView.setAdapter(adapter);
|
||||
|
||||
for (Integer key : startupStages.keySet()) {
|
||||
boolean stageDone = startupStages.get(key);
|
||||
ImageView icon = findViewById(startupStageIconIds.get(key));
|
||||
icon.setImageResource(stageDone ? R.drawable.ic_check : R.drawable.ic_close);
|
||||
icon.setColorFilter(stageDone ? Color.WHITE : Color.RED);
|
||||
// Add 1 pixel to listview height
|
||||
int listHeight = Math.round(getResources().getDisplayMetrics().density);
|
||||
|
||||
for (int i = 0; i < startupStages.size(); i++) {
|
||||
View item = adapter.getView(i, null, listView);
|
||||
item.measure(0, 0);
|
||||
listHeight += item.getMeasuredHeight();
|
||||
}
|
||||
|
||||
// Properly set listview height by adding all seven items and the divider heights
|
||||
// and the additional 1 pixel so no vertical scroll bar is shown
|
||||
ViewGroup.LayoutParams params = listView.getLayoutParams();
|
||||
params.height = listHeight + (listView.getCount() + 1) * listView.getDividerHeight();
|
||||
listView.setLayoutParams(params);
|
||||
listView.invalidate();
|
||||
listView.requestLayout();
|
||||
|
||||
findViewById(R.id.splash_view_loading_container).setVisibility(View.GONE);
|
||||
findViewById(R.id.splash_view_error_container).setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -2770,16 +2774,16 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
|
||||
// perform some tasks before launching
|
||||
(new AsyncTask<Void, Void, Boolean>() {
|
||||
private Map<Integer, Boolean> startupStages = new HashMap<>();
|
||||
private final List<StartupStage> startupStages = new ArrayList<>(7);
|
||||
|
||||
private void initStartupStages() {
|
||||
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, false);
|
||||
startupStages.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, false);
|
||||
startupStages.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, false);
|
||||
startupStages.put(STARTUP_STAGE_USER_AUTHENTICATED, false);
|
||||
startupStages.put(STARTUP_STAGE_NEW_INSTALL_DONE, false);
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, false);
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, false);
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_KNOWN_TAGS_LOADED, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_EXCHANGE_RATE_LOADED, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_USER_AUTHENTICATED, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_NEW_INSTALL_DONE, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, false));
|
||||
startupStages.add(new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, false));
|
||||
}
|
||||
protected void onPreExecute() {
|
||||
hideActionBar();
|
||||
@@ -2799,26 +2803,26 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
String installId = reader.readLine();
|
||||
if (Helper.isNullOrEmpty(installId)) {
|
||||
// no install_id found (first run didn't start the sdk successfully?)
|
||||
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, false);
|
||||
startupStages.set(STARTUP_STAGE_INSTALL_ID_LOADED - 1, new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, false));
|
||||
return false;
|
||||
}
|
||||
|
||||
Lbry.INSTALLATION_ID = installId;
|
||||
startupStages.put(STARTUP_STAGE_INSTALL_ID_LOADED, true);
|
||||
startupStages.set(STARTUP_STAGE_INSTALL_ID_LOADED - 1, new StartupStage(STARTUP_STAGE_INSTALL_ID_LOADED, true));
|
||||
|
||||
SQLiteDatabase db = dbHelper.getReadableDatabase();
|
||||
List<Tag> fetchedTags = DatabaseHelper.getTags(db);
|
||||
Lbry.knownTags = Helper.mergeKnownTags(fetchedTags);
|
||||
Collections.sort(Lbry.knownTags, new Tag());
|
||||
Lbry.followedTags = Helper.filterFollowedTags(Lbry.knownTags);
|
||||
startupStages.put(STARTUP_STAGE_KNOWN_TAGS_LOADED, true);
|
||||
startupStages.set(STARTUP_STAGE_KNOWN_TAGS_LOADED - 1, new StartupStage(STARTUP_STAGE_KNOWN_TAGS_LOADED, true));
|
||||
|
||||
// load the exchange rate
|
||||
Lbryio.loadExchangeRate();
|
||||
if (Lbryio.LBCUSDRate == 0) {
|
||||
return false;
|
||||
}
|
||||
startupStages.put(STARTUP_STAGE_EXCHANGE_RATE_LOADED, true);
|
||||
startupStages.set(STARTUP_STAGE_EXCHANGE_RATE_LOADED - 1, new StartupStage(STARTUP_STAGE_EXCHANGE_RATE_LOADED, true));
|
||||
|
||||
try {
|
||||
Lbryio.authenticate(context);
|
||||
@@ -2830,10 +2834,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
if (Lbryio.currentUser == null) {
|
||||
throw new Exception("Did not retrieve authenticated user.");
|
||||
}
|
||||
startupStages.put(STARTUP_STAGE_USER_AUTHENTICATED, true);
|
||||
startupStages.set(STARTUP_STAGE_USER_AUTHENTICATED - 1, new StartupStage(STARTUP_STAGE_USER_AUTHENTICATED, true));
|
||||
|
||||
Lbryio.newInstall(context);
|
||||
startupStages.put(STARTUP_STAGE_NEW_INSTALL_DONE, true);
|
||||
startupStages.set(STARTUP_STAGE_NEW_INSTALL_DONE - 1, new StartupStage(STARTUP_STAGE_NEW_INSTALL_DONE, true));
|
||||
|
||||
// (light) fetch subscriptions
|
||||
if (Lbryio.subscriptions.size() == 0) {
|
||||
@@ -2854,23 +2858,22 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
subUrls.add(url.toString());
|
||||
}
|
||||
Lbryio.subscriptions = subscriptions;
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
|
||||
|
||||
// resolve subscriptions
|
||||
if (subUrls.size() > 0 && Lbryio.cacheResolvedSubscriptions.size() != Lbryio.subscriptions.size()) {
|
||||
List<Claim> resolvedSubs = Lbry.resolve(subUrls, Lbry.LBRY_TV_CONNECTION_STRING);
|
||||
Lbryio.cacheResolvedSubscriptions = resolvedSubs;
|
||||
Lbryio.cacheResolvedSubscriptions = Lbry.resolve(subUrls, Lbry.LBRY_TV_CONNECTION_STRING);
|
||||
}
|
||||
// if no exceptions occurred here, subscriptions have been loaded and resolved
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
|
||||
} else {
|
||||
// user has not subscribed to anything
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
|
||||
}
|
||||
} else {
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true);
|
||||
startupStages.put(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true);
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_LOADED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_LOADED, true));
|
||||
startupStages.set(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED - 1, new StartupStage(STARTUP_STAGE_SUBSCRIPTIONS_RESOLVED, true));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// nopecd
|
||||
@@ -3106,6 +3109,17 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
String action = intent.getAction();
|
||||
if (LbrynetService.ACTION_STOP_SERVICE.equals(action)) {
|
||||
MainActivity.this.receivedStopService = true;
|
||||
|
||||
// STOP is meant to close everything,
|
||||
// So destroy the player at this point (even with background play enabled)
|
||||
if (appPlayer != null) {
|
||||
playerNotificationManager.setPlayer(null);
|
||||
stopExoplayer();
|
||||
nowPlayingClaim = null;
|
||||
nowPlayingClaimUrl = null;
|
||||
nowPlayingClaimBitmap = null;
|
||||
}
|
||||
|
||||
MainActivity.this.finish();
|
||||
} else if (LbrynetService.LBRY_SDK_SERVICE_STARTED.equals(action)) {
|
||||
// Rebuild the service notification
|
||||
@@ -3388,6 +3402,11 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
return String.format("%s-%d", fragmentClass.getName(), navItemId);
|
||||
}
|
||||
|
||||
public void popFragment(Class fragmentClass, int navItemId, Map<String, Object> params) {
|
||||
String key = buildNavFragmentKey(fragmentClass, navItemId, params);
|
||||
openNavFragments.remove(key);
|
||||
}
|
||||
|
||||
public void openFragment(Class fragmentClass, boolean allowNavigateBack, int navItemId, Map<String, Object> params) {
|
||||
try {
|
||||
String key = buildNavFragmentKey(fragmentClass, navItemId, params);
|
||||
|
||||
@@ -404,7 +404,7 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
||||
vh.publishTimeView.setVisibility(!isPending ? View.VISIBLE : View.GONE);
|
||||
vh.pendingTextView.setVisibility(isPending && !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);
|
||||
vh.repostInfoView.setVisibility(isRepost && type != VIEW_TYPE_FEATURED ? View.VISIBLE : View.GONE);
|
||||
vh.repostChannelView.setText(isRepost ? original.getSigningChannel().getName() : null);
|
||||
vh.repostChannelView.setText(isRepost && original.getSigningChannel() != null ? original.getSigningChannel().getName() : null);
|
||||
vh.repostChannelView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package io.lbry.browser.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.lbry.browser.R;
|
||||
import io.lbry.browser.model.StartupStage;
|
||||
|
||||
public class StartupStageAdapter extends BaseAdapter {
|
||||
private final List<StartupStage> list;
|
||||
private final LayoutInflater inflater;
|
||||
private final String[] stagesString;
|
||||
|
||||
public StartupStageAdapter(Context ctx, List<StartupStage> rows) {
|
||||
this.list = rows;
|
||||
this.inflater = LayoutInflater.from(ctx);
|
||||
|
||||
stagesString = new String[7];
|
||||
|
||||
stagesString[0] = ctx.getResources().getString(R.string.installation_id_loaded);
|
||||
stagesString[1] = ctx.getResources().getString(R.string.known_tags_loaded);
|
||||
stagesString[2] = ctx.getResources().getString(R.string.exchange_rate_loaded);
|
||||
stagesString[3] = ctx.getResources().getString(R.string.user_authenticated);
|
||||
stagesString[4] = ctx.getResources().getString(R.string.installation_registered);
|
||||
stagesString[5] = ctx.getResources().getString(R.string.subscriptions_loaded);
|
||||
stagesString[6] = ctx.getResources().getString(R.string.subscriptions_resolved);
|
||||
}
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
if (view == null) {
|
||||
view = inflater.inflate(R.layout.list_item_startupstage, viewGroup, false);
|
||||
|
||||
ImageView iconView = view.findViewById(R.id.startup_stage_icon);
|
||||
TextView textView = view.findViewById(R.id.startup_stage_text);
|
||||
|
||||
StartupStage item = (StartupStage) getItem(i);
|
||||
|
||||
iconView.setImageResource(item.stageDone ? R.drawable.ic_check : R.drawable.ic_close);
|
||||
iconView.setColorFilter(item.stageDone ? Color.WHITE : Color.RED);
|
||||
|
||||
textView.setText(stagesString[item.stage - 1]);
|
||||
}
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Comment implements Comparable<Comment> {
|
||||
public static final double LBC_COST = 1;
|
||||
public static final int MAX_LENGTH = 2000;
|
||||
|
||||
private Claim poster;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package io.lbry.browser.model;
|
||||
|
||||
public class StartupStage {
|
||||
public Integer stage;
|
||||
public Boolean stageDone;
|
||||
|
||||
public StartupStage(Integer stage, Boolean stageDone) {
|
||||
this.stage = stage;
|
||||
this.stageDone = stageDone;
|
||||
}
|
||||
}
|
||||
+2
-11
@@ -24,18 +24,16 @@ import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class CommentCreateWithTipTask extends AsyncTask<Void, Void, Comment> {
|
||||
public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
|
||||
private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
|
||||
|
||||
private Comment comment;
|
||||
private BigDecimal amount;
|
||||
private View progressView;
|
||||
private CommentCreateWithTipHandler handler;
|
||||
private Exception error;
|
||||
|
||||
public CommentCreateWithTipTask(Comment comment, BigDecimal amount, View progressView, CommentCreateWithTipHandler handler) {
|
||||
public CommentCreateTask(Comment comment, View progressView, CommentCreateWithTipHandler handler) {
|
||||
this.comment = comment;
|
||||
this.amount = amount;
|
||||
this.progressView = progressView;
|
||||
this.handler = handler;
|
||||
}
|
||||
@@ -62,13 +60,6 @@ public class CommentCreateWithTipTask extends AsyncTask<Void, Void, Comment> {
|
||||
}
|
||||
|
||||
Map<String, Object> options = new HashMap<>();
|
||||
options.put("blocking", true);
|
||||
options.put("claim_id", comment.getClaimId());
|
||||
options.put("amount", new DecimalFormat(Helper.SDK_AMOUNT_FORMAT, new DecimalFormatSymbols(Locale.US)).format(amount.doubleValue()));
|
||||
options.put("tip", true);
|
||||
Lbry.genericApiCall(Lbry.METHOD_SUPPORT_CREATE, options);
|
||||
|
||||
options = new HashMap<>();
|
||||
options.put("comment", comment.getText());
|
||||
options.put("claim_id", comment.getClaimId());
|
||||
options.put("channel_id", comment.getChannelId());
|
||||
@@ -130,6 +130,10 @@ public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
||||
}
|
||||
|
||||
protected boolean isNotificationsDisabledForSubUrl(String url, JSONArray following) {
|
||||
if (following == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
for (int i = 0; i < following.length(); i++) {
|
||||
JSONObject item = following.getJSONObject(i);
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -45,7 +44,7 @@ import io.lbry.browser.listener.WalletBalanceListener;
|
||||
import io.lbry.browser.model.Claim;
|
||||
import io.lbry.browser.model.Comment;
|
||||
import io.lbry.browser.model.WalletBalance;
|
||||
import io.lbry.browser.tasks.CommentCreateWithTipTask;
|
||||
import io.lbry.browser.tasks.CommentCreateTask;
|
||||
import io.lbry.browser.tasks.CommentListHandler;
|
||||
import io.lbry.browser.tasks.CommentListTask;
|
||||
import io.lbry.browser.tasks.claim.ChannelCreateUpdateTask;
|
||||
@@ -58,7 +57,6 @@ import io.lbry.browser.utils.Helper;
|
||||
import io.lbry.browser.utils.Lbry;
|
||||
import io.lbry.browser.utils.LbryAnalytics;
|
||||
import io.lbry.browser.utils.LbryUri;
|
||||
import io.lbry.browser.utils.Lbryio;
|
||||
import lombok.Setter;
|
||||
|
||||
public class ChannelCommentsFragment extends Fragment implements SdkStatusListener, WalletBalanceListener {
|
||||
@@ -367,9 +365,6 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
}
|
||||
|
||||
private void initCommentForm(View root) {
|
||||
double amount = Comment.LBC_COST;
|
||||
String buttonText = getResources().getQuantityString(R.plurals.post_for_credits, amount == 1 ? 1 : 2, Helper.LBC_CURRENCY_FORMAT.format(amount));
|
||||
buttonPostComment.setText(buttonText);
|
||||
textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH));
|
||||
|
||||
buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -387,7 +382,7 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
return;
|
||||
}
|
||||
|
||||
validateAndCheckPostComment(amount);
|
||||
validateAndCheckPostComment();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -433,7 +428,7 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
});
|
||||
}
|
||||
|
||||
private void validateAndCheckPostComment(double amount) {
|
||||
private void validateAndCheckPostComment() {
|
||||
String comment = Helper.getValue(inputComment.getText());
|
||||
Claim channel = (Claim) commentChannelSpinner.getSelectedItem();
|
||||
|
||||
@@ -445,33 +440,8 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
showError(getString(R.string.please_select_channel));
|
||||
return;
|
||||
}
|
||||
if (Lbry.walletBalance == null || amount > Lbry.walletBalance.getAvailable().doubleValue()) {
|
||||
showError(getString(R.string.insufficient_balance));
|
||||
return;
|
||||
}
|
||||
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
String titleText = getResources().getQuantityString(
|
||||
R.plurals.post_and_tip,
|
||||
amount == 1 ? 1 : 2,
|
||||
Helper.LBC_CURRENCY_FORMAT.format(amount));
|
||||
String confirmText = getResources().getQuantityString(
|
||||
R.plurals.confirm_post_comment,
|
||||
amount == 1 ? 1 : 2,
|
||||
Helper.LBC_CURRENCY_FORMAT.format(amount),
|
||||
claim.getTitleOrName());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context).
|
||||
setTitle(titleText).
|
||||
setMessage(confirmText)
|
||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
postComment(amount);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
builder.show();
|
||||
}
|
||||
postComment();
|
||||
}
|
||||
|
||||
private void updatePostAsChannel(Claim channel) {
|
||||
@@ -545,17 +515,15 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
replyToComment = null;
|
||||
}
|
||||
|
||||
private void postComment(double tipAmount) {
|
||||
private void postComment() {
|
||||
if (postingComment) {
|
||||
return;
|
||||
}
|
||||
|
||||
Comment comment = buildPostComment();
|
||||
// only use 2 decimal places
|
||||
BigDecimal amount = new BigDecimal(String.valueOf(tipAmount));
|
||||
|
||||
beforePostComment();
|
||||
CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() {
|
||||
CommentCreateTask task = new CommentCreateTask(comment, progressPostComment, new CommentCreateTask.CommentCreateWithTipHandler() {
|
||||
@Override
|
||||
public void onSuccess(Comment createdComment) {
|
||||
inputComment.setText(null);
|
||||
@@ -573,7 +541,6 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||
checkNoComments();
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putDouble("amount", amount.doubleValue());
|
||||
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
|
||||
bundle.putString("claim_name", claim != null ? claim.getName() : null);
|
||||
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);
|
||||
|
||||
@@ -252,37 +252,22 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
|
||||
return;
|
||||
}
|
||||
|
||||
subscribing = true;
|
||||
boolean isFollowing = Lbryio.isFollowing(claim);
|
||||
Subscription subscription = Subscription.fromClaim(claim);
|
||||
view.setEnabled(false);
|
||||
new ChannelSubscribeTask(getContext(), claim.getClaimId(), subscription, isFollowing, new ChannelSubscribeTask.ChannelSubscribeHandler() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isFollowing) {
|
||||
Lbryio.removeSubscription(subscription);
|
||||
Lbryio.removeCachedResolvedSubscription(claim);
|
||||
} else {
|
||||
Lbryio.addSubscription(subscription);
|
||||
Lbryio.addCachedResolvedSubscription(claim);
|
||||
}
|
||||
buttonFollowUnfollow.setEnabled(true);
|
||||
subscribing = false;
|
||||
checkIsFollowing();
|
||||
FollowingFragment.resetClaimSearchContent = true;
|
||||
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
buttonFollowUnfollow.setEnabled(true);
|
||||
subscribing = false;
|
||||
}
|
||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
if (isFollowing) {
|
||||
Context context = getContext();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context).
|
||||
setTitle(R.string.confirm_unfollow).
|
||||
setMessage(R.string.confirm_unfollow_message)
|
||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
doFollowUnfollow(isFollowing, view);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
builder.show();
|
||||
} else {
|
||||
doFollowUnfollow(isFollowing, view);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -290,6 +275,39 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
|
||||
return root;
|
||||
}
|
||||
|
||||
private void doFollowUnfollow(boolean isFollowing, View view) {
|
||||
subscribing = true;
|
||||
Subscription subscription = Subscription.fromClaim(claim);
|
||||
view.setEnabled(false);
|
||||
new ChannelSubscribeTask(getContext(), claim.getClaimId(), subscription, isFollowing, new ChannelSubscribeTask.ChannelSubscribeHandler() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isFollowing) {
|
||||
Lbryio.removeSubscription(subscription);
|
||||
Lbryio.removeCachedResolvedSubscription(claim);
|
||||
} else {
|
||||
Lbryio.addSubscription(subscription);
|
||||
Lbryio.addCachedResolvedSubscription(claim);
|
||||
}
|
||||
buttonFollowUnfollow.setEnabled(true);
|
||||
subscribing = false;
|
||||
checkIsFollowing();
|
||||
FollowingFragment.resetClaimSearchContent = true;
|
||||
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
buttonFollowUnfollow.setEnabled(true);
|
||||
subscribing = false;
|
||||
}
|
||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
private void deleteCurrentClaim() {
|
||||
if (claim != null) {
|
||||
Helper.setViewVisibility(layoutDisplayArea, View.GONE);
|
||||
|
||||
@@ -12,9 +12,11 @@ import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Base64;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
@@ -92,8 +94,6 @@ import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import io.lbry.browser.MainActivity;
|
||||
import io.lbry.browser.R;
|
||||
@@ -123,7 +123,7 @@ import io.lbry.browser.model.WalletBalance;
|
||||
import io.lbry.browser.model.lbryinc.Reward;
|
||||
import io.lbry.browser.model.lbryinc.Subscription;
|
||||
import io.lbry.browser.tasks.BufferEventTask;
|
||||
import io.lbry.browser.tasks.CommentCreateWithTipTask;
|
||||
import io.lbry.browser.tasks.CommentCreateTask;
|
||||
import io.lbry.browser.tasks.CommentListHandler;
|
||||
import io.lbry.browser.tasks.CommentListTask;
|
||||
import io.lbry.browser.tasks.GenericTaskHandler;
|
||||
@@ -311,8 +311,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||
String mediaSourceUrl = getStreamingUrl();
|
||||
long duration = MainActivity.appPlayer.getDuration();
|
||||
long position = MainActivity.appPlayer.getCurrentPosition();
|
||||
// TODO: Determine a hash for the userId
|
||||
String userIdHash = Helper.SHA256(Lbryio.currentUser != null ? String.valueOf(Lbryio.currentUser.getId()) : "0");
|
||||
String userIdHash = Lbryio.currentUser != null ? String.valueOf(Lbryio.currentUser.getId()) : "0";
|
||||
if (mediaSourceUrl.startsWith(CDN_PREFIX)) {
|
||||
BufferEventTask bufferEvent = new BufferEventTask(claim.getPermanentUrl(), duration, position, 1, userIdHash);
|
||||
bufferEvent.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
|
||||
@@ -430,8 +429,11 @@ public class FileViewFragment extends BaseFragment implements
|
||||
renderNothingAtLocation();
|
||||
} else if (claim.getName().startsWith("@")) {
|
||||
// this is a reposted channel, so launch the channel url
|
||||
if (context instanceof MainActivity) {
|
||||
((MainActivity) context).openChannelUrl(!Helper.isNullOrEmpty(claim.getShortUrl()) ? claim.getShortUrl() : claim.getPermanentUrl());
|
||||
if (context instanceof MainActivity) {
|
||||
MainActivity activity = (MainActivity) context;
|
||||
//activity.onBackPressed(); // remove the reposted url page from the back stack
|
||||
activity.getSupportFragmentManager().popBackStack();
|
||||
activity.openChannelUrl(!Helper.isNullOrEmpty(claim.getShortUrl()) ? claim.getShortUrl() : claim.getPermanentUrl());
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -824,42 +826,64 @@ public class FileViewFragment extends BaseFragment implements
|
||||
|
||||
private View.OnClickListener followUnfollowListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
public void onClick(final View view) {
|
||||
if (claim != null && claim.getSigningChannel() != null) {
|
||||
Claim publisher = claim.getSigningChannel();
|
||||
boolean isFollowing = Lbryio.isFollowing(publisher);
|
||||
Subscription subscription = Subscription.fromClaim(publisher);
|
||||
view.setEnabled(false);
|
||||
Context context = getContext();
|
||||
new ChannelSubscribeTask(context, publisher.getClaimId(), subscription, isFollowing, new ChannelSubscribeTask.ChannelSubscribeHandler() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isFollowing) {
|
||||
Lbryio.removeSubscription(subscription);
|
||||
Lbryio.removeCachedResolvedSubscription(publisher);
|
||||
} else {
|
||||
Lbryio.addSubscription(subscription);
|
||||
Lbryio.addCachedResolvedSubscription(publisher);
|
||||
}
|
||||
view.setEnabled(true);
|
||||
checkIsFollowing();
|
||||
FollowingFragment.resetClaimSearchContent = true;
|
||||
|
||||
// Save shared user state
|
||||
if (context != null) {
|
||||
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
view.setEnabled(true);
|
||||
}
|
||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
if (isFollowing) {
|
||||
// show unfollow confirmation
|
||||
Context context = getContext();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context).
|
||||
setTitle(R.string.confirm_unfollow).
|
||||
setMessage(R.string.confirm_unfollow_message)
|
||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
doFollowUnfollow(isFollowing, view);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
builder.show();
|
||||
} else {
|
||||
doFollowUnfollow(isFollowing, view);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void doFollowUnfollow(boolean isFollowing, View view) {
|
||||
if (claim != null && claim.getSigningChannel() != null) {
|
||||
Claim publisher = claim.getSigningChannel();
|
||||
Subscription subscription = Subscription.fromClaim(publisher);
|
||||
view.setEnabled(false);
|
||||
Context context = getContext();
|
||||
new ChannelSubscribeTask(context, publisher.getClaimId(), subscription, isFollowing, new ChannelSubscribeTask.ChannelSubscribeHandler() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isFollowing) {
|
||||
Lbryio.removeSubscription(subscription);
|
||||
Lbryio.removeCachedResolvedSubscription(publisher);
|
||||
} else {
|
||||
Lbryio.addSubscription(subscription);
|
||||
Lbryio.addCachedResolvedSubscription(publisher);
|
||||
}
|
||||
view.setEnabled(true);
|
||||
checkIsFollowing();
|
||||
FollowingFragment.resetClaimSearchContent = true;
|
||||
|
||||
// Save shared user state
|
||||
if (context != null) {
|
||||
context.sendBroadcast(new Intent(MainActivity.ACTION_SAVE_SHARED_USER_STATE));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
view.setEnabled(true);
|
||||
}
|
||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
}
|
||||
|
||||
private void resolveUrl(String url) {
|
||||
resolving = true;
|
||||
Helper.setViewVisibility(layoutDisplayArea, View.INVISIBLE);
|
||||
@@ -878,7 +902,9 @@ public class FileViewFragment extends BaseFragment implements
|
||||
// this is a reposted channel, so finish this activity and launch the channel url
|
||||
Context context = getContext();
|
||||
if (context instanceof MainActivity) {
|
||||
((MainActivity) context).openChannelUrl(!Helper.isNullOrEmpty(claim.getShortUrl()) ? claim.getShortUrl() : claim.getPermanentUrl());
|
||||
MainActivity activity = (MainActivity) context;
|
||||
activity.getSupportFragmentManager().popBackStack();
|
||||
activity.openChannelUrl(!Helper.isNullOrEmpty(claim.getShortUrl()) ? claim.getShortUrl() : claim.getPermanentUrl());
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1654,6 +1680,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||
|
||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||
MainActivity.playerCache =
|
||||
new SimpleCache(context.getCacheDir(),
|
||||
@@ -2118,19 +2146,9 @@ public class FileViewFragment extends BaseFragment implements
|
||||
ReadTextFileTask task = new ReadTextFileTask(filePath, new ReadTextFileTask.ReadTextFileHandler() {
|
||||
@Override
|
||||
public void onSuccess(String text) {
|
||||
String html = buildMarkdownHtml(text);
|
||||
|
||||
if (webView != null) {
|
||||
// Due to a change to Chrome, WebView only displays '#' -and everything after it-
|
||||
// if it is '%23' instead. Problem appears in text like '#2' or #hashtags.
|
||||
Pattern pattern = Pattern.compile("#(\\S+)");
|
||||
Matcher matcher = pattern.matcher(html);
|
||||
|
||||
if (matcher.find()) {
|
||||
html = html.replaceAll(pattern.toString(), "&%2335;" + matcher.group(1));
|
||||
}
|
||||
|
||||
webView.loadData(html, "text/html", "utf-8");
|
||||
String html = buildMarkdownHtml(text);
|
||||
webView.loadData(Base64.encodeToString(html.getBytes(), Base64.NO_PADDING), "text/html", "base64");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2168,7 +2186,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
private void openClaimExternally(Claim claim, String mediaType) {
|
||||
File file = new File(claim.getFile().getDownloadPath());
|
||||
Uri fileUri = Uri.parse(claim.getFile().getDownloadPath());
|
||||
|
||||
Intent intent = new Intent();
|
||||
@@ -2989,9 +3006,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
private void initCommentForm(View root) {
|
||||
double amount = Comment.LBC_COST;
|
||||
String buttonText = getResources().getQuantityString(R.plurals.post_for_credits, amount == 1 ? 1 : 2, Helper.LBC_CURRENCY_FORMAT.format(amount));
|
||||
buttonPostComment.setText(buttonText);
|
||||
textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH));
|
||||
|
||||
buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -3009,7 +3023,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||
return;
|
||||
}
|
||||
|
||||
validateAndCheckPostComment(amount);
|
||||
validateAndCheckPostComment();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3055,7 +3069,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||
});
|
||||
}
|
||||
|
||||
private void validateAndCheckPostComment(double amount) {
|
||||
private void validateAndCheckPostComment() {
|
||||
String comment = Helper.getValue(inputComment.getText());
|
||||
Claim channel = (Claim) commentChannelSpinner.getSelectedItem();
|
||||
|
||||
@@ -3067,33 +3081,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
showError(getString(R.string.please_select_channel));
|
||||
return;
|
||||
}
|
||||
if (Lbry.walletBalance == null || amount > Lbry.walletBalance.getAvailable().doubleValue()) {
|
||||
showError(getString(R.string.insufficient_balance));
|
||||
return;
|
||||
}
|
||||
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
String titleText = getResources().getQuantityString(
|
||||
R.plurals.post_and_tip,
|
||||
amount == 1 ? 1 : 2,
|
||||
Helper.LBC_CURRENCY_FORMAT.format(amount));
|
||||
String confirmText = getResources().getQuantityString(
|
||||
R.plurals.confirm_post_comment,
|
||||
amount == 1 ? 1 : 2,
|
||||
Helper.LBC_CURRENCY_FORMAT.format(amount),
|
||||
claim.getTitleOrName());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context).
|
||||
setTitle(titleText).
|
||||
setMessage(confirmText)
|
||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
postComment(amount);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
builder.show();
|
||||
}
|
||||
postComment();
|
||||
}
|
||||
|
||||
private void updatePostAsChannel(Claim channel) {
|
||||
@@ -3167,17 +3156,15 @@ public class FileViewFragment extends BaseFragment implements
|
||||
replyToComment = null;
|
||||
}
|
||||
|
||||
private void postComment(double tipAmount) {
|
||||
private void postComment() {
|
||||
if (postingComment) {
|
||||
return;
|
||||
}
|
||||
|
||||
Comment comment = buildPostComment();
|
||||
// only use 2 decimal places
|
||||
BigDecimal amount = new BigDecimal(String.valueOf(tipAmount));
|
||||
|
||||
beforePostComment();
|
||||
CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() {
|
||||
CommentCreateTask task = new CommentCreateTask(comment, progressPostComment, new CommentCreateTask.CommentCreateWithTipHandler() {
|
||||
@Override
|
||||
public void onSuccess(Comment createdComment) {
|
||||
inputComment.setText(null);
|
||||
@@ -3195,7 +3182,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
checkNoComments();
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putDouble("amount", amount.doubleValue());
|
||||
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
|
||||
bundle.putString("claim_name", claim != null ? claim.getName() : null);
|
||||
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);
|
||||
|
||||
@@ -131,8 +131,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||
String mediaSourceUrl = getStreamingUrl();
|
||||
long duration = MainActivity.appPlayer.getDuration();
|
||||
long position = MainActivity.appPlayer.getCurrentPosition();
|
||||
// TODO: Determine a hash for the userId
|
||||
String userIdHash = Helper.SHA256(Lbryio.currentUser != null ? String.valueOf(Lbryio.currentUser.getId()) : "0");
|
||||
String userIdHash = Lbryio.currentUser != null ? String.valueOf(Lbryio.currentUser.getId()) : "0";
|
||||
if (mediaSourceUrl.startsWith(FileViewFragment.CDN_PREFIX)) {
|
||||
BufferEventTask bufferEvent = new BufferEventTask(current.getPermanentUrl(), duration, position, 1, userIdHash);
|
||||
bufferEvent.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
|
||||
@@ -448,6 +447,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||
MainActivity.playerCache =
|
||||
new SimpleCache(context.getCacheDir(),
|
||||
|
||||
@@ -463,7 +463,7 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W
|
||||
double sentAmount = actualSendAmount;
|
||||
String message = getResources().getQuantityString(
|
||||
R.plurals.you_sent_credits, sentAmount == 1.0 ? 1 : 2,
|
||||
new DecimalFormat("#,###.##").format(sentAmount));
|
||||
new DecimalFormat("#,###.####").format(sentAmount));
|
||||
Helper.setViewText(inputSendAddress, null);
|
||||
Helper.setViewText(inputSendAmount, null);
|
||||
if (view != null) {
|
||||
|
||||
@@ -6,9 +6,13 @@ import android.os.Handler;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||
import com.google.android.exoplayer2.PlaybackParameters;
|
||||
import com.google.android.exoplayer2.Renderer;
|
||||
import com.google.android.exoplayer2.audio.AudioCapabilities;
|
||||
import com.google.android.exoplayer2.audio.AudioProcessor;
|
||||
import com.google.android.exoplayer2.audio.AudioRendererEventListener;
|
||||
import com.google.android.exoplayer2.audio.AudioSink;
|
||||
import com.google.android.exoplayer2.audio.DefaultAudioSink;
|
||||
import com.google.android.exoplayer2.audio.TeeAudioProcessor;
|
||||
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
||||
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
||||
@@ -30,22 +34,18 @@ public class ExoplayerAudioRenderer extends DefaultRenderersFactory {
|
||||
Context context,
|
||||
int extensionRendererMode,
|
||||
MediaCodecSelector mediaCodecSelector,
|
||||
@Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
|
||||
boolean playClearSamplesWithoutKeys,
|
||||
boolean enableDecoderFallback,
|
||||
AudioProcessor[] audioProcessors,
|
||||
AudioSink audioSink,
|
||||
Handler eventHandler,
|
||||
AudioRendererEventListener eventListener,
|
||||
ArrayList<Renderer> out) {
|
||||
AudioProcessor[] audioProcessorList = { new TeeAudioProcessor(audioBufferSink) };
|
||||
|
||||
super.buildAudioRenderers(
|
||||
context,
|
||||
extensionRendererMode,
|
||||
mediaCodecSelector,
|
||||
drmSessionManager,
|
||||
playClearSamplesWithoutKeys,
|
||||
enableDecoderFallback,
|
||||
audioProcessorList,
|
||||
audioSink,
|
||||
eventHandler,
|
||||
eventListener,
|
||||
out);
|
||||
|
||||
@@ -29,9 +29,8 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.gms.common.util.Hex;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
|
||||
import org.bitcoinj.core.Base58;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -39,7 +38,7 @@ import org.json.JSONObject;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.DecimalFormat;
|
||||
@@ -795,9 +794,13 @@ public final class Helper {
|
||||
public static String SHA256(String value) {
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-256");
|
||||
byte[] hash = digest.digest(value.getBytes("UTF-8"));
|
||||
return Hex.bytesToStringLowercase(hash);
|
||||
} catch (NoSuchAlgorithmException | UnsupportedEncodingException ex) {
|
||||
byte[] hash = digest.digest(value.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
|
||||
return Hex.encodeHexString(hash, true);
|
||||
else
|
||||
return new String(Hex.encodeHex(hash)).toLowerCase();
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_close"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_close"
|
||||
android:tint="@color/actionBarForeground" />
|
||||
app:tint="@color/actionBarForeground" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_notifications"
|
||||
android:tint="@color/actionBarForeground" />
|
||||
app:tint="@color/actionBarForeground" />
|
||||
<TextView
|
||||
android:id="@+id/notifications_badge_count"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -156,173 +156,17 @@
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
<LinearLayout
|
||||
<ListView
|
||||
android:id="@+id/startup_stage_error_listview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_install_id"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/installation_id_loaded"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="8dp"
|
||||
android:scrollbars="none"
|
||||
tools:listitem="@layout/list_item_startupstage">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_known_tags"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/known_tags_loaded"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_exchange_rate"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/exchange_rate_loaded"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_user_authenticated"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/user_authenticated"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_install_new"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/installation_registered"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_subscriptions_loaded"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/subscriptions_loaded"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon_subscriptions_resolved"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_check" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/subscriptions_resolved"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</ListView>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/comment_form_card"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
@@ -47,22 +48,25 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
android:id="@+id/comment_form_reply_to_vertical_bar"
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/nextLbryGreen" />
|
||||
android:background="@color/nextLbryGreen"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="40dp">
|
||||
android:layout_marginEnd="40dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_form_replying_to_text"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -77,25 +81,26 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:lineSpacingMultiplier="1.05"
|
||||
android:fontFamily="@font/inter"
|
||||
android:lineSpacingMultiplier="1.05"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/comment_form_clear_reply_to"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp">
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_close"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -168,12 +173,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/comment_form_post"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter" />
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/comment_form_post" />
|
||||
<ProgressBar
|
||||
android:id="@+id/comment_form_post_progress"
|
||||
android:layout_width="20dp"
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/foreground"
|
||||
android:src="@drawable/ic_close"
|
||||
android:layout_centerInParent="true"/>
|
||||
android:layout_centerInParent="true"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@@ -44,8 +45,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -70,8 +71,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -96,8 +97,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -122,8 +123,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -148,7 +149,7 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@@ -53,8 +54,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -88,7 +89,7 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@@ -35,7 +36,7 @@
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_trending"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
<TextView
|
||||
android:layout_toEndOf="@+id/sort_by_trending_item_icon"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -53,8 +54,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -70,7 +71,7 @@
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_new"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
<TextView
|
||||
android:layout_toEndOf="@+id/sort_by_new_item_icon"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -88,8 +89,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -105,7 +106,7 @@
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_top"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
<TextView
|
||||
android:layout_toEndOf="@+id/sort_by_top_item_icon"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -123,7 +124,7 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:tint="@color/lbryGreen" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -22,7 +22,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:src="@drawable/ic_replay_10"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -74,7 +74,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:src="@drawable/ic_forward_10"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -92,7 +92,7 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_cast"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -133,7 +133,7 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_fullscreen"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -120,7 +120,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -161,7 +161,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -157,8 +157,8 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/foreground"
|
||||
android:src="@drawable/ic_edit" />
|
||||
android:src="@drawable/ic_edit"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/channel_view_delete"
|
||||
@@ -172,8 +172,8 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/foreground"
|
||||
android:src="@drawable/ic_delete" />
|
||||
android:src="@drawable/ic_delete"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/channel_view_share"
|
||||
@@ -186,8 +186,8 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:tint="@color/foreground"
|
||||
android:src="@drawable/ic_share" />
|
||||
android:src="@drawable/ic_share"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/channel_view_tip"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -85,7 +85,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -37,58 +37,66 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_claim_display_area"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_media_container"
|
||||
android:background="@color/mediaContainerBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="246dp">
|
||||
android:layout_height="246dp"
|
||||
android:background="@color/mediaContainerBackground">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_media_meta_container"
|
||||
android:clickable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_view_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/file_view_main_action_loading"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/file_view_main_action_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/play"
|
||||
android:textSize="14sp"
|
||||
android:visibility="invisible"
|
||||
android:text="@string/play" />
|
||||
android:visibility="invisible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_fee_container"
|
||||
android:background="@drawable/bg_stream_cost"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:background="@drawable/bg_stream_cost"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingEnd="7dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_credits" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_fee"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -97,22 +105,24 @@
|
||||
android:layout_marginStart="1dp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textFontWeight="300" />
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_exoplayer_container"
|
||||
android:background="@android:color/black"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.google.android.exoplayer2.ui.PlayerView
|
||||
android:id="@+id/file_view_exoplayer_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:controller_layout_id="@layout/exo_playback_control_view"/>
|
||||
app:controller_layout_id="@layout/exo_playback_control_view" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/player_buffering_progress"
|
||||
android:layout_width="36dp"
|
||||
@@ -123,47 +133,52 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_unsupported_container"
|
||||
android:background="@color/mediaContainerBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/mediaContainerBackground"
|
||||
android:padding="36dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_view_unsupported_gerbil"
|
||||
android:src="@drawable/gerbil_happy"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content" />
|
||||
android:src="@drawable/gerbil_happy" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_toEndOf="@id/file_view_unsupported_gerbil"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_centerVertical="true">
|
||||
android:layout_toEndOf="@id/file_view_unsupported_gerbil"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/unsupported_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/unsupported_content" />
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_unsupported_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/unsupported_content_desc"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textFontWeight="300"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/file_view_open_external_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/open" />
|
||||
android:text="@string/open"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@@ -173,31 +188,37 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<include layout="@layout/card_reward_driver"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
layout="@layout/card_reward_driver"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_title_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:clickable="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="4dp">
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_title_layout"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="48dp">
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_title"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -205,39 +226,42 @@
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_view_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_publish_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:textFontWeight="300" />
|
||||
android:textFontWeight="300"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_view_desc_toggle_arrow"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:layout_toStartOf="@+id/file_view_title_layout"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/foreground" />
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/file_view_title_layout"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -246,280 +270,308 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_share"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_share" />
|
||||
android:src="@drawable/ic_share"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/share"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_tip"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<io.lbry.browser.ui.controls.SolidIconView
|
||||
android:textColor="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="20dp"
|
||||
android:text="@string/fa_gift"/>
|
||||
android:text="@string/fa_gift"
|
||||
android:textColor="@color/foreground"
|
||||
android:textSize="20dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/support"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/support"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_repost"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<io.lbry.browser.ui.controls.SolidIconView
|
||||
android:textColor="@color/foreground"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textSize="20dp"
|
||||
android:text="@string/fa_repost"/>
|
||||
android:text="@string/fa_repost"
|
||||
android:textColor="@color/foreground"
|
||||
android:textSize="20dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/repost"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/repost"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_edit"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_edit" />
|
||||
android:src="@drawable/ic_edit"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/edit"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_download"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/file_view_download_progress"
|
||||
style="?android:progressBarStyleHorizontal"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
style="?android:progressBarStyleHorizontal"
|
||||
android:progressDrawable="@drawable/determinate_progress_circle"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_view_action_download_icon"
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_download" />
|
||||
android:src="@drawable/ic_download"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/download"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_delete"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_delete" />
|
||||
android:src="@drawable/ic_delete"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/delete"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_unpublish"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_unpublish" />
|
||||
android:src="@drawable/ic_unpublish"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/unpublish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/unpublish"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_action_report"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:tint="@color/foreground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_report" />
|
||||
android:src="@drawable/ic_report"
|
||||
app:tint="@color/foreground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/report"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/report"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:background="@color/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="0.5dp" />
|
||||
android:background="@color/divider" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_publisher_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_publisher_info_area"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="12dp"
|
||||
android:layout_toStartOf="@id/file_view_publisher_area_actions"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:layout_toStartOf="@id/file_view_publisher_area_actions">
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/file_view_publisher_avatar"
|
||||
android:layout_width="50dp"
|
||||
@@ -527,28 +579,31 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_channel_icon"
|
||||
android:id="@+id/file_view_publisher_no_thumbnail"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp">
|
||||
android:layout_height="50dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_channel_icon">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_publisher_thumbnail_alpha"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="24sp"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300" />
|
||||
android:textFontWeight="300"
|
||||
android:textSize="24sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_centerHorizontal="true"
|
||||
android:id="@+id/file_view_publisher_thumbnail"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
android:layout_height="50dp"
|
||||
android:layout_centerHorizontal="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -557,6 +612,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_publisher_title"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -565,6 +621,7 @@
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_publisher_name"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -580,18 +637,20 @@
|
||||
android:id="@+id/file_view_publisher_area_actions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_icon_follow"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true">
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -599,9 +658,9 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/follow"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
<io.lbry.browser.ui.controls.OutlineIconView
|
||||
android:layout_width="24dp"
|
||||
@@ -615,12 +674,12 @@
|
||||
|
||||
<io.lbry.browser.ui.controls.SolidIconView
|
||||
android:id="@+id/file_view_icon_unfollow"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:text="@string/fa_heart_broken"
|
||||
android:textColor="@color/foreground"
|
||||
android:textSize="20dp"
|
||||
@@ -628,23 +687,23 @@
|
||||
|
||||
<io.lbry.browser.ui.controls.SolidIconView
|
||||
android:id="@+id/file_view_icon_bell"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:text="@string/fa_bell_slash"
|
||||
android:textColor="@color/foreground"
|
||||
android:textSize="20dp"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:background="@color/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_height="0.5dp" />
|
||||
android:background="@color/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_description_area"
|
||||
@@ -702,22 +761,25 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/file_view_related_content_area"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp">
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/related_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textSize="16sp"
|
||||
android:layout_centerVertical="true" />
|
||||
android:text="@string/related_content"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/file_view_related_content_progress"
|
||||
android:layout_width="16dp"
|
||||
@@ -726,23 +788,25 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_view_no_related_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/no_related_content"
|
||||
android:textSize="14sp"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/file_view_related_content_list"
|
||||
android:overScrollMode="never"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -755,14 +819,15 @@
|
||||
android:id="@+id/file_view_comments_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="16dp"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/file_view_comments_progress"
|
||||
android:layout_width="16dp"
|
||||
@@ -787,8 +852,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter"
|
||||
android:text="@string/no_comments"
|
||||
android:textFontWeight="300"
|
||||
@@ -826,4 +891,4 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -82,7 +82,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -110,7 +110,7 @@
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_dropdown"
|
||||
android:tint="@color/foreground" />
|
||||
app:tint="@color/foreground" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.gallery.GalleryFragment">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_gallery"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_home"
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_record" />
|
||||
android:src="@drawable/ic_record"
|
||||
app:tint="@color/white" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -76,8 +76,8 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_photo" />
|
||||
android:src="@drawable/ic_photo"
|
||||
app:tint="@color/white" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -116,8 +116,8 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_upload" />
|
||||
android:src="@drawable/ic_upload"
|
||||
app:tint="@color/white" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/pageBackground">
|
||||
@@ -67,7 +68,7 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_share" />
|
||||
android:src="@drawable/ic_share"
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
@@ -118,7 +119,7 @@
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/nextLbryGreen" />
|
||||
app:tint="@color/nextLbryGreen" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
@@ -129,7 +130,7 @@
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/nextLbryGreen" />
|
||||
app:tint="@color/nextLbryGreen" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:layout_width="match_parent"
|
||||
@@ -40,7 +41,7 @@
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/nextLbryGreen" />
|
||||
app:tint="@color/nextLbryGreen" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:clickable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
@@ -23,9 +24,9 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:tint="@color/lbryGreen"
|
||||
android:src="@drawable/ic_check_circle"
|
||||
android:visibility="invisible" />
|
||||
android:visibility="invisible"
|
||||
app:tint="@color/lbryGreen" />
|
||||
<ProgressBar
|
||||
android:id="@+id/reward_item_loading"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<ImageView
|
||||
android:id="@+id/startup_stage_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_check"
|
||||
app:tint="@color/white" />
|
||||
<TextView
|
||||
android:id="@+id/startup_stage_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@font/inter"
|
||||
tools:text="@string/installation_id_loaded"
|
||||
android:textColor="@color/white"
|
||||
android:textFontWeight="300"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@@ -134,7 +135,7 @@
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/nextLbryGreen" />
|
||||
app:tint="@color/nextLbryGreen" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/claim_thumbnail_placeholder"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:clickable="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -18,7 +19,7 @@
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:tint="@color/darkForeground" />
|
||||
app:tint="@color/darkForeground" />
|
||||
<TextView
|
||||
android:id="@+id/tag_name"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -87,11 +87,20 @@
|
||||
<string name="comment_as">Comment as</string>
|
||||
<string name="please_enter_comment">Please enter a comment to post.</string>
|
||||
<string name="please_select_channel">Please select a channel to post your comment as.</string>
|
||||
<string name="comment_form_post">Post</string>
|
||||
<string name="comment_posted">Your comment was successfully posted.</string>
|
||||
<string name="please_select_repost_channel">Please select a channel to repost on.</string>
|
||||
<string name="reply">Reply</string>
|
||||
<string name="replying_to">Replying to %1$s</string>
|
||||
<string name="choose_app">Choose app</string>
|
||||
<plurals name="view_count">
|
||||
<item quantity="one">%1$s view</item>
|
||||
<item quantity="other">%1$s views</item>
|
||||
</plurals>
|
||||
<plurals name="confirm_purchase_message">
|
||||
<item quantity="one">This will purchase "%1$s" for %2$s credit</item>
|
||||
<item quantity="other">This will purchase "%1$s" for %2$s credits</item>
|
||||
</plurals>
|
||||
<plurals name="post_and_tip">
|
||||
<item quantity="one">Post and tip %1$s credit?</item>
|
||||
<item quantity="other">Post and tip %1$s credits?</item>
|
||||
@@ -104,14 +113,6 @@
|
||||
<item quantity="one">This will post your comment with a tip of %1$s credit for %2$s</item>
|
||||
<item quantity="other">This will post your comment with a tip of %1$s credits for %2$s</item>
|
||||
</plurals>
|
||||
<plurals name="view_count">
|
||||
<item quantity="one">%1$s view</item>
|
||||
<item quantity="other">%1$s views</item>
|
||||
</plurals>
|
||||
<plurals name="confirm_purchase_message">
|
||||
<item quantity="one">This will purchase "%1$s" for %2$s credit</item>
|
||||
<item quantity="other">This will purchase "%1$s" for %2$s credits</item>
|
||||
</plurals>
|
||||
|
||||
<!-- Channel view -->
|
||||
<string name="no_channel_info">There\'s nothing here yet.\nPlease check back later.</string>
|
||||
@@ -120,6 +121,8 @@
|
||||
<string name="reposted">reposted</string>
|
||||
<string name="receive_all_notifications">You will receive all notifications</string>
|
||||
<string name="receive_no_notifications">You will not receive notifications for this channel</string>
|
||||
<string name="confirm_unfollow">Stop following channel?</string>
|
||||
<string name="confirm_unfollow_message">Are you sure you want to stop following this channel?</string>
|
||||
<plurals name="follower_count">
|
||||
<item quantity="one">%1$s follower</item>
|
||||
<item quantity="other">%1$s followers</item>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package io.lbry.browser.utils;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class HelperTest extends TestCase {
|
||||
|
||||
public void testSHA256() {
|
||||
// Using a fake user id, which is a long.
|
||||
assertEquals("de9edb2044d012f04553e49b04d54cbec8e8a46a40ad5a19bc5dcce1da00ecfd", Helper.SHA256(String.valueOf(12345678912345L)));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user