Compare commits
65
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f4f0e01ed | ||
|
|
19515fb407 | ||
|
|
f410fa07ef | ||
|
|
729d7fe2a1 | ||
|
|
aa1b9972a8 | ||
|
|
03764f64b9 | ||
|
|
7d95c3c3d5 | ||
|
|
8f39ad6d32 | ||
|
|
94c3f67fe5 | ||
|
|
b51db6439b | ||
|
|
e1ab522dc7 | ||
|
|
7879ab738b | ||
|
|
b901ff7b0d | ||
|
|
2f7e999e49 | ||
|
|
616e3597db | ||
|
|
528f81c59a | ||
|
|
5839821f8f | ||
|
|
1d8f0dabe6 | ||
|
|
2231119d36 | ||
|
|
0fec3c6a6f | ||
|
|
c11e2fcd7a | ||
|
|
fafb20b39a | ||
|
|
4d2656f676 | ||
|
|
818fc80549 | ||
|
|
dc758491a9 | ||
|
|
f6672ca695 | ||
|
|
573325c576 | ||
|
|
7514a81a31 | ||
|
|
39b91a8886 | ||
|
|
3e032a0f9d | ||
|
|
314e6be77e | ||
|
|
9aaa4db5f0 | ||
|
|
d4d58d7508 | ||
|
|
5eb35e3283 | ||
|
|
a42442b13b | ||
|
|
f317aa2174 | ||
|
|
82dc0255f1 | ||
|
|
244d54ed39 | ||
|
|
47f56950a5 | ||
|
|
fb2b798106 | ||
|
|
7cf97feb9e | ||
|
|
d1faaa9362 | ||
|
|
aad718c714 | ||
|
|
6bed7bfd2f | ||
|
|
df4785fb5f | ||
|
|
9eb7177a15 | ||
|
|
103565d57c | ||
|
|
da4591fb2e | ||
|
|
6ac4a25715 | ||
|
|
b4599ec7c5 | ||
|
|
bc2e8b7ec0 | ||
|
|
2df4d76927 | ||
|
|
f45c517048 | ||
|
|
c78f669fb1 | ||
|
|
78dd587901 | ||
|
|
8cb51f5c17 | ||
|
|
f4b28c4d90 | ||
|
|
cfa7e07eba | ||
|
|
5ceb081972 | ||
|
|
1d1c761d3f | ||
|
|
59584c1be7 | ||
|
|
10175470de | ||
|
|
2604baa221 | ||
|
|
1adf073de6 | ||
|
|
cf052f9c80 |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
.buildozer
|
||||
.buildozer-downloads
|
||||
.gradle
|
||||
+2
-2
@@ -52,9 +52,9 @@ task printVersionName {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0-rc01'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.2.0-alpha06'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation "androidx.cardview:cardview:1.0.0"
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.navigation:navigation-fragment:2.2.2'
|
||||
|
||||
@@ -17,7 +17,6 @@ import android.content.res.Configuration;
|
||||
import android.content.res.TypedArray;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
@@ -27,10 +26,7 @@ import android.os.Handler;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import android.text.Editable;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.TypefaceSpan;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
@@ -66,7 +62,6 @@ import androidx.core.app.NotificationManagerCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.graphics.TypefaceCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.core.view.OnApplyWindowInsetsListener;
|
||||
@@ -116,7 +111,6 @@ import io.lbry.browser.listener.DownloadActionListener;
|
||||
import io.lbry.browser.listener.FetchChannelsListener;
|
||||
import io.lbry.browser.listener.FetchClaimsListener;
|
||||
import io.lbry.browser.listener.FilePickerListener;
|
||||
import io.lbry.browser.listener.ScreenOrientationListener;
|
||||
import io.lbry.browser.listener.SdkStatusListener;
|
||||
import io.lbry.browser.listener.StoragePermissionListener;
|
||||
import io.lbry.browser.listener.WalletBalanceListener;
|
||||
@@ -179,8 +173,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
|
||||
private Map<String, Class> specialRouteFragmentClassMap;
|
||||
private boolean inPictureInPictureMode;
|
||||
@Getter
|
||||
private boolean inFullscreenMode;
|
||||
public static SimpleExoPlayer appPlayer;
|
||||
public static Cache playerCache;
|
||||
public static boolean playerReassigned;
|
||||
@@ -308,7 +300,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
private List<CameraPermissionListener> cameraPermissionListeners;
|
||||
private List<DownloadActionListener> downloadActionListeners;
|
||||
private List<FilePickerListener> filePickerListeners;
|
||||
private List<ScreenOrientationListener> screenOrientationListeners;
|
||||
private List<SdkStatusListener> sdkStatusListeners;
|
||||
private List<StoragePermissionListener> storagePermissionListeners;
|
||||
private List<WalletBalanceListener> walletBalanceListeners;
|
||||
@@ -403,19 +394,31 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
// setup uri bar
|
||||
setupUriBar();
|
||||
|
||||
/*View decorView = getWindow().getDecorView();
|
||||
decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
|
||||
@Override
|
||||
public void onSystemUiVisibilityChange(int visibility) {
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
|
||||
findViewById(R.id.app_bar_main_container).setFitsSystemWindows(false);
|
||||
findViewById(R.id.drawer_layout).setFitsSystemWindows(false);
|
||||
} else {
|
||||
findViewById(R.id.app_bar_main_container).setFitsSystemWindows(true);
|
||||
findViewById(R.id.drawer_layout).setFitsSystemWindows(true);
|
||||
}
|
||||
}
|
||||
});*/
|
||||
|
||||
// other
|
||||
pendingSyncSetQueue = new ArrayList<>();
|
||||
openNavFragments = new HashMap<>();
|
||||
|
||||
cameraPermissionListeners = new ArrayList<>();
|
||||
downloadActionListeners = new ArrayList<>();
|
||||
fetchChannelsListeners = new ArrayList<>();
|
||||
fetchClaimsListeners = new ArrayList<>();
|
||||
filePickerListeners = new ArrayList<>();
|
||||
screenOrientationListeners = new ArrayList<>();
|
||||
sdkStatusListeners = new ArrayList<>();
|
||||
storagePermissionListeners = new ArrayList<>();
|
||||
walletBalanceListeners = new ArrayList<>();
|
||||
fetchClaimsListeners = new ArrayList<>();
|
||||
fetchChannelsListeners = new ArrayList<>();
|
||||
|
||||
sdkStatusListeners.add(this);
|
||||
|
||||
@@ -528,39 +531,14 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
checkNotificationOpenIntent(intent);
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
switch (newConfig.orientation) {
|
||||
case Configuration.ORIENTATION_PORTRAIT:
|
||||
for (ScreenOrientationListener listener : screenOrientationListeners) {
|
||||
listener.onPortraitOrientationEntered();
|
||||
}
|
||||
break;
|
||||
case Configuration.ORIENTATION_LANDSCAPE:
|
||||
for (ScreenOrientationListener listener : screenOrientationListeners) {
|
||||
listener.onLandscapeOrientationEntered();
|
||||
}
|
||||
break;
|
||||
public void addCameraPermissionListener(CameraPermissionListener listener) {
|
||||
if (!cameraPermissionListeners.contains(listener)) {
|
||||
cameraPermissionListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void setActionBarTitle(int stringResourceId) {
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
SpannableString spannable = new SpannableString(getString(stringResourceId));
|
||||
spannable.setSpan(new TypefaceSpan("inter"), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
actionBar.setTitle(spannable);
|
||||
}
|
||||
}
|
||||
|
||||
public void addScreenOrientationListener(ScreenOrientationListener listener) {
|
||||
if (!screenOrientationListeners.contains(listener)) {
|
||||
screenOrientationListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeScreenOrientationListener(ScreenOrientationListener listener) {
|
||||
screenOrientationListeners.remove(listener);
|
||||
public void removeCameraPermissionListener(CameraPermissionListener listener) {
|
||||
cameraPermissionListeners.remove(listener);
|
||||
}
|
||||
|
||||
public void addDownloadActionListener(DownloadActionListener listener) {
|
||||
@@ -583,17 +561,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
filePickerListeners.remove(listener);
|
||||
}
|
||||
|
||||
public void addCameraPermissionListener(CameraPermissionListener listener) {
|
||||
if (!cameraPermissionListeners.contains(listener)) {
|
||||
cameraPermissionListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeCameraPermissionListener(CameraPermissionListener listener) {
|
||||
cameraPermissionListeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
public void addSdkStatusListener(SdkStatusListener listener) {
|
||||
if (!sdkStatusListeners.contains(listener)) {
|
||||
sdkStatusListeners.add(listener);
|
||||
@@ -797,7 +764,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
private void renderFullMode() {
|
||||
getSupportActionBar().show();
|
||||
findViewById(R.id.content_main).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.floating_balance_main_container).setVisibility(inFullscreenMode ? View.INVISIBLE : View.VISIBLE);
|
||||
findViewById(R.id.floating_balance_main_container).setVisibility(View.VISIBLE);
|
||||
Fragment fragment = getCurrentFragment();
|
||||
if (!(fragment instanceof FileViewFragment)) {
|
||||
findViewById(R.id.global_now_playing_card).setVisibility(View.VISIBLE);
|
||||
@@ -1327,7 +1294,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
}
|
||||
|
||||
public void enterFullScreenMode() {
|
||||
inFullscreenMode = true;
|
||||
hideFloatingWalletBalance();
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
@@ -1371,7 +1337,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||
if (actionBar != null) {
|
||||
actionBar.show();
|
||||
}
|
||||
inFullscreenMode = false;
|
||||
}
|
||||
|
||||
private void initKeyStore() {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package io.lbry.browser.listener;
|
||||
|
||||
public interface ScreenOrientationListener {
|
||||
void onPortraitOrientationEntered();
|
||||
void onLandscapeOrientationEntered();
|
||||
}
|
||||
@@ -503,8 +503,10 @@ public class ChannelFormFragment extends BaseFragment implements
|
||||
activity.addFilePickerListener(this);
|
||||
activity.addWalletBalanceListener(this);
|
||||
|
||||
activity.setActionBarTitle(editMode ? R.string.edit_channel : R.string.create_a_channel);
|
||||
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(editMode ? R.string.edit_channel : R.string.create_a_channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,7 +544,10 @@ public class ChannelFormFragment extends BaseFragment implements
|
||||
LbryAnalytics.setCurrentScreen(activity, "Channel Form", "ChannelForm");
|
||||
activity.addStoragePermissionListener(this);
|
||||
if (editMode) {
|
||||
activity.setActionBarTitle(R.string.edit_channel);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.edit_channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
String filterText = Helper.getValue(inputTagFilter.getText());
|
||||
|
||||
@@ -94,7 +94,6 @@ import io.lbry.browser.dialog.SendTipDialogFragment;
|
||||
import io.lbry.browser.exceptions.LbryUriException;
|
||||
import io.lbry.browser.listener.DownloadActionListener;
|
||||
import io.lbry.browser.listener.FetchClaimsListener;
|
||||
import io.lbry.browser.listener.ScreenOrientationListener;
|
||||
import io.lbry.browser.listener.SdkStatusListener;
|
||||
import io.lbry.browser.listener.StoragePermissionListener;
|
||||
import io.lbry.browser.model.Claim;
|
||||
@@ -136,11 +135,7 @@ import io.lbry.lbrysdk.LbrynetService;
|
||||
import io.lbry.lbrysdk.Utils;
|
||||
|
||||
public class FileViewFragment extends BaseFragment implements
|
||||
MainActivity.BackPressInterceptor, DownloadActionListener,
|
||||
FetchClaimsListener,
|
||||
ScreenOrientationListener,
|
||||
SdkStatusListener,
|
||||
StoragePermissionListener {
|
||||
MainActivity.BackPressInterceptor, DownloadActionListener, FetchClaimsListener, SdkStatusListener, StoragePermissionListener {
|
||||
private static final int RELATED_CONTENT_SIZE = 16;
|
||||
private static final String DEFAULT_PLAYBACK_SPEED = "1x";
|
||||
|
||||
@@ -223,7 +218,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
MainActivity activity = (MainActivity) context;
|
||||
activity.setBackPressInterceptor(this);
|
||||
activity.addDownloadActionListener(this);
|
||||
activity.addScreenOrientationListener(this);
|
||||
activity.addFetchClaimsListener(this);
|
||||
if (!MainActivity.hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, context)) {
|
||||
activity.addStoragePermissionListener(this);
|
||||
@@ -296,7 +290,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
|
||||
if (claim != null) {
|
||||
Helper.saveViewHistory(currentUrl, claim);
|
||||
checkAndLoadRelatedContent();
|
||||
renderClaim();
|
||||
if (claim.getFile() == null) {
|
||||
loadFile();
|
||||
@@ -359,8 +352,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
}
|
||||
|
||||
private void initWebView(View root) {
|
||||
WebView webView = root.findViewById(R.id.file_view_webview);
|
||||
private void initWebView(View view) {
|
||||
WebView webView = view.findViewById(R.id.file_view_webview);
|
||||
webView.setWebViewClient(new LbryWebViewClient(getContext()));
|
||||
WebSettings webSettings = webView.getSettings();
|
||||
webSettings.setAllowFileAccess(true);
|
||||
@@ -396,7 +389,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
logUrlEvent(url);
|
||||
resetViewCount();
|
||||
resetFee();
|
||||
|
||||
View root = getView();
|
||||
if (root != null) {
|
||||
((RecyclerView) root.findViewById(R.id.file_view_related_content_list)).setAdapter(null);
|
||||
@@ -488,7 +480,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
|
||||
if (claim != null) {
|
||||
Helper.saveViewHistory(url, claim);
|
||||
checkAndLoadRelatedContent();
|
||||
renderClaim();
|
||||
}
|
||||
}
|
||||
@@ -540,10 +531,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
MainActivity activity = (MainActivity) context;
|
||||
activity.removeDownloadActionListener(this);
|
||||
activity.removeFetchClaimsListener(this);
|
||||
activity.removeScreenOrientationListener(this);
|
||||
activity.removeSdkStatusListener(this);
|
||||
activity.removeStoragePermissionListener(this);
|
||||
//activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,8 +578,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
|
||||
checkAndResetNowPlayingClaim();
|
||||
loadFile();
|
||||
|
||||
checkAndLoadRelatedContent();
|
||||
renderClaim();
|
||||
} else {
|
||||
// render nothing at location
|
||||
@@ -607,6 +594,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
private void initUi(View root) {
|
||||
initWebView(root);
|
||||
|
||||
buttonPublishSomething.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -1200,18 +1189,13 @@ public class FileViewFragment extends BaseFragment implements
|
||||
} else {
|
||||
restoreMainActionButton();
|
||||
}
|
||||
}
|
||||
checkOwnClaim();
|
||||
}
|
||||
|
||||
private void checkAndLoadRelatedContent() {
|
||||
View root = getView();
|
||||
if (root != null) {
|
||||
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
||||
if (relatedContentList == null || relatedContentList.getAdapter() == null || relatedContentList.getAdapter().getItemCount() == 0) {
|
||||
loadRelatedContent();
|
||||
}
|
||||
}
|
||||
checkOwnClaim();
|
||||
}
|
||||
|
||||
private void showUnsupportedView() {
|
||||
@@ -1569,31 +1553,25 @@ public class FileViewFragment extends BaseFragment implements
|
||||
if (!fileExists) {
|
||||
showError(getString(R.string.claim_file_not_found, claimFile != null ? claimFile.getDownloadPath() : ""));
|
||||
} else if (fileUri != null) {
|
||||
View root = getView();
|
||||
Context context = getContext();
|
||||
if (root != null) {
|
||||
if (mediaType.startsWith("image")) {
|
||||
// display the image
|
||||
View container = root.findViewById(R.id.file_view_imageviewer_container);
|
||||
PhotoView photoView = root.findViewById(R.id.file_view_imageviewer);
|
||||
if (mediaType.startsWith("image")) {
|
||||
// display the image
|
||||
View container = getView().findViewById(R.id.file_view_imageviewer_container);
|
||||
PhotoView photoView = getView().findViewById(R.id.file_view_imageviewer);
|
||||
|
||||
if (context != null) {
|
||||
Glide.with(context.getApplicationContext()).load(fileUri).centerInside().into(photoView);
|
||||
}
|
||||
hideFloatingWalletBalance();
|
||||
container.setVisibility(View.VISIBLE);
|
||||
} else if (mediaType.startsWith("text")) {
|
||||
// show web view (and parse markdown too)
|
||||
View container = root.findViewById(R.id.file_view_webview_container);
|
||||
WebView webView = root.findViewById(R.id.file_view_webview);
|
||||
if (Arrays.asList("text/markdown", "text/md").contains(mediaType.toLowerCase())) {
|
||||
loadMarkdownFromFile(claimFile.getDownloadPath());
|
||||
} else {
|
||||
webView.loadUrl(fileUri.toString());
|
||||
}
|
||||
hideFloatingWalletBalance();
|
||||
container.setVisibility(View.VISIBLE);
|
||||
Glide.with(getContext().getApplicationContext()).load(fileUri).centerInside().into(photoView);
|
||||
hideFloatingWalletBalance();
|
||||
container.setVisibility(View.VISIBLE);
|
||||
} else if (mediaType.startsWith("text")) {
|
||||
// show web view (and parse markdown too)
|
||||
View container = getView().findViewById(R.id.file_view_webview_container);
|
||||
WebView webView = getView().findViewById(R.id.file_view_webview);
|
||||
if (Arrays.asList("text/markdown", "text/md").contains(mediaType.toLowerCase())) {
|
||||
loadMarkdownFromFile(claimFile.getDownloadPath());
|
||||
} else {
|
||||
webView.loadUrl(fileUri.toString());
|
||||
}
|
||||
hideFloatingWalletBalance();
|
||||
container.setVisibility(View.VISIBLE);
|
||||
}
|
||||
handled = true;
|
||||
}
|
||||
@@ -1666,7 +1644,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
canShowMatureContent = sp.getBoolean(MainActivity.PREFERENCE_KEY_SHOW_MATURE_CONTENT, false);
|
||||
}
|
||||
|
||||
LighthouseSearchTask relatedTask = new LighthouseSearchTask(
|
||||
title, RELATED_CONTENT_SIZE, 0, canShowMatureContent, claimId, relatedLoading, new ClaimSearchResultHandler() {
|
||||
@Override
|
||||
@@ -1678,33 +1655,30 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
}
|
||||
|
||||
Context ctx = getContext();
|
||||
if (ctx != null) {
|
||||
relatedContentAdapter = new ClaimListAdapter(filteredClaims, ctx);
|
||||
relatedContentAdapter.setListener(new ClaimListAdapter.ClaimListItemListener() {
|
||||
@Override
|
||||
public void onClaimClicked(Claim claim) {
|
||||
if (context instanceof MainActivity) {
|
||||
MainActivity activity = (MainActivity) context;
|
||||
if (claim.getName().startsWith("@")) {
|
||||
activity.openChannelUrl(claim.getPermanentUrl());
|
||||
} else {
|
||||
activity.openFileUrl(claim.getPermanentUrl()); //openClaimUrl(claim.getPermanentUrl());
|
||||
}
|
||||
relatedContentAdapter = new ClaimListAdapter(filteredClaims, context);
|
||||
relatedContentAdapter.setListener(new ClaimListAdapter.ClaimListItemListener() {
|
||||
@Override
|
||||
public void onClaimClicked(Claim claim) {
|
||||
if (context instanceof MainActivity) {
|
||||
MainActivity activity = (MainActivity) context;
|
||||
if (claim.getName().startsWith("@")) {
|
||||
activity.openChannelUrl(claim.getPermanentUrl());
|
||||
} else {
|
||||
activity.openFileUrl(claim.getPermanentUrl()); //openClaimUrl(claim.getPermanentUrl());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
View v = getView();
|
||||
if (v != null) {
|
||||
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
||||
relatedContentList.setAdapter(relatedContentAdapter);
|
||||
relatedContentAdapter.notifyDataSetChanged();
|
||||
|
||||
Helper.setViewVisibility(
|
||||
v.findViewById(R.id.file_view_no_related_content),
|
||||
relatedContentAdapter == null || relatedContentAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
View v = getView();
|
||||
if (v != null) {
|
||||
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
||||
relatedContentList.setAdapter(relatedContentAdapter);
|
||||
relatedContentAdapter.notifyDataSetChanged();
|
||||
|
||||
Helper.setViewVisibility(
|
||||
v.findViewById(R.id.file_view_no_related_content),
|
||||
relatedContentAdapter == null || relatedContentAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1774,12 +1748,12 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SourceLockedOrientationActivity")
|
||||
private void disableFullScreenMode() {
|
||||
Context context = getContext();
|
||||
if (context instanceof MainActivity) {
|
||||
MainActivity activity = (MainActivity) context;
|
||||
View root = getView();
|
||||
|
||||
RelativeLayout mediaContainer = root.findViewById(R.id.file_view_media_container);
|
||||
View exoplayerContainer = root.findViewById(R.id.file_view_exoplayer_container);
|
||||
((ViewGroup) exoplayerContainer.getParent()).removeView(exoplayerContainer);
|
||||
@@ -2081,22 +2055,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
checkOwnClaim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPortraitOrientationEntered() {
|
||||
Context context = getContext();
|
||||
if (context instanceof MainActivity && ((MainActivity) context).isInFullscreenMode()) {
|
||||
disableFullScreenMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLandscapeOrientationEntered() {
|
||||
Context context = getContext();
|
||||
if (claim != null && claim.isPlayable() && context instanceof MainActivity && !((MainActivity) context).isInFullscreenMode()) {
|
||||
enableFullScreenMode();
|
||||
}
|
||||
}
|
||||
|
||||
private static class LbryWebViewClient extends WebViewClient {
|
||||
private Context context;
|
||||
public LbryWebViewClient(Context context) {
|
||||
|
||||
@@ -180,7 +180,10 @@ public class AboutFragment extends BaseFragment implements SdkStatusListener {
|
||||
activity.lockDrawer();
|
||||
activity.hideFloatingWalletBalance();
|
||||
|
||||
activity.setActionBarTitle(R.string.about_lbry);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.about_lbry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
|
||||
activity.lockDrawer();
|
||||
activity.hideFloatingWalletBalance();
|
||||
|
||||
activity.setActionBarTitle(R.string.settings);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,10 @@ public class PublishFormFragment extends BaseFragment implements
|
||||
activity.addFilePickerListener(this);
|
||||
activity.addWalletBalanceListener(this);
|
||||
|
||||
activity.setActionBarTitle(editMode ? R.string.edit_content : R.string.new_publish);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(editMode ? R.string.edit_content : R.string.new_publish);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,7 +889,10 @@ public class PublishFormFragment extends BaseFragment implements
|
||||
LbryAnalytics.setCurrentScreen(activity, "Channel Form", "ChannelForm");
|
||||
activity.addStoragePermissionListener(this);
|
||||
if (editMode) {
|
||||
activity.setActionBarTitle(R.string.edit_content);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.edit_content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -49,9 +48,7 @@ public class TransactionHistoryFragment extends BaseFragment implements Transact
|
||||
Context context = getContext();
|
||||
LinearLayoutManager llm = new LinearLayoutManager(context);
|
||||
transactionList.setLayoutManager(llm);
|
||||
DividerItemDecoration itemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
||||
itemDecoration.setDrawable(ContextCompat.getDrawable(context, R.drawable.thin_divider));
|
||||
transactionList.addItemDecoration(itemDecoration);
|
||||
transactionList.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
||||
|
||||
transactionList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
@@ -136,7 +133,10 @@ public class TransactionHistoryFragment extends BaseFragment implements Transact
|
||||
activity.showNavigationBackIcon();
|
||||
activity.lockDrawer();
|
||||
|
||||
activity.setActionBarTitle(R.string.transaction_history);
|
||||
ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.transaction_history);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd app
|
||||
react-native bundle --platform android --dev false --entry-file src/index.js --bundle-output ../src/main/assets/index.android.bundle --assets-dest ../src/main/res/
|
||||
cd ..
|
||||
buildozer android debug
|
||||
Reference in new issue
Block a user