From 21d42c92e592aaf4962f94f5cd92a5f21440228f Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Mon, 16 Oct 2017 18:59:59 -0700 Subject: [PATCH] -Reduced text size for hold to append tip. -Added options to turn off hold to append tip. --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 2 ++ app/src/main/res/layout/fragment_video_detail.xml | 2 +- app/src/main/res/values/settings_keys.xml | 1 + app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/appearance_settings.xml | 5 +++++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 177166996..1e5e4f5d2 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -480,6 +480,8 @@ public class VideoDetailFragment extends BaseStateFragment implement return new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { + if (!PreferenceManager.getDefaultSharedPreferences(activity).getBoolean(getString(R.string.show_hold_to_append_key), true)) return false; + if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { appendControlsDetail.setVisibility(View.VISIBLE); } else { diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index bded5fc2a..86e8d6ad9 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -64,7 +64,7 @@ android:paddingTop="10dp" android:layout_gravity="center" android:textColor="@android:color/white" - android:textSize="26sp" + android:textSize="20sp" android:textStyle="bold" android:text="@string/hold_to_append" android:visibility="gone" diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index dabbfb40d..5eee12c6c 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -96,6 +96,7 @@ show_search_suggestions show_play_with_kodi show_next_video + show_hold_to_append en search_language show_age_restricted_content diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2454cef9c..5b3712602 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -80,6 +80,8 @@ Download Next video Show next and similar videos + Show Hold to Append Tip + Show tip when background or popup button is pressed on video details page URL not supported Default content language Player diff --git a/app/src/main/res/xml/appearance_settings.xml b/app/src/main/res/xml/appearance_settings.xml index 62199a781..58b08a284 100644 --- a/app/src/main/res/xml/appearance_settings.xml +++ b/app/src/main/res/xml/appearance_settings.xml @@ -16,4 +16,9 @@ android:key="@string/show_next_video_key" android:title="@string/show_next_and_similar_title"/> +