SDK 0.73.1. Finish file view experience.
This commit is contained in:
parent
da4591fb2e
commit
103565d57c
63 changed files with 2608 additions and 319 deletions
|
@ -78,6 +78,8 @@ dependencies {
|
||||||
|
|
||||||
implementation 'com.hbb20:ccp:2.3.8'
|
implementation 'com.hbb20:ccp:2.3.8'
|
||||||
|
|
||||||
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.10'
|
compileOnly 'org.projectlombok:lombok:1.18.10'
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.18.10'
|
annotationProcessor 'org.projectlombok:lombok:1.18.10'
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||||
|
@ -86,8 +88,8 @@ dependencies {
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||||
|
|
||||||
__32bitImplementation files('libs/lbrysdk-0.72.0-release__arm.aar')
|
__32bitImplementation files('libs/lbrysdk-0.73.1-release__arm.aar')
|
||||||
__64bitImplementation files('libs/lbrysdk-0.72.0-release__arm64.aar')
|
__64bitImplementation files('libs/lbrysdk-0.73.1-release__arm64.aar')
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -80,5 +80,14 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="io.lbry.browser.LocalFileProvider"
|
||||||
|
android:authorities="io.lbry.browser.fileprovider"
|
||||||
|
android:grantUriPermissions="true"
|
||||||
|
android:exported="false">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/filepaths" />
|
||||||
|
</provider>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
File diff suppressed because it is too large
Load diff
7
app/src/main/java/io/lbry/browser/LocalFileProvider.java
Normal file
7
app/src/main/java/io/lbry/browser/LocalFileProvider.java
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package io.lbry.browser;
|
||||||
|
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
|
public class LocalFileProvider extends FileProvider {
|
||||||
|
|
||||||
|
}
|
|
@ -25,8 +25,11 @@ import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -96,12 +99,12 @@ import io.lbry.browser.model.WalletBalance;
|
||||||
import io.lbry.browser.model.WalletSync;
|
import io.lbry.browser.model.WalletSync;
|
||||||
import io.lbry.browser.model.lbryinc.Reward;
|
import io.lbry.browser.model.lbryinc.Reward;
|
||||||
import io.lbry.browser.model.lbryinc.Subscription;
|
import io.lbry.browser.model.lbryinc.Subscription;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ClaimListTask;
|
import io.lbry.browser.tasks.claim.ClaimListTask;
|
||||||
import io.lbry.browser.tasks.lbryinc.FetchRewardsTask;
|
import io.lbry.browser.tasks.lbryinc.FetchRewardsTask;
|
||||||
import io.lbry.browser.tasks.LighthouseAutoCompleteTask;
|
import io.lbry.browser.tasks.LighthouseAutoCompleteTask;
|
||||||
import io.lbry.browser.tasks.MergeSubscriptionsTask;
|
import io.lbry.browser.tasks.MergeSubscriptionsTask;
|
||||||
import io.lbry.browser.tasks.ResolveTask;
|
import io.lbry.browser.tasks.claim.ResolveTask;
|
||||||
import io.lbry.browser.tasks.wallet.DefaultSyncTaskHandler;
|
import io.lbry.browser.tasks.wallet.DefaultSyncTaskHandler;
|
||||||
import io.lbry.browser.tasks.wallet.LoadSharedUserStateTask;
|
import io.lbry.browser.tasks.wallet.LoadSharedUserStateTask;
|
||||||
import io.lbry.browser.tasks.wallet.SaveSharedUserStateTask;
|
import io.lbry.browser.tasks.wallet.SaveSharedUserStateTask;
|
||||||
|
@ -115,8 +118,9 @@ import io.lbry.browser.ui.channel.ChannelFragment;
|
||||||
import io.lbry.browser.ui.channel.ChannelManagerFragment;
|
import io.lbry.browser.ui.channel.ChannelManagerFragment;
|
||||||
import io.lbry.browser.ui.editorschoice.EditorsChoiceFragment;
|
import io.lbry.browser.ui.editorschoice.EditorsChoiceFragment;
|
||||||
import io.lbry.browser.ui.following.FollowingFragment;
|
import io.lbry.browser.ui.following.FollowingFragment;
|
||||||
|
import io.lbry.browser.ui.other.AboutFragment;
|
||||||
import io.lbry.browser.ui.search.SearchFragment;
|
import io.lbry.browser.ui.search.SearchFragment;
|
||||||
import io.lbry.browser.ui.settings.SettingsFragment;
|
import io.lbry.browser.ui.other.SettingsFragment;
|
||||||
import io.lbry.browser.ui.allcontent.AllContentFragment;
|
import io.lbry.browser.ui.allcontent.AllContentFragment;
|
||||||
import io.lbry.browser.ui.wallet.InvitesFragment;
|
import io.lbry.browser.ui.wallet.InvitesFragment;
|
||||||
import io.lbry.browser.ui.wallet.RewardsFragment;
|
import io.lbry.browser.ui.wallet.RewardsFragment;
|
||||||
|
@ -133,6 +137,8 @@ import lombok.Getter;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity implements SdkStatusListener {
|
public class MainActivity extends AppCompatActivity implements SdkStatusListener {
|
||||||
|
|
||||||
|
private Map<String, Class> specialRouteFragmentClassMap;
|
||||||
|
private boolean inPictureInPictureMode;
|
||||||
public static SimpleExoPlayer appPlayer;
|
public static SimpleExoPlayer appPlayer;
|
||||||
public static Claim nowPlayingClaim;
|
public static Claim nowPlayingClaim;
|
||||||
public static boolean startingFilePickerActivity = false;
|
public static boolean startingFilePickerActivity = false;
|
||||||
|
@ -141,24 +147,29 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
public static boolean startingSignInFlowActivity = false;
|
public static boolean startingSignInFlowActivity = false;
|
||||||
public static boolean mainActive = false;
|
public static boolean mainActive = false;
|
||||||
private boolean enteringPIPMode = false;
|
private boolean enteringPIPMode = false;
|
||||||
|
|
||||||
|
@Getter
|
||||||
private String firebaseMessagingToken;
|
private String firebaseMessagingToken;
|
||||||
|
|
||||||
private Map<String, Fragment> openNavFragments;
|
private Map<String, Fragment> openNavFragments;
|
||||||
private static final Map<Class, Integer> fragmentClassNavIdMap = new HashMap<>();
|
private static final Map<Class, Integer> fragmentClassNavIdMap = new HashMap<>();
|
||||||
static {
|
static {
|
||||||
fragmentClassNavIdMap.put(FollowingFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
fragmentClassNavIdMap.put(FollowingFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
||||||
fragmentClassNavIdMap.put(WalletFragment.class, NavMenuItem.ID_ITEM_WALLET);
|
fragmentClassNavIdMap.put(EditorsChoiceFragment.class, NavMenuItem.ID_ITEM_EDITORS_CHOICE);
|
||||||
fragmentClassNavIdMap.put(SettingsFragment.class, NavMenuItem.ID_ITEM_SETTINGS);
|
|
||||||
fragmentClassNavIdMap.put(AllContentFragment.class, NavMenuItem.ID_ITEM_ALL_CONTENT);
|
fragmentClassNavIdMap.put(AllContentFragment.class, NavMenuItem.ID_ITEM_ALL_CONTENT);
|
||||||
|
|
||||||
fragmentClassNavIdMap.put(ChannelManagerFragment.class, NavMenuItem.ID_ITEM_CHANNELS);
|
fragmentClassNavIdMap.put(ChannelManagerFragment.class, NavMenuItem.ID_ITEM_CHANNELS);
|
||||||
|
|
||||||
|
fragmentClassNavIdMap.put(WalletFragment.class, NavMenuItem.ID_ITEM_WALLET);
|
||||||
|
fragmentClassNavIdMap.put(RewardsFragment.class, NavMenuItem.ID_ITEM_REWARDS);
|
||||||
|
fragmentClassNavIdMap.put(InvitesFragment.class, NavMenuItem.ID_ITEM_INVITES);
|
||||||
|
|
||||||
|
fragmentClassNavIdMap.put(SettingsFragment.class, NavMenuItem.ID_ITEM_SETTINGS);
|
||||||
|
fragmentClassNavIdMap.put(AboutFragment.class, NavMenuItem.ID_ITEM_ABOUT);
|
||||||
|
|
||||||
// Internal (sub-)pages
|
// Internal (sub-)pages
|
||||||
fragmentClassNavIdMap.put(ChannelFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
fragmentClassNavIdMap.put(ChannelFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
||||||
fragmentClassNavIdMap.put(SearchFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
fragmentClassNavIdMap.put(SearchFragment.class, NavMenuItem.ID_ITEM_FOLLOWING);
|
||||||
|
|
||||||
//fragmentClassNavIdMap.put(ChannelFormFragment.class, NavMenuItem.ID_ITEM_CHANNELS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,6 +190,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
public static final String ACTION_NOW_PLAYING_CLAIM_CLEARED = "io.lbry.browser.Broadcast.NowPlayingClaimCleared";
|
public static final String ACTION_NOW_PLAYING_CLAIM_CLEARED = "io.lbry.browser.Broadcast.NowPlayingClaimCleared";
|
||||||
public static final String ACTION_OPEN_ALL_CONTENT_TAG = "io.lbry.browser.Broadcast.OpenAllContentTag";
|
public static final String ACTION_OPEN_ALL_CONTENT_TAG = "io.lbry.browser.Broadcast.OpenAllContentTag";
|
||||||
public static final String ACTION_WALLET_BALANCE_UPDATED = "io.lbry.browser.Broadcast.WalletBalanceUpdated";
|
public static final String ACTION_WALLET_BALANCE_UPDATED = "io.lbry.browser.Broadcast.WalletBalanceUpdated";
|
||||||
|
public static final String ACTION_OPEN_CHANNEL_URL = "io.lbry.browser.Broadcast.OpenChannelUrl";
|
||||||
|
public static final String ACTION_OPEN_WALLET_PAGE = "io.lbry.browser.Broadcast.OpenWalletPage";
|
||||||
|
public static final String ACTION_OPEN_REWARDS_PAGE = "io.lbry.browser.Broadcast.OpenRewardsPage";
|
||||||
|
public static final String ACTION_SAVE_SHARED_USER_STATE = "io.lbry.browser.Broadcast.SaveSharedUserState";
|
||||||
|
|
||||||
// preference keys
|
// preference keys
|
||||||
public static final String PREFERENCE_KEY_DARK_MODE = "io.lbry.browser.preference.userinterface.DarkMode";
|
public static final String PREFERENCE_KEY_DARK_MODE = "io.lbry.browser.preference.userinterface.DarkMode";
|
||||||
|
@ -236,6 +251,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
private boolean walletSyncScheduled;
|
private boolean walletSyncScheduled;
|
||||||
private String pendingAllContentTag;
|
private String pendingAllContentTag;
|
||||||
private String pendingChannelUrl;
|
private String pendingChannelUrl;
|
||||||
|
private boolean pendingOpenWalletPage;
|
||||||
|
private boolean pendingOpenRewardsPage;
|
||||||
private boolean pendingFollowingReload;
|
private boolean pendingFollowingReload;
|
||||||
|
|
||||||
// startup stages (to be able to determine how far a user made it if startup fails)
|
// startup stages (to be able to determine how far a user made it if startup fails)
|
||||||
|
@ -262,7 +279,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
NavMenuItem.ID_ITEM_REWARDS,
|
NavMenuItem.ID_ITEM_REWARDS,
|
||||||
NavMenuItem.ID_ITEM_INVITES,
|
NavMenuItem.ID_ITEM_INVITES,
|
||||||
|
|
||||||
NavMenuItem.ID_ITEM_SETTINGS
|
NavMenuItem.ID_ITEM_SETTINGS,
|
||||||
|
NavMenuItem.ID_ITEM_ABOUT
|
||||||
);
|
);
|
||||||
|
|
||||||
public boolean isDarkMode() {
|
public boolean isDarkMode() {
|
||||||
|
@ -281,6 +299,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
if (!isDarkMode()) {
|
if (!isDarkMode()) {
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
}
|
}
|
||||||
|
initSpecialRouteMap();
|
||||||
|
|
||||||
LbryAnalytics.init(this);
|
LbryAnalytics.init(this);
|
||||||
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
|
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
|
||||||
|
@ -346,6 +365,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
stopExoplayer();
|
stopExoplayer();
|
||||||
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
nowPlayingClaim = null;
|
nowPlayingClaim = null;
|
||||||
findViewById(R.id.global_now_playing_card).setVisibility(View.GONE);
|
findViewById(R.id.global_now_playing_card).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@ -400,6 +420,24 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initSpecialRouteMap() {
|
||||||
|
specialRouteFragmentClassMap = new HashMap<>();
|
||||||
|
specialRouteFragmentClassMap.put("about", AboutFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("allContent", AllContentFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("channels", ChannelManagerFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("invite", InvitesFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("invites", InvitesFragment.class);
|
||||||
|
//specialRouteFragmentClassMap.put("library", LibraryFragment.class);
|
||||||
|
//specialRouteFragmentClassMap.put("publish", PublishFragment.class);
|
||||||
|
//specialRouteFragmentClassMap.put("publishes", PublishesFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("following", FollowingFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("rewards", RewardsFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("settings", SettingsFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("subscriptions", FollowingFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("wallet", WalletFragment.class);
|
||||||
|
specialRouteFragmentClassMap.put("discover", FollowingFragment.class);
|
||||||
|
}
|
||||||
|
|
||||||
protected void onNewIntent(Intent intent) {
|
protected void onNewIntent(Intent intent) {
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
checkUrlIntent(intent);
|
checkUrlIntent(intent);
|
||||||
|
@ -471,6 +509,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
case NavMenuItem.ID_ITEM_SETTINGS:
|
case NavMenuItem.ID_ITEM_SETTINGS:
|
||||||
openFragment(SettingsFragment.class, true, NavMenuItem.ID_ITEM_SETTINGS);
|
openFragment(SettingsFragment.class, true, NavMenuItem.ID_ITEM_SETTINGS);
|
||||||
break;
|
break;
|
||||||
|
case NavMenuItem.ID_ITEM_ABOUT:
|
||||||
|
openFragment(AboutFragment.class, true, NavMenuItem.ID_ITEM_ABOUT);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -586,7 +627,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void stopExoplayer() {
|
public static void stopExoplayer() {
|
||||||
if (appPlayer != null) {
|
if (appPlayer != null) {
|
||||||
appPlayer.stop(true);
|
appPlayer.stop(true);
|
||||||
appPlayer.release();
|
appPlayer.release();
|
||||||
|
@ -612,6 +653,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
}
|
}
|
||||||
Lbry.walletBalance = walletBalance;
|
Lbry.walletBalance = walletBalance;
|
||||||
updateFloatingWalletBalance();
|
updateFloatingWalletBalance();
|
||||||
|
updateUsdWalletBalanceInNav();
|
||||||
|
|
||||||
sendBroadcast(new Intent(ACTION_WALLET_BALANCE_UPDATED));
|
sendBroadcast(new Intent(ACTION_WALLET_BALANCE_UPDATED));
|
||||||
}
|
}
|
||||||
|
@ -636,19 +678,34 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
serviceRunning = isServiceRunning(this, LbrynetService.class);
|
serviceRunning = isServiceRunning(this, LbrynetService.class);
|
||||||
if (!serviceRunning) {
|
if (!serviceRunning) {
|
||||||
Lbry.SDK_READY = false;
|
Lbry.SDK_READY = false;
|
||||||
|
findViewById(R.id.global_sdk_initializing_status).setVisibility(View.VISIBLE);
|
||||||
ServiceHelper.start(this, "", LbrynetService.class, "lbrynetservice");
|
ServiceHelper.start(this, "", LbrynetService.class, "lbrynetservice");
|
||||||
}
|
}
|
||||||
checkSdkReady();
|
checkSdkReady();
|
||||||
showSignedInUser();
|
showSignedInUser();
|
||||||
|
checkPendingOpens();
|
||||||
|
|
||||||
if (!Helper.isNullOrEmpty(pendingAllContentTag)) {
|
if (Lbry.SDK_READY) {
|
||||||
openAllContentFragmentWithTag(pendingAllContentTag);
|
findViewById(R.id.global_sdk_initializing_status).setVisibility(View.GONE);
|
||||||
pendingAllContentTag = null;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkPendingOpens() {
|
||||||
if (pendingFollowingReload) {
|
if (pendingFollowingReload) {
|
||||||
loadFollowingContent();
|
loadFollowingContent();
|
||||||
pendingFollowingReload = false;
|
pendingFollowingReload = false;
|
||||||
}
|
}
|
||||||
|
if (!Helper.isNullOrEmpty(pendingAllContentTag)) {
|
||||||
|
openAllContentFragmentWithTag(pendingAllContentTag);
|
||||||
|
pendingAllContentTag = null;
|
||||||
|
} else if (!Helper.isNullOrEmpty(pendingChannelUrl)) {
|
||||||
|
openChannelUrl(pendingChannelUrl);
|
||||||
|
pendingChannelUrl = null;
|
||||||
|
} else if (pendingOpenWalletPage) {
|
||||||
|
openFragment(WalletFragment.class, true, NavMenuItem.ID_ITEM_WALLET);
|
||||||
|
} else if (pendingOpenRewardsPage) {
|
||||||
|
openFragment(RewardsFragment.class, true, NavMenuItem.ID_ITEM_REWARDS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -679,7 +736,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
clearWunderbarFocus(view);
|
clearWunderbarFocus(view);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
findViewById(R.id.wunderbar).setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
|
||||||
|
EditText wunderbar = findViewById(R.id.wunderbar);
|
||||||
|
wunderbar.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View view, boolean hasFocus) {
|
public void onFocusChange(View view, boolean hasFocus) {
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
|
@ -693,7 +752,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
((EditText) findViewById(R.id.wunderbar)).addTextChangedListener(new TextWatcher() {
|
wunderbar.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
@ -711,6 +770,40 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
wunderbar.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_GO) {
|
||||||
|
String input = Helper.getValue(wunderbar.getText());
|
||||||
|
boolean handled = false;
|
||||||
|
if (input.startsWith(LbryUri.PROTO_DEFAULT) && !input.equalsIgnoreCase(LbryUri.PROTO_DEFAULT)) {
|
||||||
|
try {
|
||||||
|
LbryUri uri = LbryUri.parse(input);
|
||||||
|
if (uri.isChannel()) {
|
||||||
|
openChannelUrl(uri.toString());
|
||||||
|
clearWunderbarFocus(wunderbar);
|
||||||
|
handled = true;
|
||||||
|
} else {
|
||||||
|
openFileUrl(uri.toString(), MainActivity.this);
|
||||||
|
clearWunderbarFocus(wunderbar);
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
} catch (LbryUriException ex) {
|
||||||
|
// pass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!handled) {
|
||||||
|
// search
|
||||||
|
launchSearch(input);
|
||||||
|
clearWunderbarFocus(wunderbar);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
urlSuggestionListAdapter = new UrlSuggestionListAdapter(this);
|
urlSuggestionListAdapter = new UrlSuggestionListAdapter(this);
|
||||||
urlSuggestionListAdapter.setListener(new UrlSuggestionListAdapter.UrlSuggestionClickListener() {
|
urlSuggestionListAdapter.setListener(new UrlSuggestionListAdapter.UrlSuggestionClickListener() {
|
||||||
|
@ -942,6 +1035,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
playerView.setPlayer(null);
|
playerView.setPlayer(null);
|
||||||
playerView.setPlayer(appPlayer);
|
playerView.setPlayer(appPlayer);
|
||||||
playerView.setUseController(false);
|
playerView.setUseController(false);
|
||||||
|
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1014,6 +1109,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
checkSyncedWallet();
|
checkSyncedWallet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
findViewById(R.id.global_sdk_initializing_status).setVisibility(View.GONE);
|
||||||
scheduleWalletBalanceUpdate();
|
scheduleWalletBalanceUpdate();
|
||||||
scheduleWalletSyncTask();
|
scheduleWalletSyncTask();
|
||||||
fetchChannels();
|
fetchChannels();
|
||||||
|
@ -1045,6 +1141,16 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateUsdWalletBalanceInNav() {
|
||||||
|
double usdBalance = Lbry.walletBalance.getAvailable().doubleValue() * Lbryio.LBCUSDRate;
|
||||||
|
if (navMenuAdapter != null) {
|
||||||
|
navMenuAdapter.setExtraLabelForItem(
|
||||||
|
NavMenuItem.ID_ITEM_WALLET,
|
||||||
|
Lbryio.LBCUSDRate > 0 ? String.format("$%s", Helper.USD_CURRENCY_FORMAT.format(usdBalance)) : null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateFloatingWalletBalance() {
|
private void updateFloatingWalletBalance() {
|
||||||
if (!hasLoadedFirstBalance) {
|
if (!hasLoadedFirstBalance) {
|
||||||
findViewById(R.id.floating_balance_loading).setVisibility(View.GONE);
|
findViewById(R.id.floating_balance_loading).setVisibility(View.GONE);
|
||||||
|
@ -1222,18 +1328,30 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
private void registerRequestsReceiver() {
|
private void registerRequestsReceiver() {
|
||||||
IntentFilter intentFilter = new IntentFilter();
|
IntentFilter intentFilter = new IntentFilter();
|
||||||
intentFilter.addAction(ACTION_AUTH_TOKEN_GENERATED);
|
intentFilter.addAction(ACTION_AUTH_TOKEN_GENERATED);
|
||||||
intentFilter.addAction(ACTION_OPEN_ALL_CONTENT_TAG);
|
|
||||||
intentFilter.addAction(ACTION_USER_SIGN_IN_SUCCESS);
|
intentFilter.addAction(ACTION_USER_SIGN_IN_SUCCESS);
|
||||||
|
intentFilter.addAction(ACTION_OPEN_ALL_CONTENT_TAG);
|
||||||
|
intentFilter.addAction(ACTION_OPEN_CHANNEL_URL);
|
||||||
|
intentFilter.addAction(ACTION_OPEN_WALLET_PAGE);
|
||||||
|
intentFilter.addAction(ACTION_OPEN_REWARDS_PAGE);
|
||||||
|
intentFilter.addAction(ACTION_SAVE_SHARED_USER_STATE);
|
||||||
requestsReceiver = new BroadcastReceiver() {
|
requestsReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
if (ACTION_AUTH_TOKEN_GENERATED.equalsIgnoreCase(action)) {
|
if (ACTION_AUTH_TOKEN_GENERATED.equalsIgnoreCase(action)) {
|
||||||
handleAuthTokenGenerated(intent);
|
handleAuthTokenGenerated(intent);
|
||||||
} else if (ACTION_OPEN_ALL_CONTENT_TAG.equalsIgnoreCase(action)) {
|
|
||||||
handleOpenContentTag(intent);
|
|
||||||
} else if (ACTION_USER_SIGN_IN_SUCCESS.equalsIgnoreCase(action)) {
|
} else if (ACTION_USER_SIGN_IN_SUCCESS.equalsIgnoreCase(action)) {
|
||||||
handleUserSignInSuccess(intent);
|
handleUserSignInSuccess(intent);
|
||||||
|
} else if (ACTION_OPEN_ALL_CONTENT_TAG.equalsIgnoreCase(action)) {
|
||||||
|
handleOpenContentTag(intent);
|
||||||
|
} else if (ACTION_OPEN_CHANNEL_URL.equalsIgnoreCase(action)) {
|
||||||
|
handleOpenChannelUrl(intent);
|
||||||
|
} else if (ACTION_OPEN_WALLET_PAGE.equalsIgnoreCase(action)) {
|
||||||
|
pendingOpenWalletPage = true;
|
||||||
|
} else if (ACTION_OPEN_REWARDS_PAGE.equalsIgnoreCase(action)) {
|
||||||
|
pendingOpenRewardsPage = true;
|
||||||
|
} else if (ACTION_SAVE_SHARED_USER_STATE.equalsIgnoreCase(action)) {
|
||||||
|
saveSharedUserState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1253,7 +1371,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
private void handleUserSignInSuccess(Intent intent) {
|
private void handleUserSignInSuccess(Intent intent) {
|
||||||
pendingFollowingReload = true;
|
pendingFollowingReload = true;
|
||||||
}
|
}
|
||||||
private void handleOpenChannelUrl(String url) {
|
private void handleOpenChannelUrl(Intent intent) {
|
||||||
|
String url = intent.getStringExtra("url");
|
||||||
pendingChannelUrl = url;
|
pendingChannelUrl = url;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1294,6 +1413,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
findViewById(R.id.global_now_playing_card).setVisibility(View.GONE);
|
findViewById(R.id.global_now_playing_card).setVisibility(View.GONE);
|
||||||
((TextView) findViewById(R.id.global_now_playing_title)).setText(null);
|
((TextView) findViewById(R.id.global_now_playing_title)).setText(null);
|
||||||
((TextView) findViewById(R.id.global_now_playing_channel_title)).setText(null);
|
((TextView) findViewById(R.id.global_now_playing_channel_title)).setText(null);
|
||||||
|
if (MainActivity.appPlayer != null) {
|
||||||
|
MainActivity.appPlayer.setPlayWhenReady(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
registerReceiver(userActionsReceiver, intentFilter);
|
registerReceiver(userActionsReceiver, intentFilter);
|
||||||
|
@ -1592,6 +1714,13 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
|
|
||||||
if (Lbryio.totalUnclaimedRewardAmount > 0) {
|
if (Lbryio.totalUnclaimedRewardAmount > 0) {
|
||||||
showFloatingUnclaimedRewards();
|
showFloatingUnclaimedRewards();
|
||||||
|
double usdRewardAmount = Lbryio.totalUnclaimedRewardAmount * Lbryio.LBCUSDRate;
|
||||||
|
if (navMenuAdapter != null) {
|
||||||
|
navMenuAdapter.setExtraLabelForItem(
|
||||||
|
NavMenuItem.ID_ITEM_REWARDS,
|
||||||
|
Lbryio.LBCUSDRate > 0 ? String.format("$%s", Helper.USD_CURRENCY_FORMAT.format(usdRewardAmount)) : null
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1620,9 +1749,15 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
String url = data.toString();
|
String url = data.toString();
|
||||||
// check special urls
|
// check special urls
|
||||||
if (url.startsWith("lbry://?")) {
|
if (url.startsWith("lbry://?")) {
|
||||||
String pagePath = url.substring(8);
|
String specialPath = url.substring(8);
|
||||||
|
if (specialRouteFragmentClassMap.containsKey(specialPath)) {
|
||||||
|
Class fragmentClass = specialRouteFragmentClassMap.get(specialPath);
|
||||||
|
if (fragmentClassNavIdMap.containsKey(fragmentClass)) {
|
||||||
|
openFragment(specialRouteFragmentClassMap.get(specialPath), true, fragmentClassNavIdMap.get(fragmentClass));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Handle special page paths
|
// unrecognised path will open the following by default
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
LbryUri uri = LbryUri.parse(url);
|
LbryUri uri = LbryUri.parse(url);
|
||||||
|
@ -1770,10 +1905,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
));
|
));
|
||||||
|
|
||||||
yourContentGroup.setItems(Arrays.asList(
|
yourContentGroup.setItems(Arrays.asList(
|
||||||
new NavMenuItem(NavMenuItem.ID_ITEM_NEW_PUBLISH, R.string.fa_upload, R.string.new_publish, "NewPublish", context),
|
//new NavMenuItem(NavMenuItem.ID_ITEM_NEW_PUBLISH, R.string.fa_upload, R.string.new_publish, "NewPublish", context),
|
||||||
new NavMenuItem(NavMenuItem.ID_ITEM_CHANNELS, R.string.fa_at, R.string.channels, "Channels", context),
|
new NavMenuItem(NavMenuItem.ID_ITEM_CHANNELS, R.string.fa_at, R.string.channels, "Channels", context)
|
||||||
new NavMenuItem(NavMenuItem.ID_ITEM_LIBRARY, R.string.fa_download, R.string.library, "Library", context),
|
//new NavMenuItem(NavMenuItem.ID_ITEM_LIBRARY, R.string.fa_download, R.string.library, "Library", context)
|
||||||
new NavMenuItem(NavMenuItem.ID_ITEM_PUBLISHES, R.string.fa_cloud_upload, R.string.publishes, "Publishes", context)
|
//new NavMenuItem(NavMenuItem.ID_ITEM_PUBLISHES, R.string.fa_cloud_upload, R.string.publishes, "Publishes", context)
|
||||||
));
|
));
|
||||||
|
|
||||||
walletGroup.setItems(Arrays.asList(
|
walletGroup.setItems(Arrays.asList(
|
||||||
|
@ -1837,7 +1972,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
|
|
||||||
// TODO: Broadcast startup status changes
|
// TODO: Broadcast startup status changes
|
||||||
JSONObject startupStatus = status.getJSONObject("startup_status");
|
JSONObject startupStatus = status.getJSONObject("startup_status");
|
||||||
sdkReady = startupStatus.getBoolean("stream_manager") && startupStatus.getBoolean("wallet");
|
sdkReady = startupStatus.getBoolean("file_manager") && startupStatus.getBoolean("wallet");
|
||||||
}
|
}
|
||||||
} catch (ConnectException ex) {
|
} catch (ConnectException ex) {
|
||||||
// pass
|
// pass
|
||||||
|
@ -1921,6 +2056,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
|
||||||
|
inPictureInPictureMode = isInPictureInPictureMode;
|
||||||
enteringPIPMode = false;
|
enteringPIPMode = false;
|
||||||
if (isInPictureInPictureMode) {
|
if (isInPictureInPictureMode) {
|
||||||
// Hide the full-screen UI (controls, etc.) while in picture-in-picture mode.
|
// Hide the full-screen UI (controls, etc.) while in picture-in-picture mode.
|
||||||
|
@ -1932,10 +2068,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (!MainActivity.startingFileViewActivity && appPlayer != null && inPictureInPictureMode) {
|
||||||
if (!MainActivity.startingFileViewActivity && appPlayer != null && isInPictureInPictureMode()) {
|
appPlayer.setPlayWhenReady(false);
|
||||||
appPlayer.setPlayWhenReady(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
super.onStop();
|
super.onStop();
|
||||||
}
|
}
|
||||||
|
@ -2044,5 +2178,4 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
public static boolean hasPermission(String permission, Context context) {
|
public static boolean hasPermission(String permission, Context context) {
|
||||||
return (ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED);
|
return (ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import java.util.List;
|
||||||
import io.lbry.browser.R;
|
import io.lbry.browser.R;
|
||||||
import io.lbry.browser.model.NavMenuItem;
|
import io.lbry.browser.model.NavMenuItem;
|
||||||
import io.lbry.browser.ui.controls.SolidIconView;
|
import io.lbry.browser.ui.controls.SolidIconView;
|
||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@ -44,6 +45,16 @@ public class NavigationMenuAdapter extends RecyclerView.Adapter<NavigationMenuAd
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setExtraLabelForItem(int id, String extraLabel) {
|
||||||
|
for (NavMenuItem item : menuItems) {
|
||||||
|
if (item.getId() == id) {
|
||||||
|
item.setExtraLabel(extraLabel);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
public void setCurrentItem(NavMenuItem currentItem) {
|
public void setCurrentItem(NavMenuItem currentItem) {
|
||||||
this.currentItem = currentItem;
|
this.currentItem = currentItem;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
@ -84,7 +95,8 @@ public class NavigationMenuAdapter extends RecyclerView.Adapter<NavigationMenuAd
|
||||||
public void onBindViewHolder(ViewHolder vh, int position) {
|
public void onBindViewHolder(ViewHolder vh, int position) {
|
||||||
int type = getItemViewType(position);
|
int type = getItemViewType(position);
|
||||||
NavMenuItem item = menuItems.get(position);
|
NavMenuItem item = menuItems.get(position);
|
||||||
vh.titleView.setText(item.getTitle());
|
String displayTitle = !Helper.isNullOrEmpty(item.getExtraLabel()) ? String.format("%s (%s)", item.getTitle(), item.getExtraLabel()) : item.getTitle();
|
||||||
|
vh.titleView.setText(displayTitle);
|
||||||
if (type == TYPE_ITEM && vh.iconView != null) {
|
if (type == TYPE_ITEM && vh.iconView != null) {
|
||||||
vh.iconView.setText(item.getIcon());
|
vh.iconView.setText(item.getIcon());
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,290 @@
|
||||||
|
package io.lbry.browser.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.widget.AppCompatSpinner;
|
||||||
|
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.lbry.browser.FileViewActivity;
|
||||||
|
import io.lbry.browser.MainActivity;
|
||||||
|
import io.lbry.browser.R;
|
||||||
|
import io.lbry.browser.adapter.InlineChannelSpinnerAdapter;
|
||||||
|
import io.lbry.browser.listener.WalletBalanceListener;
|
||||||
|
import io.lbry.browser.model.Claim;
|
||||||
|
import io.lbry.browser.model.WalletBalance;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimListTask;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimResultHandler;
|
||||||
|
import io.lbry.browser.tasks.claim.StreamRepostTask;
|
||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
import io.lbry.browser.utils.LbryUri;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
public class RepostClaimDialogFragment extends BottomSheetDialogFragment implements WalletBalanceListener {
|
||||||
|
public static final String TAG = "RepostClaimDialog";
|
||||||
|
|
||||||
|
private MaterialButton buttonRepost;
|
||||||
|
private View linkCancel;
|
||||||
|
private TextInputEditText inputDeposit;
|
||||||
|
private View inlineBalanceContainer;
|
||||||
|
private TextView inlineBalanceValue;
|
||||||
|
private ProgressBar repostProgress;
|
||||||
|
private TextView textTitle;
|
||||||
|
|
||||||
|
private AppCompatSpinner channelSpinner;
|
||||||
|
private InlineChannelSpinnerAdapter channelSpinnerAdapter;
|
||||||
|
private TextView textNamePrefix;
|
||||||
|
private EditText inputName;
|
||||||
|
private TextView linkToggleAdvanced;
|
||||||
|
private View advancedContainer;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
private RepostClaimListener listener;
|
||||||
|
@Setter
|
||||||
|
private Claim claim;
|
||||||
|
|
||||||
|
public static RepostClaimDialogFragment newInstance() {
|
||||||
|
return new RepostClaimDialogFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.dialog_repost_claim, container, false);
|
||||||
|
|
||||||
|
buttonRepost = view.findViewById(R.id.repost_button);
|
||||||
|
linkCancel = view.findViewById(R.id.repost_cancel_link);
|
||||||
|
inputDeposit = view.findViewById(R.id.repost_input_deposit);
|
||||||
|
inlineBalanceContainer = view.findViewById(R.id.repost_inline_balance_container);
|
||||||
|
inlineBalanceValue = view.findViewById(R.id.repost_inline_balance_value);
|
||||||
|
repostProgress = view.findViewById(R.id.repost_progress);
|
||||||
|
textTitle = view.findViewById(R.id.repost_title);
|
||||||
|
|
||||||
|
channelSpinner = view.findViewById(R.id.repost_channel_spinner);
|
||||||
|
textNamePrefix = view.findViewById(R.id.repost_name_prefix);
|
||||||
|
inputName = view.findViewById(R.id.repost_name_input);
|
||||||
|
linkToggleAdvanced = view.findViewById(R.id.repost_toggle_advanced);
|
||||||
|
advancedContainer = view.findViewById(R.id.repost_advanced_container);
|
||||||
|
|
||||||
|
textTitle.setText(getString(R.string.repost_title, claim.getTitle()));
|
||||||
|
inputName.setText(claim.getName());
|
||||||
|
inputDeposit.setText(R.string.min_repost_deposit);
|
||||||
|
channelSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long l) {
|
||||||
|
Object item = adapterView.getItemAtPosition(position);
|
||||||
|
if (item instanceof Claim) {
|
||||||
|
Claim claim = (Claim) item;
|
||||||
|
textNamePrefix.setText(String.format("%s%s/", LbryUri.PROTO_DEFAULT, claim.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
inputDeposit.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View view, boolean hasFocus) {
|
||||||
|
inputDeposit.setHint(hasFocus ? getString(R.string.zero) : "");
|
||||||
|
inlineBalanceContainer.setVisibility(hasFocus ? View.VISIBLE : View.INVISIBLE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
linkCancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
linkToggleAdvanced.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (advancedContainer.getVisibility() != View.VISIBLE) {
|
||||||
|
advancedContainer.setVisibility(View.VISIBLE);
|
||||||
|
linkToggleAdvanced.setText(R.string.hide_advanced);
|
||||||
|
} else {
|
||||||
|
advancedContainer.setVisibility(View.GONE);
|
||||||
|
linkToggleAdvanced.setText(R.string.show_advanced);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonRepost.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
validateAndRepostClaim();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
onWalletBalanceUpdated(Lbry.walletBalance);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
Context context = getContext();
|
||||||
|
if (context instanceof FileViewActivity) {
|
||||||
|
((FileViewActivity) context).addWalletBalanceListener(this);
|
||||||
|
}
|
||||||
|
fetchChannels();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onPause() {
|
||||||
|
Context context = getContext();
|
||||||
|
if (context instanceof FileViewActivity) {
|
||||||
|
((FileViewActivity) context).removeWalletBalanceListener(this);
|
||||||
|
}
|
||||||
|
inputDeposit.clearFocus();
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void fetchChannels() {
|
||||||
|
if (Lbry.ownChannels == null || Lbry.ownChannels.size() == 0) {
|
||||||
|
startLoading();
|
||||||
|
ClaimListTask task = new ClaimListTask(Claim.TYPE_CHANNEL, repostProgress, new ClaimListResultHandler() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<Claim> claims) {
|
||||||
|
Lbry.ownChannels = new ArrayList<>(claims);
|
||||||
|
loadChannels(claims);
|
||||||
|
finishLoading();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception error) {
|
||||||
|
// could not fetch channels
|
||||||
|
Context context = getContext();
|
||||||
|
if (context instanceof FileViewActivity) {
|
||||||
|
((FileViewActivity) context).showError(error.getMessage());
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
} else {
|
||||||
|
loadChannels(Lbry.ownChannels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadChannels(List<Claim> channels) {
|
||||||
|
if (channelSpinnerAdapter == null) {
|
||||||
|
Context context = getContext();
|
||||||
|
channelSpinnerAdapter = new InlineChannelSpinnerAdapter(context, R.layout.spinner_item_channel, channels);
|
||||||
|
channelSpinner.setAdapter(channelSpinnerAdapter);
|
||||||
|
channelSpinnerAdapter.notifyDataSetChanged();
|
||||||
|
} else {
|
||||||
|
channelSpinnerAdapter.clear();
|
||||||
|
channelSpinnerAdapter.addAll(channels);
|
||||||
|
channelSpinnerAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWalletBalanceUpdated(WalletBalance walletBalance) {
|
||||||
|
if (walletBalance != null && inlineBalanceValue != null) {
|
||||||
|
inlineBalanceValue.setText(Helper.shortCurrencyFormat(walletBalance.getAvailable().doubleValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateAndRepostClaim() {
|
||||||
|
String name = Helper.getValue(inputName.getText());
|
||||||
|
if (Helper.isNullOrEmpty(name) || !LbryUri.isNameValid(name)) {
|
||||||
|
showError(getString(R.string.repost_name_invalid_characters));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String depositString = Helper.getValue(inputDeposit.getText());
|
||||||
|
if (Helper.isNullOrEmpty(depositString)) {
|
||||||
|
showError(getString(R.string.invalid_amount));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal bid = new BigDecimal(depositString);
|
||||||
|
if (bid.doubleValue() > Lbry.walletBalance.getAvailable().doubleValue()) {
|
||||||
|
showError(getString(R.string.insufficient_balance));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Claim channel = (Claim) channelSpinner.getSelectedItem();
|
||||||
|
StreamRepostTask task = new StreamRepostTask(name, bid, claim.getClaimId(), channel.getClaimId(), repostProgress, new ClaimResultHandler() {
|
||||||
|
@Override
|
||||||
|
public void beforeStart() {
|
||||||
|
startLoading();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Claim claimResult) {
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onClaimReposted(claimResult);
|
||||||
|
}
|
||||||
|
finishLoading();
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception error) {
|
||||||
|
showError(error.getMessage());
|
||||||
|
finishLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showError(String message) {
|
||||||
|
Snackbar.make(getView(), message, Snackbar.LENGTH_LONG).
|
||||||
|
setBackgroundTint(Color.RED).
|
||||||
|
setTextColor(Color.WHITE).
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startLoading() {
|
||||||
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.setCanceledOnTouchOutside(false);
|
||||||
|
}
|
||||||
|
linkCancel.setEnabled(false);
|
||||||
|
buttonRepost.setEnabled(false);
|
||||||
|
inputName.setEnabled(false);
|
||||||
|
channelSpinner.setEnabled(false);
|
||||||
|
linkToggleAdvanced.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
private void finishLoading() {
|
||||||
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.setCanceledOnTouchOutside(true);
|
||||||
|
}
|
||||||
|
linkCancel.setEnabled(true);
|
||||||
|
buttonRepost.setEnabled(true);
|
||||||
|
inputName.setEnabled(true);
|
||||||
|
channelSpinner.setEnabled(true);
|
||||||
|
linkToggleAdvanced.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface RepostClaimListener {
|
||||||
|
void onClaimReposted(Claim claim);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
package io.lbry.browser.dialog;
|
package io.lbry.browser.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
|
@ -21,6 +23,7 @@ import com.google.android.material.textfield.TextInputEditText;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
|
import io.lbry.browser.FileViewActivity;
|
||||||
import io.lbry.browser.MainActivity;
|
import io.lbry.browser.MainActivity;
|
||||||
import io.lbry.browser.R;
|
import io.lbry.browser.R;
|
||||||
import io.lbry.browser.listener.WalletBalanceListener;
|
import io.lbry.browser.listener.WalletBalanceListener;
|
||||||
|
@ -52,12 +55,18 @@ public class SendTipDialogFragment extends BottomSheetDialogFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disableControls() {
|
private void disableControls() {
|
||||||
getDialog().setCanceledOnTouchOutside(false);
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.setCanceledOnTouchOutside(false);
|
||||||
|
}
|
||||||
sendButton.setEnabled(false);
|
sendButton.setEnabled(false);
|
||||||
cancelLink.setEnabled(false);
|
cancelLink.setEnabled(false);
|
||||||
}
|
}
|
||||||
private void enableControls() {
|
private void enableControls() {
|
||||||
getDialog().setCanceledOnTouchOutside(true);
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.setCanceledOnTouchOutside(true);
|
||||||
|
}
|
||||||
sendButton.setEnabled(true);
|
sendButton.setEnabled(true);
|
||||||
cancelLink.setEnabled(true);
|
cancelLink.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
@ -155,15 +164,15 @@ public class SendTipDialogFragment extends BottomSheetDialogFragment implements
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
if (context instanceof MainActivity) {
|
if (context instanceof FileViewActivity) {
|
||||||
((MainActivity) context).addWalletBalanceListener(this);
|
((FileViewActivity) context).addWalletBalanceListener(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
if (context instanceof MainActivity) {
|
if (context instanceof FileViewActivity) {
|
||||||
((MainActivity) context).removeWalletBalanceListener(this);
|
((FileViewActivity) context).removeWalletBalanceListener(this);
|
||||||
}
|
}
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
@ -176,8 +185,10 @@ public class SendTipDialogFragment extends BottomSheetDialogFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showError(String message) {
|
private void showError(String message) {
|
||||||
Snackbar.make(getView(), message, Snackbar.LENGTH_LONG).setBackgroundTint(
|
Snackbar.make(getView(), message, Snackbar.LENGTH_LONG).
|
||||||
ContextCompat.getColor(getContext(), R.color.red)).show();
|
setBackgroundTint(Color.RED).
|
||||||
|
setTextColor(Color.WHITE).
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface SendTipListener {
|
public interface SendTipListener {
|
||||||
|
|
|
@ -79,7 +79,57 @@ public class Claim {
|
||||||
private String repostChannelUrl;
|
private String repostChannelUrl;
|
||||||
private boolean isChannelSignatureValid;
|
private boolean isChannelSignatureValid;
|
||||||
private GenericMetadata value;
|
private GenericMetadata value;
|
||||||
private File file; // associated file if it exists
|
private LbryFile file; // associated file if it exists
|
||||||
|
|
||||||
|
public static Claim claimFromOutput(JSONObject item) {
|
||||||
|
// we only need name, permanent_url, txid and nout
|
||||||
|
Claim claim = new Claim();
|
||||||
|
claim.setClaimId(Helper.getJSONString("claim_id", null, item));
|
||||||
|
claim.setName(Helper.getJSONString("name", null, item));
|
||||||
|
claim.setPermanentUrl(Helper.getJSONString("permanent_url", null, item));
|
||||||
|
claim.setTxid(Helper.getJSONString("txid", null, item));
|
||||||
|
claim.setNout(Helper.getJSONInt("nout", -1, item));
|
||||||
|
return claim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFree() {
|
||||||
|
if (!(value instanceof StreamMetadata)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Fee fee = ((StreamMetadata) value).getFee();
|
||||||
|
return fee == null || Helper.parseDouble(fee.getAmount(), 0) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMediaType() {
|
||||||
|
if (value instanceof StreamMetadata) {
|
||||||
|
StreamMetadata metadata = (StreamMetadata) value;
|
||||||
|
String mediaType = metadata.getSource() != null ? metadata.getSource().getMediaType() : null;
|
||||||
|
return mediaType;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPlayable() {
|
||||||
|
if (value instanceof StreamMetadata) {
|
||||||
|
StreamMetadata metadata = (StreamMetadata) value;
|
||||||
|
String mediaType = metadata.getSource() != null ? metadata.getSource().getMediaType() : null;
|
||||||
|
if (mediaType != null) {
|
||||||
|
return mediaType.startsWith("video") || mediaType.startsWith("audio");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public boolean isViewable() {
|
||||||
|
if (value instanceof StreamMetadata) {
|
||||||
|
StreamMetadata metadata = (StreamMetadata) value;
|
||||||
|
String mediaType = metadata.getSource() != null ? metadata.getSource().getMediaType() : null;
|
||||||
|
if (mediaType != null) {
|
||||||
|
return mediaType.startsWith("image") || mediaType.startsWith("text");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public String getThumbnailUrl() {
|
public String getThumbnailUrl() {
|
||||||
if (value != null && value.getThumbnail() != null) {
|
if (value != null && value.getThumbnail() != null) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.lang.reflect.Type;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class File {
|
public class LbryFile {
|
||||||
private Claim.StreamMetadata metadata;
|
private Claim.StreamMetadata metadata;
|
||||||
private long addedOn;
|
private long addedOn;
|
||||||
private int blobsCompleted;
|
private int blobsCompleted;
|
||||||
|
@ -44,11 +44,11 @@ public class File {
|
||||||
private String txid;
|
private String txid;
|
||||||
private long writtenBytes;
|
private long writtenBytes;
|
||||||
|
|
||||||
public static File fromJSONObject(JSONObject fileObject) {
|
public static LbryFile fromJSONObject(JSONObject fileObject) {
|
||||||
String fileJson = fileObject.toString();
|
String fileJson = fileObject.toString();
|
||||||
Type type = new TypeToken<File>(){}.getType();
|
Type type = new TypeToken<LbryFile>(){}.getType();
|
||||||
Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
|
Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
|
||||||
File file = gson.fromJson(fileJson, type);
|
LbryFile file = gson.fromJson(fileJson, type);
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,6 +14,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import io.lbry.browser.exceptions.ApiCallException;
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimResultHandler;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ public class ChannelCreateUpdateTask extends AsyncTask<Void, Void, Claim> {
|
||||||
for (int i = 0; i < outputs.length(); i++) {
|
for (int i = 0; i < outputs.length(); i++) {
|
||||||
JSONObject output = outputs.getJSONObject(i);
|
JSONObject output = outputs.getJSONObject(i);
|
||||||
if (output.has("claim_id") && output.has("claim_op")) {
|
if (output.has("claim_id") && output.has("claim_op")) {
|
||||||
claimResult = claimFromResult(output);
|
claimResult = Claim.claimFromOutput(output);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,17 +78,6 @@ public class ChannelCreateUpdateTask extends AsyncTask<Void, Void, Claim> {
|
||||||
return claimResult;
|
return claimResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Claim claimFromResult(JSONObject item) {
|
|
||||||
// we only need name, permanent_url, txid and nout
|
|
||||||
Claim claim = new Claim();
|
|
||||||
claim.setClaimId(Helper.getJSONString("claim_id", null, item));
|
|
||||||
claim.setName(Helper.getJSONString("name", null, item));
|
|
||||||
claim.setPermanentUrl(Helper.getJSONString("permanent_url", null, item));
|
|
||||||
claim.setTxid(Helper.getJSONString("txid", null, item));
|
|
||||||
claim.setNout(Helper.getJSONInt("nout", -1, item));
|
|
||||||
return claim;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onPostExecute(Claim result) {
|
protected void onPostExecute(Claim result) {
|
||||||
Helper.setViewVisibility(progressView, View.GONE);
|
Helper.setViewVisibility(progressView, View.GONE);
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import java.util.List;
|
||||||
import io.lbry.browser.exceptions.LbryRequestException;
|
import io.lbry.browser.exceptions.LbryRequestException;
|
||||||
import io.lbry.browser.exceptions.LbryResponseException;
|
import io.lbry.browser.exceptions.LbryResponseException;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lighthouse;
|
import io.lbry.browser.utils.Lighthouse;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.view.View;
|
import android.view.View;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.view.View;
|
import android.view.View;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -8,6 +8,7 @@ import java.util.List;
|
||||||
|
|
||||||
import io.lbry.browser.exceptions.ApiCallException;
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
package io.lbry.browser.tasks.claim;
|
||||||
|
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
|
import io.lbry.browser.model.Claim;
|
||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
|
public class StreamRepostTask extends AsyncTask<Void, Void, Claim> {
|
||||||
|
private String name;
|
||||||
|
private BigDecimal bid;
|
||||||
|
private String claimId;
|
||||||
|
private String channelId;
|
||||||
|
private View progressView;
|
||||||
|
private ClaimResultHandler handler;
|
||||||
|
private Exception error;
|
||||||
|
|
||||||
|
public StreamRepostTask(String name, BigDecimal bid, String claimId, String channelId, View progressView, ClaimResultHandler handler) {
|
||||||
|
this.name = name;
|
||||||
|
this.bid = bid;
|
||||||
|
this.claimId = claimId;
|
||||||
|
this.channelId = channelId;
|
||||||
|
this.progressView = progressView;
|
||||||
|
this.handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Claim doInBackground(Void... params) {
|
||||||
|
Claim claimResult = null;
|
||||||
|
try {
|
||||||
|
Map<String, Object> options = new HashMap<>();
|
||||||
|
options.put("name", name);
|
||||||
|
options.put("bid", new DecimalFormat(Helper.SDK_AMOUNT_FORMAT).format(bid.doubleValue()));
|
||||||
|
options.put("claim_id", claimId);
|
||||||
|
options.put("channel_id", channelId);
|
||||||
|
|
||||||
|
JSONObject result = (JSONObject) Lbry.genericApiCall(Lbry.METHOD_STREAM_REPOST, options);
|
||||||
|
if (result.has("outputs")) {
|
||||||
|
JSONArray outputs = result.getJSONArray("outputs");
|
||||||
|
for (int i = 0; i < outputs.length(); i++) {
|
||||||
|
JSONObject output = outputs.getJSONObject(i);
|
||||||
|
if (output.has("claim_id") && output.has("claim_op")) {
|
||||||
|
claimResult = Claim.claimFromOutput(output);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ApiCallException | ClassCastException | JSONException ex) {
|
||||||
|
error = ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return claimResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onPostExecute(Claim result) {
|
||||||
|
Helper.setViewVisibility(progressView, View.GONE);
|
||||||
|
if (handler != null) {
|
||||||
|
if (result != null) {
|
||||||
|
handler.onSuccess(result);
|
||||||
|
} else {
|
||||||
|
handler.onError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package io.lbry.browser.tasks.file;
|
||||||
|
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
|
import io.lbry.browser.tasks.GenericTaskHandler;
|
||||||
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
|
public class DeleteFileTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
|
private String claimId;
|
||||||
|
private Exception error;
|
||||||
|
private GenericTaskHandler handler;
|
||||||
|
|
||||||
|
public DeleteFileTask(String claimId, GenericTaskHandler handler) {
|
||||||
|
this.claimId = claimId;
|
||||||
|
this.handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Boolean doInBackground(Void... params) {
|
||||||
|
try {
|
||||||
|
Map<String, Object> options = new HashMap<>();
|
||||||
|
options.put("claim_id", claimId);
|
||||||
|
options.put("delete_from_download_dir", true);
|
||||||
|
return (boolean) Lbry.genericApiCall(Lbry.METHOD_FILE_DELETE, options);
|
||||||
|
} catch (ApiCallException ex) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onPostExecute(Boolean result) {
|
||||||
|
if (handler != null) {
|
||||||
|
if (result) {
|
||||||
|
handler.onSuccess();
|
||||||
|
} else {
|
||||||
|
handler.onError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.tasks;
|
package io.lbry.browser.tasks.file;
|
||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -6,11 +6,11 @@ import android.view.View;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.lbry.browser.exceptions.ApiCallException;
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
import io.lbry.browser.model.File;
|
import io.lbry.browser.model.LbryFile;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class FileListTask extends AsyncTask<Void, Void, List<File>> {
|
public class FileListTask extends AsyncTask<Void, Void, List<LbryFile>> {
|
||||||
private String claimId;
|
private String claimId;
|
||||||
private FileListResultHandler handler;
|
private FileListResultHandler handler;
|
||||||
private View progressView;
|
private View progressView;
|
||||||
|
@ -28,7 +28,7 @@ public class FileListTask extends AsyncTask<Void, Void, List<File>> {
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
Helper.setViewVisibility(progressView, View.VISIBLE);
|
Helper.setViewVisibility(progressView, View.VISIBLE);
|
||||||
}
|
}
|
||||||
protected List<File> doInBackground(Void... params) {
|
protected List<LbryFile> doInBackground(Void... params) {
|
||||||
try {
|
try {
|
||||||
return Lbry.fileList(claimId);
|
return Lbry.fileList(claimId);
|
||||||
} catch (ApiCallException ex) {
|
} catch (ApiCallException ex) {
|
||||||
|
@ -36,7 +36,7 @@ public class FileListTask extends AsyncTask<Void, Void, List<File>> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected void onPostExecute(List<File> files) {
|
protected void onPostExecute(List<LbryFile> files) {
|
||||||
Helper.setViewVisibility(progressView, View.GONE);
|
Helper.setViewVisibility(progressView, View.GONE);
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
if (files != null) {
|
if (files != null) {
|
||||||
|
@ -48,7 +48,7 @@ public class FileListTask extends AsyncTask<Void, Void, List<File>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface FileListResultHandler {
|
public interface FileListResultHandler {
|
||||||
void onSuccess(List<File> files);
|
void onSuccess(List<LbryFile> files);
|
||||||
void onError(Exception error);
|
void onError(Exception error);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package io.lbry.browser.tasks.file;
|
||||||
|
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
|
import io.lbry.browser.model.LbryFile;
|
||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
|
public class GetFileTask extends AsyncTask<Void, Void, LbryFile> {
|
||||||
|
private String uri;
|
||||||
|
private boolean saveFile;
|
||||||
|
private View progressView;
|
||||||
|
private GetFileHandler handler;
|
||||||
|
private Exception error;
|
||||||
|
|
||||||
|
public GetFileTask(String uri, boolean saveFile, View progressView, GetFileHandler handler) {
|
||||||
|
this.uri = uri;
|
||||||
|
this.saveFile = saveFile;
|
||||||
|
this.progressView = progressView;
|
||||||
|
this.handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onPreExecute() {
|
||||||
|
Helper.setViewVisibility(progressView, View.VISIBLE);
|
||||||
|
if (handler != null) {
|
||||||
|
handler.beforeStart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected LbryFile doInBackground(Void... params) {
|
||||||
|
LbryFile file = null;
|
||||||
|
try {
|
||||||
|
Map<String, Object> options = new HashMap<>();
|
||||||
|
options.put("uri", uri);
|
||||||
|
options.put("save_file", saveFile);
|
||||||
|
JSONObject streamInfo = (JSONObject) Lbry.genericApiCall("get", options);
|
||||||
|
if (streamInfo.has("error")) {
|
||||||
|
throw new ApiCallException(Helper.getJSONString("error", "", streamInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
file = LbryFile.fromJSONObject(streamInfo);
|
||||||
|
} catch (ApiCallException ex) {
|
||||||
|
error = ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onPostExecute(LbryFile file) {
|
||||||
|
Helper.setViewVisibility(progressView, View.GONE);
|
||||||
|
if (handler != null) {
|
||||||
|
if (file != null) {
|
||||||
|
handler.onSuccess(file, saveFile);
|
||||||
|
} else {
|
||||||
|
handler.onError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface GetFileHandler {
|
||||||
|
void beforeStart();
|
||||||
|
void onSuccess(LbryFile file, boolean saveFile);
|
||||||
|
void onError(Exception error);
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,7 +33,7 @@ import io.lbry.browser.dialog.CustomizeTagsDialogFragment;
|
||||||
import io.lbry.browser.listener.TagListener;
|
import io.lbry.browser.listener.TagListener;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.Tag;
|
import io.lbry.browser.model.Tag;
|
||||||
import io.lbry.browser.tasks.ClaimSearchTask;
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.tasks.FollowUnfollowTagTask;
|
import io.lbry.browser.tasks.FollowUnfollowTagTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import io.lbry.browser.adapter.ClaimListAdapter;
|
||||||
import io.lbry.browser.dialog.ContentFromDialogFragment;
|
import io.lbry.browser.dialog.ContentFromDialogFragment;
|
||||||
import io.lbry.browser.dialog.ContentSortDialogFragment;
|
import io.lbry.browser.dialog.ContentSortDialogFragment;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.tasks.ClaimSearchTask;
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
import io.lbry.browser.utils.Predefined;
|
import io.lbry.browser.utils.Predefined;
|
||||||
|
|
|
@ -45,7 +45,7 @@ import io.lbry.browser.model.WalletBalance;
|
||||||
import io.lbry.browser.tasks.UpdateSuggestedTagsTask;
|
import io.lbry.browser.tasks.UpdateSuggestedTagsTask;
|
||||||
import io.lbry.browser.tasks.UploadImageTask;
|
import io.lbry.browser.tasks.UploadImageTask;
|
||||||
import io.lbry.browser.tasks.ChannelCreateUpdateTask;
|
import io.lbry.browser.tasks.ChannelCreateUpdateTask;
|
||||||
import io.lbry.browser.tasks.ClaimResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimResultHandler;
|
||||||
import io.lbry.browser.tasks.lbryinc.LogPublishTask;
|
import io.lbry.browser.tasks.lbryinc.LogPublishTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
|
@ -37,8 +37,8 @@ import io.lbry.browser.listener.FetchChannelsListener;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.lbryinc.Subscription;
|
import io.lbry.browser.model.lbryinc.Subscription;
|
||||||
import io.lbry.browser.tasks.lbryinc.ChannelSubscribeTask;
|
import io.lbry.browser.tasks.lbryinc.ChannelSubscribeTask;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ResolveTask;
|
import io.lbry.browser.tasks.claim.ResolveTask;
|
||||||
import io.lbry.browser.tasks.lbryinc.FetchStatCountTask;
|
import io.lbry.browser.tasks.lbryinc.FetchStatCountTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.ui.controls.SolidIconView;
|
import io.lbry.browser.ui.controls.SolidIconView;
|
||||||
|
|
|
@ -10,11 +10,9 @@ import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.ActionBar;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.view.ActionMode;
|
import androidx.appcompat.view.ActionMode;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
@ -22,7 +20,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -35,8 +32,8 @@ import io.lbry.browser.listener.SdkStatusListener;
|
||||||
import io.lbry.browser.listener.SelectionModeListener;
|
import io.lbry.browser.listener.SelectionModeListener;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.NavMenuItem;
|
import io.lbry.browser.model.NavMenuItem;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ClaimListTask;
|
import io.lbry.browser.tasks.claim.ClaimListTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
|
@ -25,17 +25,14 @@ import java.util.Map;
|
||||||
import io.lbry.browser.FileViewActivity;
|
import io.lbry.browser.FileViewActivity;
|
||||||
import io.lbry.browser.MainActivity;
|
import io.lbry.browser.MainActivity;
|
||||||
import io.lbry.browser.R;
|
import io.lbry.browser.R;
|
||||||
import io.lbry.browser.adapter.ClaimListAdapter;
|
|
||||||
import io.lbry.browser.adapter.EditorsChoiceItemAdapter;
|
import io.lbry.browser.adapter.EditorsChoiceItemAdapter;
|
||||||
import io.lbry.browser.dialog.ContentScopeDialogFragment;
|
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.EditorsChoiceItem;
|
import io.lbry.browser.model.EditorsChoiceItem;
|
||||||
import io.lbry.browser.tasks.ClaimSearchTask;
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
import io.lbry.browser.utils.LbryAnalytics;
|
import io.lbry.browser.utils.LbryAnalytics;
|
||||||
import io.lbry.browser.utils.Predefined;
|
|
||||||
|
|
||||||
public class EditorsChoiceFragment extends BaseFragment {
|
public class EditorsChoiceFragment extends BaseFragment {
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ import io.lbry.browser.exceptions.LbryUriException;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.lbryinc.Subscription;
|
import io.lbry.browser.model.lbryinc.Subscription;
|
||||||
import io.lbry.browser.tasks.lbryinc.ChannelSubscribeTask;
|
import io.lbry.browser.tasks.lbryinc.ChannelSubscribeTask;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ClaimSearchTask;
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.tasks.lbryinc.FetchSubscriptionsTask;
|
import io.lbry.browser.tasks.lbryinc.FetchSubscriptionsTask;
|
||||||
import io.lbry.browser.tasks.ResolveTask;
|
import io.lbry.browser.tasks.claim.ResolveTask;
|
||||||
import io.lbry.browser.listener.ChannelItemSelectionListener;
|
import io.lbry.browser.listener.ChannelItemSelectionListener;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
245
app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java
Normal file
245
app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java
Normal file
|
@ -0,0 +1,245 @@
|
||||||
|
package io.lbry.browser.ui.other;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.ActionBar;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.google.android.gms.tasks.OnCompleteListener;
|
||||||
|
import com.google.android.gms.tasks.Task;
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
import com.google.firebase.iid.FirebaseInstanceId;
|
||||||
|
import com.google.firebase.iid.InstanceIdResult;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import io.lbry.browser.MainActivity;
|
||||||
|
import io.lbry.browser.R;
|
||||||
|
import io.lbry.browser.exceptions.ApiCallException;
|
||||||
|
import io.lbry.browser.listener.SdkStatusListener;
|
||||||
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
import io.lbry.browser.utils.LbryAnalytics;
|
||||||
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
import io.lbry.lbrysdk.Utils;
|
||||||
|
|
||||||
|
public class AboutFragment extends BaseFragment implements SdkStatusListener {
|
||||||
|
|
||||||
|
private static final String FILE_PROVIDER = "io.lbry.browser.fileprovider";
|
||||||
|
|
||||||
|
private TextView textLinkWhatIsLBRY;
|
||||||
|
private TextView textLinkAndroidBasics;
|
||||||
|
private TextView textLinkFAQ;
|
||||||
|
private TextView textLinkDiscord;
|
||||||
|
private TextView textLinkFacebook;
|
||||||
|
private TextView textLinkInstagram;
|
||||||
|
private TextView textLinkReddit;
|
||||||
|
private TextView textLinkTelegram;
|
||||||
|
private TextView textLinkTwitter;
|
||||||
|
|
||||||
|
private TextView textConnectedEmail;
|
||||||
|
private TextView textAppVersion;
|
||||||
|
private TextView textLbrySdkVersion;
|
||||||
|
private TextView textPlatform;
|
||||||
|
private TextView textInstallationId;
|
||||||
|
private TextView textFirebaseToken;
|
||||||
|
private View linkSendLog;
|
||||||
|
private View linkUpdateMailingPreferences;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View root = inflater.inflate(R.layout.fragment_about, container, false);
|
||||||
|
|
||||||
|
textLinkWhatIsLBRY = root.findViewById(R.id.about_link_what_is_lbry);
|
||||||
|
textLinkAndroidBasics = root.findViewById(R.id.about_link_android_basics);
|
||||||
|
textLinkFAQ = root.findViewById(R.id.about_link_faq);
|
||||||
|
textLinkDiscord = root.findViewById(R.id.about_link_discord);
|
||||||
|
textLinkFacebook = root.findViewById(R.id.about_link_facebook);
|
||||||
|
textLinkInstagram = root.findViewById(R.id.about_link_instagram);
|
||||||
|
textLinkReddit = root.findViewById(R.id.about_link_reddit);
|
||||||
|
textLinkTelegram = root.findViewById(R.id.about_link_telegram);
|
||||||
|
textLinkTwitter = root.findViewById(R.id.about_link_twitter);
|
||||||
|
|
||||||
|
TextView[] textLinks = {
|
||||||
|
textLinkWhatIsLBRY, textLinkAndroidBasics, textLinkFAQ, textLinkDiscord, textLinkFacebook,
|
||||||
|
textLinkInstagram, textLinkReddit, textLinkTelegram, textLinkTwitter
|
||||||
|
};
|
||||||
|
for (TextView view : textLinks) {
|
||||||
|
Helper.applyHtmlForTextView(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
textConnectedEmail = root.findViewById(R.id.about_connected_email);
|
||||||
|
textAppVersion = root.findViewById(R.id.about_app_version);
|
||||||
|
textLbrySdkVersion = root.findViewById(R.id.about_lbry_sdk);
|
||||||
|
textPlatform = root.findViewById(R.id.about_platform);
|
||||||
|
textInstallationId = root.findViewById(R.id.about_installation_id);
|
||||||
|
textFirebaseToken = root.findViewById(R.id.about_firebase_token);
|
||||||
|
linkSendLog = root.findViewById(R.id.about_send_log);
|
||||||
|
linkUpdateMailingPreferences = root.findViewById(R.id.about_update_mailing_preferences);
|
||||||
|
|
||||||
|
if (Lbryio.isSignedIn()) {
|
||||||
|
textConnectedEmail.setText(Lbryio.getSignedInEmail());
|
||||||
|
textConnectedEmail.setTypeface(null, Typeface.NORMAL);
|
||||||
|
linkUpdateMailingPreferences.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
linkUpdateMailingPreferences.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Context context = getContext();
|
||||||
|
String appVersion = getString(R.string.unknown);
|
||||||
|
if (context != null) {
|
||||||
|
try {
|
||||||
|
PackageManager manager = context.getPackageManager();
|
||||||
|
PackageInfo info = manager.getPackageInfo(context.getPackageName(), PackageManager.GET_ACTIVITIES);
|
||||||
|
appVersion = info.versionName;
|
||||||
|
} catch (PackageManager.NameNotFoundException ex) {
|
||||||
|
// pass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
textAppVersion.setText(appVersion);
|
||||||
|
textInstallationId.setText(Lbry.INSTALLATION_ID);
|
||||||
|
textPlatform.setText(String.format("Android %s (API %d)", Utils.getAndroidRelease(), Utils.getAndroidSdk()));
|
||||||
|
|
||||||
|
linkUpdateMailingPreferences.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("http://lbry.com/list/edit/%s", Lbryio.AUTH_TOKEN)));
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
linkSendLog.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
shareLogFile();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void shareLogFile() {
|
||||||
|
Context context = getContext();
|
||||||
|
if (context != null) {
|
||||||
|
String logFileName = "lbrynet.log";
|
||||||
|
File logFile = new File(String.format("%s/%s", Utils.getAppInternalStorageDir(context), "lbrynet"), logFileName);
|
||||||
|
if (!logFile.exists()) {
|
||||||
|
Snackbar.make(getView(), R.string.cannot_find_lbrynet_log, Snackbar.LENGTH_LONG).
|
||||||
|
setBackgroundTint(Color.RED).
|
||||||
|
setTextColor(Color.WHITE).
|
||||||
|
show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Uri fileUri = FileProvider.getUriForFile(getContext(), FILE_PROVIDER, logFile);
|
||||||
|
if (fileUri != null) {
|
||||||
|
MainActivity.startingShareActivity = true;
|
||||||
|
Intent shareIntent = new Intent();
|
||||||
|
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
shareIntent.setAction(Intent.ACTION_SEND);
|
||||||
|
shareIntent.setType("text/plain");
|
||||||
|
shareIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||||
|
|
||||||
|
Intent sendLogIntent = Intent.createChooser(shareIntent, "Send LBRY log");
|
||||||
|
sendLogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
startActivity(sendLogIntent);
|
||||||
|
}
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Snackbar.make(getView(), R.string.cannot_share_lbrynet_log, Snackbar.LENGTH_LONG).
|
||||||
|
setBackgroundTint(Color.RED).
|
||||||
|
setTextColor(Color.WHITE).
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
MainActivity activity = (MainActivity) getContext();
|
||||||
|
if (activity != null) {
|
||||||
|
activity.hideSearchBar();
|
||||||
|
activity.showNavigationBackIcon();
|
||||||
|
activity.lockDrawer();
|
||||||
|
activity.hideFloatingWalletBalance();
|
||||||
|
|
||||||
|
ActionBar actionBar = activity.getSupportActionBar();
|
||||||
|
if (actionBar != null) {
|
||||||
|
actionBar.setTitle(R.string.about_lbry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
Context context = getContext();
|
||||||
|
if (context instanceof MainActivity) {
|
||||||
|
MainActivity activity = (MainActivity) context;
|
||||||
|
LbryAnalytics.setCurrentScreen(activity, "Settings", "Settings");
|
||||||
|
|
||||||
|
if (!Lbry.SDK_READY) {
|
||||||
|
activity.addSdkStatusListener(this);
|
||||||
|
} else {
|
||||||
|
onSdkReady();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(Task<InstanceIdResult> task) {
|
||||||
|
Helper.setViewText(textFirebaseToken, task.isSuccessful() ? task.getResult().getToken() : getString(R.string.unknown));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
Context context = getContext();
|
||||||
|
if (context instanceof MainActivity) {
|
||||||
|
MainActivity activity = (MainActivity) getContext();
|
||||||
|
activity.removeSdkStatusListener(this);
|
||||||
|
activity.restoreToggle();
|
||||||
|
activity.showFloatingWalletBalance();
|
||||||
|
}
|
||||||
|
super.onStop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSdkReady() {
|
||||||
|
loadLbryVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadLbryVersion() {
|
||||||
|
(new AsyncTask<Void, Void, String>() {
|
||||||
|
protected String doInBackground(Void... params) {
|
||||||
|
try {
|
||||||
|
JSONObject result = (JSONObject) Lbry.genericApiCall(Lbry.METHOD_VERSION);
|
||||||
|
return Helper.getJSONString("lbrynet_version", null, result);
|
||||||
|
} catch (ApiCallException | ClassCastException ex) {
|
||||||
|
// pass
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected void onPostExecute(String version) {
|
||||||
|
Helper.setViewText(textLbrySdkVersion, Helper.isNullOrEmpty(version) ? getString(R.string.unknown) : version);
|
||||||
|
}
|
||||||
|
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package io.lbry.browser.ui.settings;
|
package io.lbry.browser.ui.other;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
|
@ -22,10 +22,10 @@ import io.lbry.browser.R;
|
||||||
import io.lbry.browser.adapter.ClaimListAdapter;
|
import io.lbry.browser.adapter.ClaimListAdapter;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.ClaimCacheKey;
|
import io.lbry.browser.model.ClaimCacheKey;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ClaimSearchTask;
|
import io.lbry.browser.tasks.claim.ClaimSearchTask;
|
||||||
import io.lbry.browser.tasks.LighthouseSearchTask;
|
import io.lbry.browser.tasks.LighthouseSearchTask;
|
||||||
import io.lbry.browser.tasks.ResolveTask;
|
import io.lbry.browser.tasks.claim.ResolveTask;
|
||||||
import io.lbry.browser.ui.BaseFragment;
|
import io.lbry.browser.ui.BaseFragment;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
@ -129,6 +129,7 @@ public class SearchFragment extends BaseFragment implements
|
||||||
claim.setName(query);
|
claim.setName(query);
|
||||||
claim.setFeatured(true);
|
claim.setFeatured(true);
|
||||||
claim.setUnresolved(true);
|
claim.setUnresolved(true);
|
||||||
|
claim.setConfirmations(1);
|
||||||
return claim;
|
return claim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +151,7 @@ public class SearchFragment extends BaseFragment implements
|
||||||
ResolveTask task = new ResolveTask(vanityUrl, Lbry.LBRY_TV_CONNECTION_STRING, null, new ClaimListResultHandler() {
|
ResolveTask task = new ResolveTask(vanityUrl, Lbry.LBRY_TV_CONNECTION_STRING, null, new ClaimListResultHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<Claim> claims) {
|
public void onSuccess(List<Claim> claims) {
|
||||||
if (claims.size() > 0) {
|
if (claims.size() > 0 && !Helper.isNullOrEmpty(claims.get(0).getClaimId())) {
|
||||||
Claim resolved = claims.get(0);
|
Claim resolved = claims.get(0);
|
||||||
Lbry.claimCache.put(key, resolved);
|
Lbry.claimCache.put(key, resolved);
|
||||||
updateFeaturedItemFromResolvedClaim(resolved);
|
updateFeaturedItemFromResolvedClaim(resolved);
|
||||||
|
|
|
@ -38,11 +38,11 @@ import io.lbry.browser.listener.WalletBalanceListener;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.WalletBalance;
|
import io.lbry.browser.model.WalletBalance;
|
||||||
import io.lbry.browser.model.lbryinc.Invitee;
|
import io.lbry.browser.model.lbryinc.Invitee;
|
||||||
import io.lbry.browser.tasks.ClaimListResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimListResultHandler;
|
||||||
import io.lbry.browser.tasks.ClaimListTask;
|
import io.lbry.browser.tasks.claim.ClaimListTask;
|
||||||
import io.lbry.browser.tasks.GenericTaskHandler;
|
import io.lbry.browser.tasks.GenericTaskHandler;
|
||||||
import io.lbry.browser.tasks.ChannelCreateUpdateTask;
|
import io.lbry.browser.tasks.ChannelCreateUpdateTask;
|
||||||
import io.lbry.browser.tasks.ClaimResultHandler;
|
import io.lbry.browser.tasks.claim.ClaimResultHandler;
|
||||||
import io.lbry.browser.tasks.lbryinc.LogPublishTask;
|
import io.lbry.browser.tasks.lbryinc.LogPublishTask;
|
||||||
import io.lbry.browser.tasks.lbryinc.FetchInviteStatusTask;
|
import io.lbry.browser.tasks.lbryinc.FetchInviteStatusTask;
|
||||||
import io.lbry.browser.tasks.lbryinc.FetchReferralCodeTask;
|
import io.lbry.browser.tasks.lbryinc.FetchReferralCodeTask;
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package io.lbry.browser.utils;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||||
|
import com.google.android.exoplayer2.Renderer;
|
||||||
|
import com.google.android.exoplayer2.audio.AudioProcessor;
|
||||||
|
import com.google.android.exoplayer2.audio.AudioRendererEventListener;
|
||||||
|
import com.google.android.exoplayer2.audio.TeeAudioProcessor;
|
||||||
|
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
||||||
|
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
||||||
|
import com.google.android.exoplayer2.mediacodec.MediaCodecSelector;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class ExoplayerAudioRenderer extends DefaultRenderersFactory {
|
||||||
|
|
||||||
|
private TeeAudioProcessor.AudioBufferSink audioBufferSink;
|
||||||
|
|
||||||
|
public ExoplayerAudioRenderer(Context context, TeeAudioProcessor.AudioBufferSink audioBufferSink) {
|
||||||
|
super(context);
|
||||||
|
this.audioBufferSink = audioBufferSink;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void buildAudioRenderers(
|
||||||
|
Context context,
|
||||||
|
int extensionRendererMode,
|
||||||
|
MediaCodecSelector mediaCodecSelector,
|
||||||
|
@Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
|
||||||
|
boolean playClearSamplesWithoutKeys,
|
||||||
|
boolean enableDecoderFallback,
|
||||||
|
AudioProcessor[] audioProcessors,
|
||||||
|
Handler eventHandler,
|
||||||
|
AudioRendererEventListener eventListener,
|
||||||
|
ArrayList<Renderer> out) {
|
||||||
|
AudioProcessor[] audioProcessorList = { new TeeAudioProcessor(audioBufferSink) };
|
||||||
|
super.buildAudioRenderers(
|
||||||
|
context,
|
||||||
|
extensionRendererMode,
|
||||||
|
mediaCodecSelector,
|
||||||
|
drmSessionManager,
|
||||||
|
playClearSamplesWithoutKeys,
|
||||||
|
enableDecoderFallback,
|
||||||
|
audioProcessorList,
|
||||||
|
eventHandler,
|
||||||
|
eventListener,
|
||||||
|
out);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,10 @@
|
||||||
package io.lbry.browser.utils;
|
package io.lbry.browser.utils;
|
||||||
|
|
||||||
import com.google.gson.FieldNamingPolicy;
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import com.google.gson.JsonArray;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -29,12 +21,10 @@ import io.lbry.browser.exceptions.LbryResponseException;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.ClaimCacheKey;
|
import io.lbry.browser.model.ClaimCacheKey;
|
||||||
import io.lbry.browser.model.ClaimSearchCacheValue;
|
import io.lbry.browser.model.ClaimSearchCacheValue;
|
||||||
import io.lbry.browser.model.File;
|
import io.lbry.browser.model.LbryFile;
|
||||||
import io.lbry.browser.model.Tag;
|
import io.lbry.browser.model.Tag;
|
||||||
import io.lbry.browser.model.Transaction;
|
import io.lbry.browser.model.Transaction;
|
||||||
import io.lbry.browser.model.WalletBalance;
|
import io.lbry.browser.model.WalletBalance;
|
||||||
import io.lbry.browser.model.lbryinc.Reward;
|
|
||||||
import io.lbry.browser.model.lbryinc.User;
|
|
||||||
import io.lbry.lbrysdk.Utils;
|
import io.lbry.lbrysdk.Utils;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
@ -68,11 +58,13 @@ public final class Lbry {
|
||||||
public static final String METHOD_RESOLVE = "resolve";
|
public static final String METHOD_RESOLVE = "resolve";
|
||||||
public static final String METHOD_CLAIM_SEARCH = "claim_search";
|
public static final String METHOD_CLAIM_SEARCH = "claim_search";
|
||||||
public static final String METHOD_FILE_LIST = "file_list";
|
public static final String METHOD_FILE_LIST = "file_list";
|
||||||
|
public static final String METHOD_FILE_DELETE = "file_delete";
|
||||||
public static final String METHOD_GET = "get";
|
public static final String METHOD_GET = "get";
|
||||||
|
|
||||||
public static final String METHOD_WALLET_BALANCE = "wallet_balance";
|
public static final String METHOD_WALLET_BALANCE = "wallet_balance";
|
||||||
public static final String METHOD_WALLET_ENCRYPT = "wallet_encrypt";
|
public static final String METHOD_WALLET_ENCRYPT = "wallet_encrypt";
|
||||||
public static final String METHOD_WALLET_DECRYPT = "wallet_decrypt";
|
public static final String METHOD_WALLET_DECRYPT = "wallet_decrypt";
|
||||||
|
public static final String METHOD_VERSION = "version";
|
||||||
|
|
||||||
public static final String METHOD_WALLET_LIST = "wallet_list";
|
public static final String METHOD_WALLET_LIST = "wallet_list";
|
||||||
public static final String METHOD_WALLET_SEND = "wallet_send";
|
public static final String METHOD_WALLET_SEND = "wallet_send";
|
||||||
|
@ -95,6 +87,7 @@ public final class Lbry {
|
||||||
public static final String METHOD_CHANNEL_UPDATE = "channel_update";
|
public static final String METHOD_CHANNEL_UPDATE = "channel_update";
|
||||||
|
|
||||||
public static final String METHOD_CLAIM_LIST = "claim_list";
|
public static final String METHOD_CLAIM_LIST = "claim_list";
|
||||||
|
public static final String METHOD_STREAM_REPOST = "stream_repost";
|
||||||
|
|
||||||
public static KeyStore KEYSTORE;
|
public static KeyStore KEYSTORE;
|
||||||
public static boolean SDK_READY = false;
|
public static boolean SDK_READY = false;
|
||||||
|
@ -205,7 +198,7 @@ public final class Lbry {
|
||||||
} else {
|
} else {
|
||||||
errorMessage = ((JSONObject) jsonError).getString("message");
|
errorMessage = ((JSONObject) jsonError).getString("message");
|
||||||
}
|
}
|
||||||
throw new LbryResponseException(json.getString("error"));
|
throw new LbryResponseException(!Helper.isNullOrEmpty(errorMessage) ? errorMessage : json.getString("error"));
|
||||||
} else {
|
} else {
|
||||||
throw new LbryResponseException("Protocol error with unknown response signature.");
|
throw new LbryResponseException("Protocol error with unknown response signature.");
|
||||||
}
|
}
|
||||||
|
@ -284,13 +277,13 @@ public final class Lbry {
|
||||||
return transactions;
|
return transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File get(boolean saveFile) throws ApiCallException {
|
public static LbryFile get(boolean saveFile) throws ApiCallException {
|
||||||
File file = null;
|
LbryFile file = null;
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("save_file", saveFile);
|
params.put("save_file", saveFile);
|
||||||
try {
|
try {
|
||||||
JSONObject result = (JSONObject) parseResponse(apiCall(METHOD_GET, params));
|
JSONObject result = (JSONObject) parseResponse(apiCall(METHOD_GET, params));
|
||||||
file = File.fromJSONObject(result);
|
file = LbryFile.fromJSONObject(result);
|
||||||
|
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
String fileClaimId = file.getClaimId();
|
String fileClaimId = file.getClaimId();
|
||||||
|
@ -309,8 +302,8 @@ public final class Lbry {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<File> fileList(String claimId) throws ApiCallException {
|
public static List<LbryFile> fileList(String claimId) throws ApiCallException {
|
||||||
List<File> files = new ArrayList<>();
|
List<LbryFile> files = new ArrayList<>();
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
if (!Helper.isNullOrEmpty(claimId)) {
|
if (!Helper.isNullOrEmpty(claimId)) {
|
||||||
params.put("claim_id", claimId);
|
params.put("claim_id", claimId);
|
||||||
|
@ -320,7 +313,7 @@ public final class Lbry {
|
||||||
JSONArray items = result.getJSONArray("items");
|
JSONArray items = result.getJSONArray("items");
|
||||||
for (int i = 0; i < items.length(); i++) {
|
for (int i = 0; i < items.length(); i++) {
|
||||||
JSONObject fileObject = items.getJSONObject(i);
|
JSONObject fileObject = items.getJSONObject(i);
|
||||||
File file = File.fromJSONObject(fileObject);
|
LbryFile file = LbryFile.fromJSONObject(fileObject);
|
||||||
files.add(file);
|
files.add(file);
|
||||||
|
|
||||||
String fileClaimId = file.getClaimId();
|
String fileClaimId = file.getClaimId();
|
||||||
|
|
|
@ -43,6 +43,9 @@ import okhttp3.Response;
|
||||||
@Data
|
@Data
|
||||||
public final class Lbryio {
|
public final class Lbryio {
|
||||||
|
|
||||||
|
// TODO: Get this from the bundled aar
|
||||||
|
public static String SDK_VERSION = "0.73.1";
|
||||||
|
|
||||||
public static User currentUser;
|
public static User currentUser;
|
||||||
public static boolean userHasSyncedWallet = false;
|
public static boolean userHasSyncedWallet = false;
|
||||||
public static String lastRemoteHash;
|
public static String lastRemoteHash;
|
||||||
|
@ -212,7 +215,7 @@ public final class Lbryio {
|
||||||
options.put("app_version", appVersion);
|
options.put("app_version", appVersion);
|
||||||
options.put("app_id", Lbry.INSTALLATION_ID);
|
options.put("app_id", Lbry.INSTALLATION_ID);
|
||||||
options.put("node_id", "");
|
options.put("node_id", "");
|
||||||
options.put("daemon_version", "0.67.1");
|
options.put("daemon_version", SDK_VERSION);
|
||||||
options.put("operating_system", "android");
|
options.put("operating_system", "android");
|
||||||
options.put("platform", String.format("Android %s (API %d)", Utils.getAndroidRelease(), Utils.getAndroidSdk()));
|
options.put("platform", String.format("Android %s (API %d)", Utils.getAndroidRelease(), Utils.getAndroidSdk()));
|
||||||
try {
|
try {
|
||||||
|
|
11
app/src/main/res/drawable-anydpi/ic_stop.xml
Normal file
11
app/src/main/res/drawable-anydpi/ic_stop.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:alpha="0.8">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M6,6h12v12H6z"/>
|
||||||
|
</vector>
|
BIN
app/src/main/res/drawable-hdpi/ic_stop.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_stop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 B |
BIN
app/src/main/res/drawable-mdpi/ic_stop.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_stop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 B |
BIN
app/src/main/res/drawable-xhdpi/ic_stop.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_stop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_stop.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_stop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 152 B |
26
app/src/main/res/drawable/determinate_progress_circle.xml
Normal file
26
app/src/main/res/drawable/determinate_progress_circle.xml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="ring"
|
||||||
|
android:innerRadiusRatio="2.5"
|
||||||
|
android:thickness="3dp"
|
||||||
|
android:useLevel="false">
|
||||||
|
<solid android:color="@color/nextLbryGreenSemiTransparent" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<rotate
|
||||||
|
android:fromDegrees="270"
|
||||||
|
android:toDegrees="270"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%">
|
||||||
|
<shape
|
||||||
|
android:shape="ring"
|
||||||
|
android:innerRadiusRatio="2.5"
|
||||||
|
android:thickness="3dp">
|
||||||
|
<solid android:color="@color/colorAccent" />
|
||||||
|
</shape>
|
||||||
|
</rotate>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -42,7 +42,7 @@
|
||||||
android:layout_weight="10"
|
android:layout_weight="10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="invisible">
|
android:visibility="visible">
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/file_view_media_container"
|
android:id="@+id/file_view_media_container"
|
||||||
android:background="@color/mediaContainerBackground"
|
android:background="@color/mediaContainerBackground"
|
||||||
|
@ -59,11 +59,17 @@
|
||||||
android:id="@+id/file_view_thumbnail"
|
android:id="@+id/file_view_thumbnail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/file_view_main_action_button"
|
android:id="@+id/file_view_main_action_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
|
android:visibility="invisible"
|
||||||
android:text="@string/play" />
|
android:text="@string/play" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_view_fee_container"
|
android:id="@+id/file_view_fee_container"
|
||||||
|
@ -84,7 +90,8 @@
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:textSize="8dp"
|
android:textSize="8dp"
|
||||||
android:text="@string/fa_coins" />
|
android:text="@string/fa_coins"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/file_view_fee"
|
android:id="@+id/file_view_fee"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -92,6 +99,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textFontWeight="300" />
|
android:textFontWeight="300" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -108,10 +116,17 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:visibility="gone" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/file_view_unsupported_container"
|
android:id="@+id/file_view_unsupported_container"
|
||||||
|
android:background="@color/mediaContainerBackground"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="36dp"
|
android:padding="36dp"
|
||||||
|
@ -137,6 +152,7 @@
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:text="@string/unsupported_content" />
|
android:text="@string/unsupported_content" />
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/file_view_unsupported_text"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:text="@string/unsupported_content_desc"
|
android:text="@string/unsupported_content_desc"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
@ -234,12 +250,17 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:tint="@color/foreground"
|
android:layout_width="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_height="36dp"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_gravity="center_horizontal"
|
<ImageView
|
||||||
android:src="@drawable/ic_share" />
|
android:tint="@color/foreground"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_share" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -259,13 +280,18 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
<io.lbry.browser.ui.controls.SolidIconView
|
<RelativeLayout
|
||||||
android:textColor="@color/foreground"
|
android:layout_width="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_height="36dp"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_gravity="center_horizontal"
|
<io.lbry.browser.ui.controls.SolidIconView
|
||||||
android:textSize="20dp"
|
android:textColor="@color/foreground"
|
||||||
android:text="@string/fa_gift"/>
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:textSize="20dp"
|
||||||
|
android:text="@string/fa_gift"/>
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -276,7 +302,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_vew_action_repost"
|
android:id="@+id/file_view_action_repost"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -285,13 +311,19 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
<io.lbry.browser.ui.controls.SolidIconView
|
<RelativeLayout
|
||||||
android:textColor="@color/foreground"
|
android:layout_width="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_height="36dp"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_gravity="center_horizontal"
|
<io.lbry.browser.ui.controls.SolidIconView
|
||||||
android:textSize="20dp"
|
android:textColor="@color/foreground"
|
||||||
android:text="@string/fa_repost"/>
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:textSize="20dp"
|
||||||
|
android:text="@string/fa_repost"/>
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -311,14 +343,18 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone">
|
||||||
>
|
<RelativeLayout
|
||||||
<ImageView
|
android:layout_width="36dp"
|
||||||
android:tint="@color/foreground"
|
android:layout_height="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_height="24dp"
|
<ImageView
|
||||||
android:layout_gravity="center_horizontal"
|
android:tint="@color/foreground"
|
||||||
android:src="@drawable/ic_edit" />
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_edit" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -328,6 +364,44 @@
|
||||||
android:layout_gravity="center_horizontal" />
|
android:layout_gravity="center_horizontal" />
|
||||||
</LinearLayout>
|
</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: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"
|
||||||
|
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" />
|
||||||
|
</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" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_view_action_delete"
|
android:id="@+id/file_view_action_delete"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
@ -339,12 +413,17 @@
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:tint="@color/foreground"
|
android:layout_width="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_height="36dp"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_gravity="center_horizontal"
|
<ImageView
|
||||||
android:src="@drawable/ic_delete" />
|
android:tint="@color/foreground"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_delete" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -354,31 +433,6 @@
|
||||||
android:layout_gravity="center_horizontal" />
|
android:layout_gravity="center_horizontal" />
|
||||||
</LinearLayout>
|
</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:orientation="vertical"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp">
|
|
||||||
<ImageView
|
|
||||||
android:tint="@color/foreground"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:src="@drawable/ic_download" />
|
|
||||||
<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" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_view_action_report"
|
android:id="@+id/file_view_action_report"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
@ -389,12 +443,17 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:tint="@color/foreground"
|
android:layout_width="36dp"
|
||||||
android:layout_width="24dp"
|
android:layout_height="36dp"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center_horizontal">
|
||||||
android:layout_gravity="center_horizontal"
|
<ImageView
|
||||||
android:src="@drawable/ic_report" />
|
android:tint="@color/foreground"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_report" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
@ -410,7 +469,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:layout_height="1dp" />
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/file_view_publisher_area"
|
android:id="@+id/file_view_publisher_area"
|
||||||
|
@ -436,14 +495,16 @@
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textFontWeight="600" />
|
android:textFontWeight="600" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageButton
|
<io.lbry.browser.ui.controls.SolidIconView
|
||||||
android:background="@null"
|
android:id="@+id/file_view_icon_follow_unfollow"
|
||||||
android:layout_centerVertical="true"
|
android:clickable="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:layout_width="wrap_content"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="24dp"
|
||||||
android:src="@drawable/ic_following"
|
android:layout_height="24dp"
|
||||||
android:tint="@color/red" />
|
android:text="@string/fa_heart"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:textSize="20dp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -451,7 +512,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:layout_height="1dp" />
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_view_description_area"
|
android:id="@+id/file_view_description_area"
|
||||||
|
@ -466,6 +527,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:autoLink="all"
|
android:autoLink="all"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
android:textFontWeight="300"
|
android:textFontWeight="300"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp" />
|
android:layout_marginRight="16dp" />
|
||||||
|
@ -499,7 +561,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:layout_height="1dp" />
|
android:layout_height="0.5dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -550,6 +612,18 @@
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/file_view_imageviewer_container"
|
||||||
|
android:background="@android:color/black"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone">
|
||||||
|
<com.github.chrisbanes.photoview.PhotoView
|
||||||
|
android:id="@+id/file_view_imageviewer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<include layout="@layout/floating_wallet_balance" />
|
<include layout="@layout/floating_wallet_balance" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -36,6 +36,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/uri_placeholder"
|
android:hint="@string/uri_placeholder"
|
||||||
|
android:imeOptions="actionGo"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textFontWeight="300"
|
android:textFontWeight="300"
|
||||||
|
|
|
@ -77,8 +77,9 @@
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:text="@string/convert_credits"
|
||||||
android:text="@string/convert_credits" />
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/wallet_hint_convert_credits_bittrex"
|
android:id="@+id/wallet_hint_convert_credits_bittrex"
|
||||||
|
@ -87,12 +88,13 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="16sp"
|
android:text="@string/convert_credits_bittrex"
|
||||||
android:text="@string/convert_credits_bittrex" />
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@color/lightDivider" />
|
android:background="@color/lightDivider" />
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<View
|
<View
|
||||||
android:background="@color/lightDivider"
|
android:background="@color/lightDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:layout_marginTop="16dp" />
|
android:layout_marginTop="16dp" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<View
|
<View
|
||||||
android:background="@color/lightDivider"
|
android:background="@color/lightDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:layout_marginTop="16dp" />
|
android:layout_marginTop="16dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<View
|
<View
|
||||||
android:background="@color/lightDivider"
|
android:background="@color/lightDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:layout_marginBottom="14dp" />
|
android:layout_marginBottom="14dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
<View
|
<View
|
||||||
android:background="@color/lightDivider"
|
android:background="@color/lightDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:layout_marginBottom="12dp" />
|
android:layout_marginBottom="12dp" />
|
||||||
|
|
||||||
|
@ -115,14 +115,16 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/manual_backup" />
|
android:text="@string/manual_backup"
|
||||||
|
android:textColorLink="@color/lbryGreen" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/wallet_link_sync_faq"
|
android:id="@+id/wallet_link_sync_faq"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:text="@string/sync_faq" />
|
android:text="@string/sync_faq"
|
||||||
|
android:textColorLink="@color/lbryGreen"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
|
@ -31,6 +31,36 @@
|
||||||
|
|
||||||
<include layout="@layout/floating_wallet_balance" />
|
<include layout="@layout/floating_wallet_balance" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/global_sdk_initializing_status"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/lbryGreen"
|
||||||
|
android:elevation="12dp"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ProgressBar
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_gravity="center_vertical" />
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/sdk_initializing"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/global_now_playing_card"
|
android:id="@+id/global_now_playing_card"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
@ -41,7 +71,7 @@
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardElevation="8dp"
|
app:cardElevation="8dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toTopOf="@id/global_sdk_initializing_status">
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
190
app/src/main/res/layout/dialog_repost_claim.xml
Normal file
190
app/src/main/res/layout/dialog_repost_claim.xml
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/repost"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/repost_your_favorite"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/channel_to_post_on"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
<androidx.appcompat.widget.AppCompatSpinner
|
||||||
|
android:id="@+id/repost_channel_spinner"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/name"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_name_prefix"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/lightGrey"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/repost_name_input"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@id/repost_name_prefix"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/repost_advanced_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/repost_input_layout_amount"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/deposit">
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/repost_input_deposit"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_input_currency"
|
||||||
|
android:layout_toRightOf="@id/repost_input_layout_amount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/lbc"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/repost_inline_balance_container"
|
||||||
|
android:layout_toRightOf="@id/repost_input_currency"
|
||||||
|
android:layout_marginLeft="24dp"
|
||||||
|
android:layout_marginTop="28dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="invisible">
|
||||||
|
<io.lbry.browser.ui.controls.SolidIconView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:text="@string/fa_coins" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_inline_balance_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:layout_marginLeft="2dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_cancel_link"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/cancel"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/repost_toggle_advanced"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="24dp"
|
||||||
|
android:layout_toLeftOf="@id/repost_button"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:text="@string/show_advanced" />
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/repost_progress"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_toLeftOf="@id/repost_button"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/repost_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/repost"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -19,7 +19,7 @@
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:background="@color/divider"
|
android:background="@color/divider"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="4dp" />
|
android:layout_marginBottom="4dp" />
|
||||||
|
|
|
@ -8,25 +8,18 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@id/exo_play"
|
android:id="@id/exo_play"
|
||||||
android:layout_width="128dp"
|
android:layout_width="96dp"
|
||||||
android:layout_height="128dp"
|
android:layout_height="96dp"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
style="@style/ExoMediaButton.Play" />
|
style="@style/ExoMediaButton.Play" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@id/exo_pause"
|
android:id="@id/exo_pause"
|
||||||
android:layout_width="128dp"
|
android:layout_width="96dp"
|
||||||
android:layout_height="128dp"
|
android:layout_height="96dp"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
style="@style/ExoMediaButton.Pause" />
|
style="@style/ExoMediaButton.Pause" />
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/player_buffering_progress"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/player_toggle_full_screen"
|
android:id="@+id/player_toggle_full_screen"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
|
408
app/src/main/res/layout/fragment_about.xml
Normal file
408
app/src/main/res/layout/fragment_about.xml
Normal file
|
@ -0,0 +1,408 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/pageBackground">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/content_freedom"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textSize="24sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_paragraph"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_what_is_lbry"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_what_is_lbry"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_android_basics"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_android_basics"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_faq"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_faq"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/get_social"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/social_paragraph"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_discord"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_discord"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_facebook"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_facebook"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_instagram"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_instagram"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_reddit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_reddit"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_telegram"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_telegram"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_link_twitter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/about_link_twitter"
|
||||||
|
android:textColorLink="@color/lbryGreen"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textFontWeight="300" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/app_info"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/connected_email"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_connected_email"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/no_connected_email"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="italic" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_update_mailing_preferences"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/update_mailing_preferences"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/app_version"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_app_version"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lbry_sdk"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_lbry_sdk"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/loading"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/platform"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_platform"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/loading"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/installation_id"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_installation_id"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/loading"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/firebase_token"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_firebase_token"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:background="@color/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:padding="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/logs"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_send_log"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/send_log"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
|
@ -294,7 +294,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="14sp"
|
||||||
android:text="@string/cancel" />
|
android:text="@string/cancel" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
android:layout_marginRight="24dp"
|
android:layout_marginRight="24dp"
|
||||||
android:layout_toLeftOf="@id/channel_form_save_button"
|
android:layout_toLeftOf="@id/channel_form_save_button"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textSize="12sp"
|
android:textSize="14sp"
|
||||||
android:text="@string/show_optional_fields" />
|
android:text="@string/show_optional_fields" />
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/channel_form_save_progress"
|
android:id="@+id/channel_form_save_progress"
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
<View
|
<View
|
||||||
android:id="@+id/following_divider"
|
android:id="@+id/following_divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="0.5dp"
|
||||||
android:background="@color/divider"
|
android:background="@color/divider"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
|
|
@ -106,7 +106,8 @@
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:textSize="8dp"
|
android:textSize="8dp"
|
||||||
android:text="@string/fa_coins" />
|
android:text="@string/fa_coins"
|
||||||
|
android:textColor="@android:color/black"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/claim_fee"
|
android:id="@+id/claim_fee"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -114,6 +115,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textFontWeight="300" />
|
android:textFontWeight="300" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -110,7 +110,8 @@
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:textSize="8dp"
|
android:textSize="8dp"
|
||||||
android:text="@string/fa_coins" />
|
android:text="@string/fa_coins"
|
||||||
|
android:textColor="@android:color/black"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/claim_fee"
|
android:id="@+id/claim_fee"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -118,6 +119,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textFontWeight="300" />
|
android:textFontWeight="300" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:paddingTop="38dp"
|
android:paddingTop="38dp"
|
||||||
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:background="@color/lbryGreen">
|
android:background="@color/lbryGreen">
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -56,5 +57,5 @@
|
||||||
android:id="@+id/sign_in_header_divider"
|
android:id="@+id/sign_in_header_divider"
|
||||||
android:background="@color/lbryGreen"
|
android:background="@color/lbryGreen"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp" />
|
android:layout_height="0.5dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<color name="statsImage">#FF4A7D</color>
|
<color name="statsImage">#FF4A7D</color>
|
||||||
<color name="statsOther">#26BCF7</color>
|
<color name="statsOther">#26BCF7</color>
|
||||||
|
|
||||||
<color name="thumbnailPlaceholder">#D5D5D5</color>
|
<color name="thumbnailPlaceholder">#252525</color>
|
||||||
|
|
||||||
<color name="caption">#CAEDB9</color>
|
<color name="caption">#CAEDB9</color>
|
||||||
<color name="overlay">#CC333333</color>
|
<color name="overlay">#CC333333</color>
|
||||||
|
|
|
@ -55,22 +55,32 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="delete">Delete</string>
|
<string name="delete">Delete</string>
|
||||||
<string name="download">Download</string>
|
<string name="download">Download</string>
|
||||||
|
<string name="open">Open</string>
|
||||||
<string name="report">Report</string>
|
<string name="report">Report</string>
|
||||||
<string name="loading_decentralized_data">Loading decentralized data...</string>
|
<string name="loading_decentralized_data">Loading decentralized data...</string>
|
||||||
<string name="related_content">Related Content</string>
|
<string name="related_content">Related Content</string>
|
||||||
<string name="share_lbry_content">Share LBRY content</string>
|
<string name="share_lbry_content">Share LBRY content</string>
|
||||||
<string name="view">View</string>
|
<string name="view">View</string>
|
||||||
<string name="play">Play</string>
|
<string name="play">Play</string>
|
||||||
<plurals name="view_count">
|
|
||||||
<item quantity="one">%1$s view</item>
|
|
||||||
<item quantity="other">%1$s views</item>
|
|
||||||
</plurals>
|
|
||||||
<string name="unsupported_content">Unsupported Content</string>
|
<string name="unsupported_content">Unsupported Content</string>
|
||||||
<string name="unsupported_content_desc">Sorry, we are unable to display this content in the app. You can find the file named %1$s in your downloads folder.</string>
|
<string name="unsupported_content_desc">Sorry, we are unable to display this content in the app. You can find the file %1$sin your downloads folder.</string>
|
||||||
<string name="nothing_at_this_location">There\'s nothing at this location.</string>
|
<string name="nothing_at_this_location">There\'s nothing at this location.</string>
|
||||||
<string name="publish_something_here">Publish something here</string>
|
<string name="publish_something_here">Publish something here</string>
|
||||||
<string name="cannot_view_claim">This content cannot be accessed at this time. Please try again later.</string>
|
<string name="cannot_view_claim">This content cannot be accessed at this time. Please try again later.</string>
|
||||||
<string name="zero_duration">00:00</string>
|
<string name="zero_duration">00:00</string>
|
||||||
|
<string name="claim_file_not_found">The file at "%1$s" does not exist.</string>
|
||||||
|
<string name="confirm_purchase">Confirm Purchase</string>
|
||||||
|
<string name="delete_file">Delete file</string>
|
||||||
|
<string name="confirm_delete_file_message">Are you sure you want to remove this file from your device?</string>
|
||||||
|
<string name="unable_to_view_url">Failed to load %1$s. Please try again later.</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>
|
||||||
|
|
||||||
<!-- Channel view -->
|
<!-- Channel view -->
|
||||||
<string name="no_channel_info">There\'s nothing here yet.\nPlease check back later.</string>
|
<string name="no_channel_info">There\'s nothing here yet.\nPlease check back later.</string>
|
||||||
|
@ -215,7 +225,15 @@
|
||||||
<string name="send_tip_info_content">This will appear as a tip for %1$s, which will boost its ability to be discovered while active. <a href="https://lbry.com/faq/tipping">Learn more</a>.</string>
|
<string name="send_tip_info_content">This will appear as a tip for %1$s, which will boost its ability to be discovered while active. <a href="https://lbry.com/faq/tipping">Learn more</a>.</string>
|
||||||
<string name="send_tip_info_channel">This will appear as a tip for %1$s, which will boost the channel\'s ability to be discovered while active. <a href="https://lbry.com/faq/tipping">Learn more</a>.</string>
|
<string name="send_tip_info_channel">This will appear as a tip for %1$s, which will boost the channel\'s ability to be discovered while active. <a href="https://lbry.com/faq/tipping">Learn more</a>.</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
|
<string name="repost_title">Repost %1$s</string>
|
||||||
|
<string name="repost_your_favorite">Repost your favorite content to help more people discover them!</string>
|
||||||
|
<string name="channel_to_post_on">Channel to post on</string>
|
||||||
|
<string name="show_advanced">Show advanced</string>
|
||||||
|
<string name="hide_advanced">Hide advanced</string>
|
||||||
|
<string name="name">Name</string>
|
||||||
|
<string name="min_repost_deposit">0.01</string>
|
||||||
|
<string name="content_successfully_reposted">The content was successfully reposted!</string>
|
||||||
|
<string name="repost_name_invalid_characters">The repost name contains invalid characters.</string>
|
||||||
<plurals name="you_sent_a_tip">
|
<plurals name="you_sent_a_tip">
|
||||||
<item quantity="one">You sent %1$s credit as a tip, Mahalo!</item>
|
<item quantity="one">You sent %1$s credit as a tip, Mahalo!</item>
|
||||||
<item quantity="other">You sent %1$s credits as a tip, Mahalo!</item>
|
<item quantity="other">You sent %1$s credits as a tip, Mahalo!</item>
|
||||||
|
@ -344,6 +362,36 @@
|
||||||
<string name="invite_link_copied">Invite link copied.</string>
|
<string name="invite_link_copied">Invite link copied.</string>
|
||||||
<string name="invite_sent_to">Invite sent to %1$s</string>
|
<string name="invite_sent_to">Invite sent to %1$s</string>
|
||||||
|
|
||||||
|
<!-- About -->
|
||||||
|
<string name="about_lbry">About LBRY</string>
|
||||||
|
<string name="content_freedom">Content Freedom</string>
|
||||||
|
<string name="about_paragraph">LBRY is a free, open, and community-run digital marketplace. It is a decentralized peer-to-peer content distribution platform for creators to upload and share content, and earn LBRY credits for their effort. Users will be able to find a wide selection of videos, music, ebooks and other digital content they are interested in.</string>
|
||||||
|
<string name="get_social">Get Social</string>
|
||||||
|
<string name="social_paragraph">You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.</string>
|
||||||
|
<string name="app_info">App info</string>
|
||||||
|
<string name="loading">Loading...</string>
|
||||||
|
<string name="about_link_what_is_lbry"><a href="https://lbry.com/faq/what-is-lbry">What is LBRY?</a></string>
|
||||||
|
<string name="about_link_android_basics"><a href="https://lbry.com/faq/android-basics">Android Basics</a></string>
|
||||||
|
<string name="about_link_faq"><a href="https://lbry.com/faq">FAQ</a></string>
|
||||||
|
<string name="about_link_discord"><a href="https://discordapp.com/invite/Z3bERWA">Discord</a></string>
|
||||||
|
<string name="about_link_facebook"><a href="https://www.facebook.com/LBRYio">Facebook</a></string>
|
||||||
|
<string name="about_link_instagram"><a href="https://www.instagram.com/LBRYio">Instagram</a></string>
|
||||||
|
<string name="about_link_reddit"><a href="https://reddit.com/r/lbry">Reddit</a></string>
|
||||||
|
<string name="about_link_telegram"><a href="https://t.me/lbryofficial">Telegram</a></string>
|
||||||
|
<string name="about_link_twitter"><a href="https://twitter.com/LBRYio">Twitter</a></string>
|
||||||
|
<string name="update_mailing_preferences">Update mailing preferences</string>
|
||||||
|
<string name="app_version">App version</string>
|
||||||
|
<string name="lbry_sdk">LBRY SDK</string>
|
||||||
|
<string name="platform">Platform</string>
|
||||||
|
<string name="installation_id">Installation ID</string>
|
||||||
|
<string name="firebase_token">Firebase Token</string>
|
||||||
|
<string name="logs">Logs</string>
|
||||||
|
<string name="send_log">Send log</string>
|
||||||
|
<string name="connected_email">Connected email</string>
|
||||||
|
<string name="unknown">Unknown</string>
|
||||||
|
<string name="cannot_find_lbrynet_log">The lbrynet.log file could not be found.</string>
|
||||||
|
<string name="cannot_share_lbrynet_log">The lbrynet.log file cannot be shared due to permission restrictions.</string>
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<string name="fa_gift"></string>
|
<string name="fa_gift"></string>
|
||||||
<string name="fa_lock"></string>
|
<string name="fa_lock"></string>
|
||||||
|
@ -366,4 +414,5 @@
|
||||||
<string name="fa_cog"></string>
|
<string name="fa_cog"></string>
|
||||||
<string name="fa_mobile_alt"></string>
|
<string name="fa_mobile_alt"></string>
|
||||||
<string name="fa_repost"></string>
|
<string name="fa_repost"></string>
|
||||||
|
<string name="fa_folder_open"></string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
4
app/src/main/res/xml/filepaths.xml
Normal file
4
app/src/main/res/xml/filepaths.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths>
|
||||||
|
<external-files-path path="lbrynet/" name="lbrynet" />
|
||||||
|
</paths>
|
|
@ -20,7 +20,7 @@ allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue