From e66ba4d8343a74205325e38005895238447ab529 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 21 Nov 2015 02:27:34 +0100 Subject: [PATCH] Add more settings to the reader --- .../data/preference/PreferencesHelper.java | 22 +-- .../ui/manga/chapter/ChaptersFragment.java | 2 +- .../mangafeed/ui/reader/ReaderActivity.java | 99 +++++++++++-- .../mangafeed/ui/reader/ReaderMenu.java | 140 ++++++++++++------ .../viewer/horizontal/HorizontalReader.java | 29 +++- .../horizontal/HorizontalViewPager.java | 14 +- app/src/main/res/anim/enter_from_left.xml | 2 +- app/src/main/res/anim/enter_from_right.xml | 2 +- app/src/main/res/anim/exit_to_left.xml | 2 +- app/src/main/res/anim/exit_to_right.xml | 2 +- .../main/res/drawable-hdpi/ic_more_vert.png | Bin 0 -> 183 bytes .../main/res/drawable-ldpi/ic_more_vert.png | Bin 0 -> 156 bytes .../main/res/drawable-mdpi/ic_more_vert.png | Bin 0 -> 142 bytes .../main/res/drawable-xhdpi/ic_more_vert.png | Bin 0 -> 239 bytes .../main/res/drawable-xxhdpi/ic_more_vert.png | Bin 0 -> 363 bytes .../res/drawable-xxxhdpi/ic_more_vert.png | Bin 0 -> 588 bytes app/src/main/res/layout/reader_menu.xml | 6 +- app/src/main/res/layout/reader_popup.xml | 39 +++++ app/src/main/res/values/keys.xml | 7 +- app/src/main/res/values/strings.xml | 4 +- app/src/main/res/values/styles.xml | 7 + app/src/main/res/xml/pref_reader.xml | 8 + 22 files changed, 301 insertions(+), 84 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_more_vert.png create mode 100644 app/src/main/res/drawable-ldpi/ic_more_vert.png create mode 100644 app/src/main/res/drawable-mdpi/ic_more_vert.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_more_vert.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_more_vert.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_more_vert.png create mode 100644 app/src/main/res/layout/reader_popup.xml diff --git a/app/src/main/java/eu/kanade/mangafeed/data/preference/PreferencesHelper.java b/app/src/main/java/eu/kanade/mangafeed/data/preference/PreferencesHelper.java index 165c8f578b..3b4d4328e6 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/preference/PreferencesHelper.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/preference/PreferencesHelper.java @@ -4,6 +4,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; +import com.f2prateek.rx.preferences.Preference; import com.f2prateek.rx.preferences.RxSharedPreferences; import eu.kanade.mangafeed.R; @@ -36,21 +37,24 @@ public class PreferencesHelper { prefs.edit().clear().apply(); } - public boolean isHideStatusBarSet() { - return prefs.getBoolean(getKey(R.string.pref_hide_status_bar_key), true); + public Preference lockOrientation() { + return rxPrefs.getBoolean(getKey(R.string.pref_lock_orientation_key), true); } - public boolean isOrientationLocked() { - return prefs.getBoolean(getKey(R.string.pref_lock_orientation_key), true); + public Preference enableTransitions() { + return rxPrefs.getBoolean(getKey(R.string.pref_enable_transitions_key), true); } - public void setOrientationLocked(boolean lock) { - prefs.edit().putBoolean(getKey(R.string.pref_lock_orientation_key), lock).apply(); + public Preference showPageNumber() { + return rxPrefs.getBoolean(getKey(R.string.pref_show_page_number_key), true); } - public Observable isOrientationLockedObservable() { - return rxPrefs.getBoolean(getKey(R.string.pref_lock_orientation_key), true) - .asObservable(); + public Preference hideStatusBar() { + return rxPrefs.getBoolean(getKey(R.string.pref_hide_status_bar_key), true); + } + + public Preference keepScreenOn() { + return rxPrefs.getBoolean(getKey(R.string.pref_keep_screen_on_key), true); } public int getDefaultViewer() { diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersFragment.java index 2589340531..402f5d38f2 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersFragment.java @@ -165,7 +165,7 @@ public class ChaptersFragment extends BaseRxFragment implemen return true; } else { getPresenter().onChapterClicked(adapter.getItem(position)); - Intent intent = ReaderActivity.newInstance(getActivity()); + Intent intent = ReaderActivity.newIntent(getActivity()); startActivity(intent); return false; } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderActivity.java b/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderActivity.java index eecf610db4..c50ee71d17 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderActivity.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderActivity.java @@ -2,11 +2,13 @@ package eu.kanade.mangafeed.ui.reader; import android.content.Context; import android.content.Intent; +import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.widget.Toolbar; import android.view.MotionEvent; +import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; @@ -34,6 +36,7 @@ import eu.kanade.mangafeed.ui.reader.viewer.webtoon.WebtoonReader; import eu.kanade.mangafeed.util.ToastUtil; import icepick.Icepick; import nucleus.factory.RequiresPresenter; +import rx.subscriptions.CompositeSubscription; @RequiresPresenter(ReaderPresenter.class) public class ReaderActivity extends BaseRxActivity { @@ -42,20 +45,20 @@ public class ReaderActivity extends BaseRxActivity { @Bind(R.id.reader) FrameLayout container; @Bind(R.id.toolbar) Toolbar toolbar; - @Inject PreferencesHelper prefs; + @Inject PreferencesHelper preferences; private BaseReader viewer; private ReaderMenu readerMenu; private int uiFlags; + private CompositeSubscription subscriptions; private static final int LEFT_TO_RIGHT = 1; private static final int RIGHT_TO_LEFT = 2; private static final int VERTICAL = 3; private static final int WEBTOON = 4; - - public static Intent newInstance(Context context) { + public static Intent newIntent(Context context) { return new Intent(context, ReaderActivity.class); } @@ -67,14 +70,16 @@ public class ReaderActivity extends BaseRxActivity { ButterKnife.bind(this); setupToolbar(toolbar); + subscriptions = new CompositeSubscription(); - readerMenu = new ReaderMenu(this, prefs); + readerMenu = new ReaderMenu(this); Icepick.restoreInstanceState(readerMenu, savedState); if (savedState != null && readerMenu.showing) readerMenu.show(false); - createUiHideFlags(); enableHardwareAcceleration(); + + initializeSettings(); } @Override @@ -86,7 +91,7 @@ public class ReaderActivity extends BaseRxActivity { @Override protected void onResume() { super.onResume(); - hideSystemUI(); + setSystemUiVisibility(); } @Override @@ -102,16 +107,17 @@ public class ReaderActivity extends BaseRxActivity { super.onSaveInstanceState(outState); } - private void createUiHideFlags() { + private void createUiHideFlags(boolean statusBarHidden) { + uiFlags = 0; uiFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; - if (prefs.isHideStatusBarSet()) + if (statusBarHidden) uiFlags |= View.SYSTEM_UI_FLAG_FULLSCREEN; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) uiFlags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; } public void onChapterReady(List pages, Manga manga, Chapter chapter) { - viewer = getViewer(manga); + viewer = createViewer(manga); viewer.onPageListReady(pages); viewer.updatePageNumber(); readerMenu.onChapterReady(pages.size(), manga, chapter); @@ -132,7 +138,7 @@ public class ReaderActivity extends BaseRxActivity { viewer.setSelectedPage(pageIndex); } - public void hideSystemUI() { + public void setSystemUiVisibility() { getWindow().getDecorView().setSystemUiVisibility(uiFlags); } @@ -154,8 +160,12 @@ public class ReaderActivity extends BaseRxActivity { return container; } - private BaseReader getViewer(Manga manga) { - int mangaViewer = manga.viewer == 0 ? prefs.getDefaultViewer() : manga.viewer; + public PreferencesHelper getPreferences() { + return preferences; + } + + private BaseReader createViewer(Manga manga) { + int mangaViewer = manga.viewer == 0 ? preferences.getDefaultViewer() : manga.viewer; switch (mangaViewer) { case LEFT_TO_RIGHT: default: @@ -169,4 +179,69 @@ public class ReaderActivity extends BaseRxActivity { } } + private void initializeSettings() { + subscriptions.add(preferences.showPageNumber() + .asObservable() + .subscribe(this::setPageNumberVisibility)); + + subscriptions.add(preferences.lockOrientation() + .asObservable() + .subscribe(this::setOrientation)); + + subscriptions.add(preferences.hideStatusBar() + .asObservable() + .subscribe(this::setStatusBarVisibility)); + + preferences.keepScreenOn() + .asObservable() + .subscribe(this::setKeepScreenOn); + } + + private void setOrientation(boolean locked) { + if (locked) { + int orientation; + int rotation = ((WindowManager) getSystemService( + Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation(); + switch (rotation) { + case Surface.ROTATION_0: + orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; + break; + case Surface.ROTATION_90: + orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; + break; + case Surface.ROTATION_180: + orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT; + break; + default: + orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE; + break; + } + setRequestedOrientation(orientation); + } else { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); + } + } + + private void setPageNumberVisibility(boolean visible) { + pageNumber.setVisibility(visible ? View.VISIBLE : View.INVISIBLE); + } + + private void setStatusBarVisibility(boolean hidden) { + createUiHideFlags(hidden); + setSystemUiVisibility(); + } + + private void setKeepScreenOn(boolean enabled) { + if (enabled) { + getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + } else { + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + } + } + + protected void setMangaDefaultViewer(int viewer) { + getPresenter().updateMangaViewer(viewer); + recreate(); + } + } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderMenu.java b/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderMenu.java index b1c01f198f..97ef1d8e61 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderMenu.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/reader/ReaderMenu.java @@ -2,16 +2,18 @@ package eu.kanade.mangafeed.ui.reader; import android.app.Dialog; import android.content.Context; -import android.content.pm.ActivityInfo; import android.support.v7.app.AlertDialog; import android.support.v7.widget.Toolbar; -import android.view.Surface; +import android.view.Gravity; import android.view.View; import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; import android.view.animation.Animation; import android.view.animation.AnimationUtils; +import android.widget.CheckBox; import android.widget.ImageButton; import android.widget.LinearLayout; +import android.widget.PopupWindow; import android.widget.RelativeLayout; import android.widget.SeekBar; import android.widget.TextView; @@ -37,18 +39,21 @@ public class ReaderMenu { @Bind(R.id.total_pages) TextView totalPages; @Bind(R.id.lock_orientation) ImageButton lockOrientation; @Bind(R.id.reader_selector) ImageButton readerSelector; - + @Bind(R.id.reader_extra_settings) ImageButton extraSettings; private ReaderActivity activity; private PreferencesHelper preferences; + @State boolean showing; + private PopupWindow popupWindow; + private DecimalFormat decimalFormat; private CompositeSubscription subscriptions; - public ReaderMenu(ReaderActivity activity, PreferencesHelper preferences) { + public ReaderMenu(ReaderActivity activity) { this.activity = activity; - this.preferences = preferences; + this.preferences = activity.getPreferences(); ButterKnife.bind(this, activity); // Intercept all image events in this layout @@ -94,6 +99,8 @@ public class ReaderMenu { Animation bottomMenuAnimation = AnimationUtils.loadAnimation(activity, R.anim.exit_to_bottom); bottomMenu.startAnimation(bottomMenuAnimation); + popupWindow.dismiss(); + showing = false; } @@ -116,11 +123,18 @@ public class ReaderMenu { private void initializeOptions() { // Orientation changes - lockOrientation.setOnClickListener(v -> - preferences.setOrientationLocked(!preferences.isOrientationLocked())); + subscriptions.add(preferences.lockOrientation().asObservable() + .subscribe(locked -> { + int resourceId = !locked ? R.drawable.ic_screen_rotation : + activity.getResources().getConfiguration().orientation == 1 ? + R.drawable.ic_screen_lock_portrait : + R.drawable.ic_screen_lock_landscape; - subscriptions.add(preferences.isOrientationLockedObservable() - .subscribe(this::onOrientationOptionChanged)); + lockOrientation.setImageResource(resourceId); + })); + + lockOrientation.setOnClickListener(v -> + preferences.lockOrientation().set(!preferences.lockOrientation().get())); // Reader selector readerSelector.setOnClickListener(v -> { @@ -128,57 +142,84 @@ public class ReaderMenu { final Dialog dialog = new AlertDialog.Builder(activity) .setSingleChoiceItems(R.array.viewers_selector, manga.viewer, (d, which) -> { if (manga.viewer != which) { - activity.getPresenter().updateMangaViewer(which); - activity.recreate(); + activity.setMangaDefaultViewer(which); } d.dismiss(); }) .create(); + showImmersiveDialog(dialog); + }); - // Hack to not leave immersive mode - dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, - WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE); - dialog.getWindow().getDecorView().setSystemUiVisibility( - activity.getWindow().getDecorView().getSystemUiVisibility()); - dialog.show(); - dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE); - WindowManager wm = (WindowManager) activity.getSystemService(Context.WINDOW_SERVICE); - wm.updateViewLayout(activity.getWindow().getDecorView(), activity.getWindow().getAttributes()); + // Extra settings menu + final View popupView = activity.getLayoutInflater().inflate(R.layout.reader_popup, null); + popupWindow = new SettingsPopupWindow(popupView); + + extraSettings.setOnClickListener(v -> { + if (!popupWindow.isShowing()) + popupWindow.showAtLocation(extraSettings, + Gravity.BOTTOM | Gravity.RIGHT, 0, bottomMenu.getHeight()); + else + popupWindow.dismiss(); }); } - private void onOrientationOptionChanged(boolean locked) { - if (locked) - lockOrientation(); - else - activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); - int resourceId = !locked ? R.drawable.ic_screen_rotation : - activity.getResources().getConfiguration().orientation == 1 ? - R.drawable.ic_screen_lock_portrait : - R.drawable.ic_screen_lock_landscape; - - lockOrientation.setImageResource(resourceId); + private void showImmersiveDialog(Dialog dialog) { + // Hack to not leave immersive mode + dialog.getWindow().setFlags(LayoutParams.FLAG_NOT_FOCUSABLE, + LayoutParams.FLAG_NOT_FOCUSABLE); + dialog.getWindow().getDecorView().setSystemUiVisibility( + activity.getWindow().getDecorView().getSystemUiVisibility()); + dialog.show(); + dialog.getWindow().clearFlags(LayoutParams.FLAG_NOT_FOCUSABLE); + WindowManager wm = (WindowManager) activity.getSystemService(Context.WINDOW_SERVICE); + wm.updateViewLayout(activity.getWindow().getDecorView(), activity.getWindow().getAttributes()); } - private void lockOrientation() { - int orientation; - int rotation = ((WindowManager) activity.getSystemService( - Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation(); - switch (rotation) { - case Surface.ROTATION_0: - orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; - break; - case Surface.ROTATION_90: - orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; - break; - case Surface.ROTATION_180: - orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT; - break; - default: - orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE; - break; + class SettingsPopupWindow extends PopupWindow { + + @Bind(R.id.enable_transitions) CheckBox enableTransitions; + @Bind(R.id.show_page_number) CheckBox showPageNumber; + @Bind(R.id.hide_status_bar) CheckBox hideStatusBar; + @Bind(R.id.keep_screen_on) CheckBox keepScreenOn; + + public SettingsPopupWindow(View view) { + super(view, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); + setAnimationStyle(R.style.reader_settings_popup_animation); + ButterKnife.bind(this, view); + initializePopupMenu(); } - activity.setRequestedOrientation(orientation); + + private void initializePopupMenu() { + subscriptions.add(preferences.enableTransitions() + .asObservable() + .subscribe(enableTransitions::setChecked)); + + subscriptions.add(preferences.showPageNumber() + .asObservable() + .subscribe(showPageNumber::setChecked)); + + subscriptions.add(preferences.hideStatusBar() + .asObservable() + .subscribe(hideStatusBar::setChecked)); + + subscriptions.add(preferences.keepScreenOn() + .asObservable() + .subscribe(keepScreenOn::setChecked)); + + enableTransitions.setOnCheckedChangeListener((view, isChecked) -> + preferences.enableTransitions().set(isChecked)); + + showPageNumber.setOnCheckedChangeListener((view, isChecked) -> + preferences.showPageNumber().set(isChecked)); + + hideStatusBar.setOnCheckedChangeListener((view, isChecked) -> + preferences.hideStatusBar().set(isChecked)); + + keepScreenOn.setOnCheckedChangeListener((view, isChecked) -> + preferences.keepScreenOn().set(isChecked)); + + } + } class PageSeekBarChangeListener implements SeekBar.OnSeekBarChangeListener { @@ -214,4 +255,5 @@ public class ReaderMenu { } } + } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalReader.java b/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalReader.java index c79f923015..8670c8b263 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalReader.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalReader.java @@ -11,6 +11,7 @@ import eu.kanade.mangafeed.data.source.model.Page; import eu.kanade.mangafeed.ui.reader.ReaderActivity; import eu.kanade.mangafeed.ui.reader.viewer.base.BaseReader; import eu.kanade.mangafeed.ui.reader.viewer.common.ViewPagerReaderAdapter; +import rx.Subscription; public abstract class HorizontalReader extends BaseReader { @@ -18,11 +19,17 @@ public abstract class HorizontalReader extends BaseReader { protected ViewPagerReaderAdapter adapter; + private boolean transitions; + private Subscription transitionsSubscription; + public HorizontalReader(ReaderActivity activity) { super(activity); activity.getLayoutInflater().inflate(R.layout.reader_horizontal, container); ButterKnife.bind(this, container); + transitionsSubscription = activity.getPreferences().enableTransitions().asObservable() + .subscribe(value -> transitions = value); + viewPager.setOffscreenPageLimit(3); viewPager.addOnPageChangeListener(new HorizontalViewPager.SimpleOnPageChangeListener() { @Override @@ -42,7 +49,22 @@ public abstract class HorizontalReader extends BaseReader { onLastPageOut(); } }); - viewPager.setOnChapterSingleTapListener(activity::onCenterSingleTap); + viewPager.setOnChapterSingleTapListener(new HorizontalViewPager.OnChapterSingleTapListener() { + @Override + public void onCenterTap() { + activity.onCenterSingleTap(); + } + + @Override + public void onLeftSideTap() { + viewPager.setCurrentItem(viewPager.getCurrentItem() - 1, transitions); + } + + @Override + public void onRightSideTap() { + viewPager.setCurrentItem(viewPager.getCurrentItem() + 1, transitions); + } + }); } @Override @@ -67,6 +89,11 @@ public abstract class HorizontalReader extends BaseReader { return viewPager.onImageTouch(motionEvent); } + @Override + public void destroySubscriptions() { + transitionsSubscription.unsubscribe(); + } + public abstract void onFirstPageOut(); public abstract void onLastPageOut(); diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalViewPager.java b/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalViewPager.java index e6df4abc0d..4e3ef31d82 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalViewPager.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/reader/viewer/horizontal/HorizontalViewPager.java @@ -90,7 +90,9 @@ public class HorizontalViewPager extends ViewPager { } public interface OnChapterSingleTapListener { - void onSingleTap(); + void onCenterTap(); + void onLeftSideTap(); + void onRightSideTap(); } public void setOnChapterBoundariesOutListener(OnChapterBoundariesOutListener onChapterBoundariesOutListener) { @@ -111,7 +113,9 @@ public class HorizontalViewPager extends ViewPager { if (positionX < getWidth() * LEFT_REGION) { if (position != 0) { - setCurrentItem(position - 1, true); + if (mOnChapterSingleTapListener != null) { + mOnChapterSingleTapListener.onLeftSideTap(); + } } else { if (mOnChapterBoundariesOutListener != null) { mOnChapterBoundariesOutListener.onFirstPageOutEvent(); @@ -119,7 +123,9 @@ public class HorizontalViewPager extends ViewPager { } } else if (positionX > getWidth() * RIGHT_REGION) { if (position != getAdapter().getCount() - 1) { - setCurrentItem(position + 1, true); + if (mOnChapterSingleTapListener != null) { + mOnChapterSingleTapListener.onRightSideTap(); + } } else { if (mOnChapterBoundariesOutListener != null) { mOnChapterBoundariesOutListener.onLastPageOutEvent(); @@ -127,7 +133,7 @@ public class HorizontalViewPager extends ViewPager { } } else { if (mOnChapterSingleTapListener != null) { - mOnChapterSingleTapListener.onSingleTap(); + mOnChapterSingleTapListener.onCenterTap(); } } diff --git a/app/src/main/res/anim/enter_from_left.xml b/app/src/main/res/anim/enter_from_left.xml index ee8a54edfc..67f7b0f76a 100644 --- a/app/src/main/res/anim/enter_from_left.xml +++ b/app/src/main/res/anim/enter_from_left.xml @@ -2,7 +2,7 @@ \ No newline at end of file diff --git a/app/src/main/res/anim/enter_from_right.xml b/app/src/main/res/anim/enter_from_right.xml index cd4423ec21..e5a91703ea 100644 --- a/app/src/main/res/anim/enter_from_right.xml +++ b/app/src/main/res/anim/enter_from_right.xml @@ -2,7 +2,7 @@ \ No newline at end of file diff --git a/app/src/main/res/anim/exit_to_left.xml b/app/src/main/res/anim/exit_to_left.xml index ba2a10497a..b5d7eb0fcc 100644 --- a/app/src/main/res/anim/exit_to_left.xml +++ b/app/src/main/res/anim/exit_to_left.xml @@ -2,7 +2,7 @@ \ No newline at end of file diff --git a/app/src/main/res/anim/exit_to_right.xml b/app/src/main/res/anim/exit_to_right.xml index c479a9f149..c0f406cb01 100644 --- a/app/src/main/res/anim/exit_to_right.xml +++ b/app/src/main/res/anim/exit_to_right.xml @@ -2,7 +2,7 @@ \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_more_vert.png b/app/src/main/res/drawable-hdpi/ic_more_vert.png new file mode 100644 index 0000000000000000000000000000000000000000..f13661948cad8047bdb186a87f18828ff0aa9969 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL0wmRZ7KH(+I!_nJkcwMxuO8%WP~dU6n5U4Z z+_;frv1I4rP#cLwb8N1#d_K*fKkB8pj+vuWxc_W4PJWthB*B*lcf?AkbFDc@4Un`_z8{tz+bP0l+XkK D|k0wldT1B8K8sHcl#NX4zUmrip!DDt>mT=QkB zzQ(qf%NsBDW+ueg6ioW7*pj`$I=kr~bM1;55*i&cA%$wi7fMzXUnp2n7*MED7;tC* q%iptF7AS}=X$qOZ738>&S@-Af_+86x+gSiDVDNPHb6Mw<&;$T`b2J|S literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_more_vert.png b/app/src/main/res/drawable-xhdpi/ic_more_vert.png new file mode 100644 index 0000000000000000000000000000000000000000..ccda84a801cf3c1e73023f11773d3311af9a9679 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhawwt2cZhE&{od(DySkb#Kn#WOzN z7wkBa^inU^dcvb1uk`c$O&&jt52{y8=9O`pRNs9n|1A@TfPzBBq)tA|^i_s=014?EN;UX`S7L2~Ab7WUqAcv zjdx9R_F>Ci?(V(y>0RA>j^2G~Z!NpbR>46;`KX7XPzIPXddtYTNJ7)CYhuz8F!hiN eZ1X?aFAV37)V)yn^rQ~x0|rl5KbLh*2~7ZF6=OaC literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_more_vert.png b/app/src/main/res/drawable-xxhdpi/ic_more_vert.png new file mode 100644 index 0000000000000000000000000000000000000000..e858e65e3f3d8baefba1d3042b966214eec3ea35 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0vp^IUvlz0wh)Q=esd5FdBKfIEGZ*dV3=<>yU#$!@~+m z#flE4AQAt}i;G1j#w~oMc!m9I>aGjZ7cKjp^0FoW8^goq4Kx4vn*6oll|Tj&W;Ya` zZS1Ozc`UR$;@BGb4S_XB-sUVi%QyRorrcS>V>1&M^IbDvdzMSurh>EnoRxNt+}4@T zTGp=Guzk*kTG4H1Id_L8KA*F}J3eu@)*EB>oXA$)qC;t+H?pstP5!L?+V;KI)oDjp zX7d@I*~8LrozY%#^55-C)8>Borz&IjduRP;du!d(m$%hyJ@>RJ-sbbE32Xqq5?{8_+Pz`L2G@?`{ts_2Z4de;OXk;vd$@?2>`BOpw9pR literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_more_vert.png b/app/src/main/res/drawable-xxxhdpi/ic_more_vert.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3375698fcff5ad44433d85013041494a17b16f GIT binary patch literal 588 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ)^zFbR9QIEGZ*dV4F@>ve!g+e1E= z*XNh89ChqSy7;qWg>ZmO-wTGEy(=Q7?G#kqQmrcCk!b((L4n@WgYRa1nS11jmoo#0 zfPzB<10z!kh+qNn*q}mE1?`2h=Rb$z3S@ zvNP=~qwRO5s#W|i){0;7u63Bdw_#cX!`5%Fl+B(f{*92o5URi6^sk0*)qfWLFuiy9 z*o=Ou^0|$9uWH0@ce|?3`+j5P*V5yj>I)Xnik}g?#3p^~{vzAH%7=$bO}?Gq&a3}+ zdExG7ec!IioZTIF>%ZKM&CfdjF0EV=VfNq7tp2;t_Q&diyC6f1AX$|fQ6f%=}WmXhE@yNIQ*aOR(QcVYVnG|9RI~L z{1(qp)0aA$B6YL`hWyyKxm^@*Z(xvw+mS0d!EK{KZ&D%Hu#@@yZW}AUWr%cN)=)Dq z0}DHT7Vlluu*#NGZoz-w#TG9V*9KnE*ama}5KR{EO)~0DvVx)I%+ZTqbUQmV@Ia%D iYrj^veJU`OFnGH9xvX diff --git a/app/src/main/res/layout/reader_popup.xml b/app/src/main/res/layout/reader_popup.xml new file mode 100644 index 0000000000..6e97fed369 --- /dev/null +++ b/app/src/main/res/layout/reader_popup.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/keys.xml b/app/src/main/res/values/keys.xml index d8b8d0899b..a7690dc6d1 100644 --- a/app/src/main/res/values/keys.xml +++ b/app/src/main/res/values/keys.xml @@ -3,9 +3,14 @@ pref_category_reader_key pref_category_accounts_key pref_category_downloads_key + + pref_default_viewer_key pref_hide_status_bar_key pref_lock_orientation_key - pref_default_viewer_key + pref_enable_transitions_key + pref_show_page_number_key + pref_keep_screen_on_key + pref_download_directory_key pref_download_threads_key \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 971322f2f7..9d1c93f78f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,6 +34,9 @@ Right to left Vertical Webtoon (experimental) + Lock orientation + Enable transitions + Show page number Downloads directory @@ -83,6 +86,5 @@ Update completed No new chapters found Found new chapters for: - Lock orientation diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a539c2f4bd..6297d281dc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -99,4 +99,11 @@ true false + + diff --git a/app/src/main/res/xml/pref_reader.xml b/app/src/main/res/xml/pref_reader.xml index cf3ae6c087..aa0da21f5a 100644 --- a/app/src/main/res/xml/pref_reader.xml +++ b/app/src/main/res/xml/pref_reader.xml @@ -9,6 +9,14 @@ android:key="@string/pref_lock_orientation_key" android:defaultValue="true" /> + + + +