From 495f9b2eabc356ddeb7d8bf9941ad3f663e3fd2f Mon Sep 17 00:00:00 2001 From: Hsin-Yen Chung Date: Sun, 29 Oct 2023 13:05:22 +1100 Subject: [PATCH] finish the rotation method with click the button. --- app/build.gradle | 6 +++--- .../java/org/schabi/newpipe/RouterActivity.java | 1 - .../detail/BaseDescriptionFragment.java | 1 - .../schabi/newpipe/player/PlayQueueActivity.java | 3 +-- .../newpipe/player/helper/PlayerHelper.java | 2 +- .../schabi/newpipe/player/ui/MainPlayerUi.java | 2 +- .../main/res/drawable-xxxhdpi/magnify_button.png | Bin 0 -> 3408 bytes .../layout-large-land/fragment_video_detail.xml | 9 +++++++++ .../main/res/layout/fragment_video_detail.xml | 11 +++++++++++ app/src/main/res/values/settings_keys.xml | 2 +- app/src/main/res/values/strings.xml | 1 + 11 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 app/src/main/res/drawable-xxxhdpi/magnify_button.png diff --git a/app/build.gradle b/app/build.gradle index 7b69b5b72..b5a16ef9a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -196,9 +196,9 @@ dependencies { // Or you can use a commit you pushed to GitHub by just replacing TeamNewPipe with your GitHub // name and the commit hash with the commit hash of the (pushed) commit you want to test // This works thanks to JitPack: https://jitpack.io/ - implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751' - implementation 'com.github.TeamNewPipe:NewPipeExtractor:289db1178ab66694c23893e6a487d4708343c47b' - implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0' + implementation 'com.github.teamnewpipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751' + implementation 'com.github.teamnewpipe:NewPipeExtractor:289db1178ab66694c23893e6a487d4708343c47b' + implementation 'com.github.teamnewpipe:NoNonsense-FilePicker:5.0.0' /** Checkstyle **/ checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}" diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index c59dc7532..c15a9a3b9 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -550,7 +550,6 @@ public class RouterActivity extends AppCompatActivity { final AdapterChoiceItem popupPlayer = new AdapterChoiceItem( getString(R.string.popup_player_key), getString(R.string.popup_player), R.drawable.ic_picture_in_picture); - final List returnedItems = new ArrayList<>(); returnedItems.add(showInfo); // Always present diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/BaseDescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/BaseDescriptionFragment.java index e3bdc6592..0b7ffdfd0 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/BaseDescriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/BaseDescriptionFragment.java @@ -44,7 +44,6 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable; public abstract class BaseDescriptionFragment extends BaseFragment { private final CompositeDisposable descriptionDisposables = new CompositeDisposable(); protected FragmentDescriptionBinding binding; - @Override public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java index defc8ba21..698acc8aa 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java @@ -62,7 +62,7 @@ public final class PlayQueueActivity extends AppCompatActivity private static final int MENU_ID_AUDIO_TRACK = 71; private Player player; - + private boolean isFullscreen = false; private boolean serviceBound; private ServiceConnection serviceConnection; @@ -526,7 +526,6 @@ public final class PlayQueueActivity extends AppCompatActivity unbind(); finish(); } - //////////////////////////////////////////////////////////////////////////// // Binding Service Helper //////////////////////////////////////////////////////////////////////////// diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index a110a80d6..9a71013a4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -387,7 +387,7 @@ public final class PlayerHelper { // 0: Screen orientation is locked // if the accelerometer sensor is missing completely, assume locked orientation return android.provider.Settings.System.getInt( - context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 0 + context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 1) == 0 || !context.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_SENSOR_ACCELEROMETER); } diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java index 03f90a344..7b03b6fb7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java +++ b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java @@ -271,7 +271,7 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh closeItemsList(); showHideKodiButton(); - binding.fullScreenButton.setVisibility(View.GONE); + binding.fullScreenButton.setVisibility(View.VISIBLE); setupScreenRotationButton(); binding.resizeTextView.setVisibility(View.VISIBLE); binding.getRoot().findViewById(R.id.metadataView).setVisibility(View.VISIBLE); diff --git a/app/src/main/res/drawable-xxxhdpi/magnify_button.png b/app/src/main/res/drawable-xxxhdpi/magnify_button.png new file mode 100644 index 0000000000000000000000000000000000000000..aad13e4bb80e298231c1a00d28004a4a7a11f675 GIT binary patch literal 3408 zcmX9>dmxkT`zI?SYIAs-vrWoK(G*f)HoSA(+Qe6@*OWtYKFs&cIp)wxm_kG3^gcxB zm03|KhFN;6cgZA?B}}ZG%lGm7{qa2a^W67+-S>4}_jP?f*PZR@?xd`!sVE~Oqx`!w zjs&)*TMu*x_&%ojsRZob^E=L-?5!~O)T3cE*yqW@y!6rh{IZQ$lpH!=+J>3?K6Zx> zeFjm0p-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v<$m%Ch{kobAu2=RV5@ zNQ=9^KfblHc)FACvggpZE0@B&?m zVlfD%AaAAJ21$ugtXzFQs&Dd)QT4|yZ&`yV^hKWG_s4PF`Sd$BKpLQ5nGVZp#^OAc zC(lI4x29#?AZ?=)%=t?6Zc$Ll+EmbSRFCrzSbHH1VyUNuM^M}Lx+;P^sgF|Xwj*R$ z%xf@YF@gVwx!khV1b3=X4f7S)_uOtM1yG?q;d>GZ=oqS#Kml`?g(YMsA+|UYCB|y1 z{2Ws4;H4E}8;tqafJU^J46-`?_IQ{YhR-G)MjO6gWv^axL}yg8ZS`4gpc^NwtiY=Pqxf~Ksj%tX{_51zJ-31!4FCX@?(B&tD^~BQSg&5m?{r t&_Q|?6t{(P{!YBAx03#5u0N#{je#g7x8nJ(*{SWhzUY!5{ literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index d18681056..fde80ff9c 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -157,6 +157,15 @@ android:layout_height="match_parent" android:descendantFocusability="afterDescendants" /> + diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 1a4711581..c344b6367 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -140,12 +140,23 @@ tools:progress="40" tools:visibility="visible" /> + + + diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 880fa92da..426a7725d 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -85,7 +85,7 @@ start_main_player_fullscreen_key - + fullscreen_key autoplay_key @string/autoplay_wifi_key autoplay_always_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 435e9a382..5e6b6a2a5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -466,6 +466,7 @@ No Captions Fit Fill + Fullscreen Zoom Auto-generated