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 165c8f578..3b4d4328e 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 258934053..402f5d38f 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 eecf610db..c50ee71d1 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 b1c01f198..97ef1d8e6 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 c79f92301..8670c8b26 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 e6df4abc0..4e3ef31d8 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 ee8a54edf..67f7b0f76 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 cd4423ec2..e5a91703e 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 ba2a10497..b5d7eb0fc 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 c479a9f14..c0f406cb0 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 000000000..f13661948 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_more_vert.png differ diff --git a/app/src/main/res/drawable-ldpi/ic_more_vert.png b/app/src/main/res/drawable-ldpi/ic_more_vert.png new file mode 100644 index 000000000..28d7e2a72 Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_more_vert.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_more_vert.png b/app/src/main/res/drawable-mdpi/ic_more_vert.png new file mode 100644 index 000000000..884a7dbee Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_more_vert.png differ 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 000000000..ccda84a80 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_more_vert.png differ 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 000000000..e858e65e3 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_more_vert.png differ 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 000000000..bc3375698 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_more_vert.png differ diff --git a/app/src/main/res/layout/reader_menu.xml b/app/src/main/res/layout/reader_menu.xml index e0165a401..4512751b6 100644 --- a/app/src/main/res/layout/reader_menu.xml +++ b/app/src/main/res/layout/reader_menu.xml @@ -77,13 +77,15 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" + android:id="@+id/reader_selector" + android:src="@drawable/ic_view_carousel" android:background="?android:selectableItemBackground" /> 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 000000000..6e97fed36 --- /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 d8b8d0899..a7690dc6d 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 971322f2f..9d1c93f78 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 a539c2f4b..6297d281d 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 cf3ae6c08..aa0da21f5 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" /> + + + +