mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 12:03:09 -04:00
eliminated the bottom toolbar
This commit is contained in:
parent
5e1f8207bc
commit
69e5a7832c
@ -1303,12 +1303,11 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
|
|
||||||
private void updateBottomToolbarVisibility() {
|
private void updateBottomToolbarVisibility() {
|
||||||
if (checkNull(bottomToolbar)) {
|
if (checkNull(bottomToolbar)) {
|
||||||
if (sharedPreferenceUtil.getPrefBottomToolbar() && !HOME_URL.equals(
|
if (!HOME_URL.equals(
|
||||||
getCurrentWebView().getUrl())
|
getCurrentWebView().getUrl())
|
||||||
&& tabSwitcherRoot.getVisibility() != View.VISIBLE) {
|
&& tabSwitcherRoot.getVisibility() != View.VISIBLE) {
|
||||||
bottomToolbar.setVisibility(View.VISIBLE);
|
bottomToolbar.setVisibility(View.VISIBLE);
|
||||||
if (getCurrentWebView() instanceof ToolbarStaticKiwixWebView
|
if (getCurrentWebView() instanceof ToolbarStaticKiwixWebView) {
|
||||||
&& sharedPreferenceUtil.getPrefBottomToolbar()) {
|
|
||||||
contentFrame.setPadding(0, 0, 0,
|
contentFrame.setPadding(0, 0, 0,
|
||||||
(int) getResources().getDimension(R.dimen.bottom_toolbar_height));
|
(int) getResources().getDimension(R.dimen.bottom_toolbar_height));
|
||||||
} else {
|
} else {
|
||||||
|
@ -58,8 +58,6 @@ public final class Constants {
|
|||||||
|
|
||||||
public static final String PREF_WIFI_ONLY = "pref_wifi_only";
|
public static final String PREF_WIFI_ONLY = "pref_wifi_only";
|
||||||
|
|
||||||
public static final String PREF_BOTTOM_TOOLBAR = "pref_bottomtoolbar";
|
|
||||||
|
|
||||||
public static final String PREF_KIWIX_MOBILE = "kiwix-mobile";
|
public static final String PREF_KIWIX_MOBILE = "kiwix-mobile";
|
||||||
|
|
||||||
public static final String PREF_BACK_TO_TOP = "pref_backtotop";
|
public static final String PREF_BACK_TO_TOP = "pref_backtotop";
|
||||||
|
@ -10,7 +10,6 @@ import javax.inject.Singleton;
|
|||||||
|
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_AUTONIGHTMODE;
|
import static org.kiwix.kiwixmobile.utils.Constants.PREF_AUTONIGHTMODE;
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_BACK_TO_TOP;
|
import static org.kiwix.kiwixmobile.utils.Constants.PREF_BACK_TO_TOP;
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_BOTTOM_TOOLBAR;
|
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_EXTERNAL_LINK_POPUP;
|
import static org.kiwix.kiwixmobile.utils.Constants.PREF_EXTERNAL_LINK_POPUP;
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_FULLSCREEN;
|
import static org.kiwix.kiwixmobile.utils.Constants.PREF_FULLSCREEN;
|
||||||
import static org.kiwix.kiwixmobile.utils.Constants.PREF_HIDE_TOOLBAR;
|
import static org.kiwix.kiwixmobile.utils.Constants.PREF_HIDE_TOOLBAR;
|
||||||
@ -56,9 +55,6 @@ public class SharedPreferenceUtil {
|
|||||||
return sharedPreferences.getBoolean(PREF_FULLSCREEN, false);
|
return sharedPreferences.getBoolean(PREF_FULLSCREEN, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getPrefBottomToolbar() {
|
|
||||||
return sharedPreferences.getBoolean(PREF_BOTTOM_TOOLBAR, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getPrefBackToTop() {
|
public boolean getPrefBackToTop() {
|
||||||
return sharedPreferences.getBoolean(PREF_BACK_TO_TOP, false);
|
return sharedPreferences.getBoolean(PREF_BACK_TO_TOP, false);
|
||||||
|
@ -27,13 +27,6 @@
|
|||||||
android:summary="@string/pref_hidetoolbar_summary"
|
android:summary="@string/pref_hidetoolbar_summary"
|
||||||
android:title="@string/pref_hidetoolbar"/>
|
android:title="@string/pref_hidetoolbar"/>
|
||||||
|
|
||||||
<org.kiwix.kiwixmobile.settings.CustomSwitchPreference
|
|
||||||
android:enabled="false"
|
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="pref_bottomtoolbar"
|
|
||||||
android:summary="@string/pref_bottomtoolbar_summary"
|
|
||||||
android:title="@string/pref_bottomtoolbar"/>
|
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user