Merge remote-tracking branch 'origin/master'

This commit is contained in:
Rashiq Ahmad 2013-12-06 15:18:51 +01:00
commit 2f2bc1e7af
2 changed files with 3 additions and 6 deletions

View File

@ -77,7 +77,7 @@
<Button
android:id="@+id/button_backtotop"
android:layout_width="fill_parent"
android:layout_height="30px"
android:layout_height="wrap_content"
android:alpha="0.6"
android:gravity="center"
android:textColor="@android:color/black"

View File

@ -364,7 +364,6 @@ public class KiwixMobileFragment extends Fragment {
@Override
public void onPageChanged(int page, int maxPages) {
if (isButtonEnabled) {
if (webView.getScrollY() > 200) {
if (mBackToTopButton.getVisibility() == View.INVISIBLE) {
mBackToTopButton.setText(R.string.button_backtotop);
@ -620,7 +619,7 @@ public class KiwixMobileFragment extends Fragment {
String pref_zoom = mySharedPreferences.getString(PREF_ZOOM, AUTOMATIC);
Boolean pref_zoom_enabled = mySharedPreferences.getBoolean(PREF_ZOOM_ENABLED, false);
Boolean pref_nightmode = mySharedPreferences.getBoolean(PREF_NIGHTMODE, false);
isButtonEnabled = mySharedPreferences.getBoolean("pref_top_button", isButtonEnabled);
isButtonEnabled = mySharedPreferences.getBoolean("pref_backtotop", isButtonEnabled);
if (pref_zoom.equals(AUTOMATIC)) {
setDefaultZoom();
@ -642,10 +641,8 @@ public class KiwixMobileFragment extends Fragment {
webView.getSettings().setDisplayZoomControls(pref_zoom_enabled);
if (!isButtonEnabled) {
if (mBackToTopButton.getVisibility() == View.VISIBLE) {
mBackToTopButton.setVisibility(View.INVISIBLE);
}
}
// Night mode status
Log.d(TAG_KIWIX, "pref_nightmode value (" + pref_nightmode + ")");