mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	| @@ -61,7 +61,8 @@ | |||||||
|             android:name=".player.MainVideoPlayer" |             android:name=".player.MainVideoPlayer" | ||||||
|             android:configChanges="keyboard|keyboardHidden|orientation|screenSize" |             android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | ||||||
|             android:label="@string/app_name" |             android:label="@string/app_name" | ||||||
|             android:launchMode="singleTask"/> |             android:launchMode="singleTask" | ||||||
|  |             android:theme="@style/VideoPlayerTheme"/> | ||||||
|  |  | ||||||
|         <activity |         <activity | ||||||
|             android:name=".settings.SettingsActivity" |             android:name=".settings.SettingsActivity" | ||||||
|   | |||||||
| @@ -45,9 +45,11 @@ import androidx.recyclerview.widget.ItemTouchHelper; | |||||||
| import android.util.DisplayMetrics; | import android.util.DisplayMetrics; | ||||||
| import android.util.Log; | import android.util.Log; | ||||||
| import android.util.TypedValue; | import android.util.TypedValue; | ||||||
|  | import android.view.DisplayCutout; | ||||||
| import android.view.GestureDetector; | import android.view.GestureDetector; | ||||||
| import android.view.MotionEvent; | import android.view.MotionEvent; | ||||||
| import android.view.View; | import android.view.View; | ||||||
|  | import android.view.WindowInsets; | ||||||
| import android.view.WindowManager; | import android.view.WindowManager; | ||||||
| import android.widget.Button; | import android.widget.Button; | ||||||
| import android.widget.ImageButton; | import android.widget.ImageButton; | ||||||
| @@ -550,6 +552,19 @@ public final class MainVideoPlayer extends AppCompatActivity | |||||||
|                     setInitialGestureValues(); |                     setInitialGestureValues(); | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
|  |             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { | ||||||
|  |                 queueLayout.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() { | ||||||
|  |                     @Override | ||||||
|  |                     public WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) { | ||||||
|  |                         final DisplayCutout cutout = windowInsets.getDisplayCutout(); | ||||||
|  |                         if (cutout != null) | ||||||
|  |                             view.setPadding(cutout.getSafeInsetLeft(), cutout.getSafeInsetTop(), | ||||||
|  |                                     cutout.getSafeInsetRight(), cutout.getSafeInsetBottom()); | ||||||
|  |                         return windowInsets; | ||||||
|  |                     } | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public void minimize() { |         public void minimize() { | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								app/src/main/res/values-v28/styles.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/src/main/res/values-v28/styles.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||||
|  | <resources> | ||||||
|  |     <style name="VideoPlayerTheme"> | ||||||
|  |         <item name="android:windowLayoutInDisplayCutoutMode"> | ||||||
|  |             shortEdges | ||||||
|  |         </item> | ||||||
|  |     </style> | ||||||
|  | </resources> | ||||||
| @@ -247,4 +247,6 @@ | |||||||
|     <style name="NavViewTextStyle"> |     <style name="NavViewTextStyle"> | ||||||
|         <item name="android:ellipsize">end</item> |         <item name="android:ellipsize">end</item> | ||||||
|     </style> |     </style> | ||||||
|  |  | ||||||
|  |     <style name="VideoPlayerTheme" /> | ||||||
| </resources> | </resources> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tobias Groza
					Tobias Groza