diff --git a/app/src/main/assets/css/style.css b/app/src/main/assets/css/style.css index e7c6423..de374d6 100644 --- a/app/src/main/assets/css/style.css +++ b/app/src/main/assets/css/style.css @@ -1,3 +1,7 @@ .navbar.is-secondary, .footer{ display: none!important; +} + +html, body{ + overflow-x: hidden; } \ No newline at end of file diff --git a/app/src/main/java/app/fedilab/mobilizon/helper/Helper.java b/app/src/main/java/app/fedilab/mobilizon/helper/Helper.java index 18c2514..f655323 100644 --- a/app/src/main/java/app/fedilab/mobilizon/helper/Helper.java +++ b/app/src/main/java/app/fedilab/mobilizon/helper/Helper.java @@ -29,6 +29,7 @@ import java.io.InputStream; * see . */ public class Helper { + @SuppressWarnings({"unused", "RedundantSuppression"}) public static final String TAG = "mobilizon_app"; public static final String APP_PREFS = "app_prefs"; public static final String PREF_INSTANCE = "instance"; @@ -56,7 +57,7 @@ public class Helper { webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setUseWideViewPort(true); webView.getSettings().setLoadWithOverviewMode(true); - webView.getSettings().setSupportZoom(true); + webView.getSettings().setSupportZoom(false); webView.getSettings().setDisplayZoomControls(false); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setLoadsImagesAutomatically(true); diff --git a/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebChromeClient.java b/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebChromeClient.java index 0266ae9..6f6fab0 100644 --- a/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebChromeClient.java +++ b/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebChromeClient.java @@ -46,11 +46,11 @@ public class MobilizonWebChromeClient extends WebChromeClient implements MediaPl private ToggledFullscreenCallback toggledFullscreenCallback; - private WebView webView; - private View activityNonVideoView; - private ViewGroup activityVideoView; + private final WebView webView; + private final View activityNonVideoView; + private final ViewGroup activityVideoView; private boolean isVideoFullscreen; - private Activity activity; + private final Activity activity; public MobilizonWebChromeClient(Activity activity, WebView webView, FrameLayout activityNonVideoView, ViewGroup activityVideoView) { @@ -66,6 +66,7 @@ public class MobilizonWebChromeClient extends WebChromeClient implements MediaPl * * @param callback A VideoEnabledWebChromeClient.ToggledFullscreenCallback callback */ + @SuppressWarnings({"unused", "RedundantSuppression"}) public void setOnToggledFullscreen(ToggledFullscreenCallback callback) { this.toggledFullscreenCallback = callback; } diff --git a/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebViewClient.java b/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebViewClient.java index 0e5b5a9..4db5ecb 100644 --- a/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebViewClient.java +++ b/app/src/main/java/app/fedilab/mobilizon/webview/MobilizonWebViewClient.java @@ -42,8 +42,8 @@ import app.fedilab.mobilizon.helper.Helper; public class MobilizonWebViewClient extends WebViewClient { - private Activity activity; - private CoordinatorLayout rootView; + private final Activity activity; + private final CoordinatorLayout rootView; public MobilizonWebViewClient(Activity activity) { this.activity = activity; @@ -69,12 +69,12 @@ public class MobilizonWebViewClient extends WebViewClient { if (pair.getValue().startsWith("Bearer")) { if (!MainActivity.isAuthenticated) { MainActivity.isAuthenticated = true; - activity.runOnUiThread(() -> ((MainActivity) activity).drawMenu()); + activity.runOnUiThread(((MainActivity) activity)::drawMenu); } } else { if (MainActivity.isAuthenticated) { MainActivity.isAuthenticated = false; - activity.runOnUiThread(() -> ((MainActivity) activity).drawMenu()); + activity.runOnUiThread(((MainActivity) activity)::drawMenu); } } } diff --git a/app/src/main/res/layout/popup_about.xml b/app/src/main/res/layout/popup_about.xml index 7e3cc1f..812721c 100644 --- a/app/src/main/res/layout/popup_about.xml +++ b/app/src/main/res/layout/popup_about.xml @@ -95,7 +95,8 @@ app:layout_constraintTop_toBottomOf="@+id/about" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - android:layout_width="wrap_content" + android:layout_width="match_parent" + android:gravity="center" android:layout_height="wrap_content" android:text="@string/about_the_app" />