set spanCount according to screen width
This commit is contained in:
		@ -19,7 +19,7 @@
 | 
			
		||||
        app:layout_constraintStart_toStartOf="parent"
 | 
			
		||||
        app:layout_constraintTop_toTopOf="parent"
 | 
			
		||||
        app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
 | 
			
		||||
        app:spanCount="2"
 | 
			
		||||
        app:spanCount="@integer/item_media_columns"
 | 
			
		||||
        tools:listitem="@layout/item_media" />
 | 
			
		||||
 | 
			
		||||
</androidx.constraintlayout.widget.ConstraintLayout>
 | 
			
		||||
@ -16,7 +16,7 @@
 | 
			
		||||
        android:paddingEnd="3dp"
 | 
			
		||||
        android:paddingBottom="3dp"
 | 
			
		||||
        app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
 | 
			
		||||
        app:spanCount="2"
 | 
			
		||||
        app:spanCount="@integer/item_media_columns"
 | 
			
		||||
        tools:listitem="@layout/item_media" />
 | 
			
		||||
 | 
			
		||||
</FrameLayout>
 | 
			
		||||
@ -35,7 +35,7 @@
 | 
			
		||||
        app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
        app:layout_constraintStart_toStartOf="parent"
 | 
			
		||||
        app:layout_constraintTop_toBottomOf="@+id/search_text"
 | 
			
		||||
        app:spanCount="2"
 | 
			
		||||
        app:spanCount="@integer/item_media_columns"
 | 
			
		||||
        tools:listitem="@layout/item_media">
 | 
			
		||||
 | 
			
		||||
    </androidx.recyclerview.widget.RecyclerView>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								app/src/main/res/values-sw600dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								app/src/main/res/values-sw600dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<resources>
 | 
			
		||||
    <item name="item_media_columns" type="integer">3</item>
 | 
			
		||||
</resources>
 | 
			
		||||
							
								
								
									
										4
									
								
								app/src/main/res/values-sw720dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								app/src/main/res/values-sw720dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<resources>
 | 
			
		||||
    <item name="item_media_columns" type="integer">4</item>
 | 
			
		||||
</resources>
 | 
			
		||||
							
								
								
									
										4
									
								
								app/src/main/res/values-sw840dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								app/src/main/res/values-sw840dp/dimens.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<resources>
 | 
			
		||||
    <item name="item_media_columns" type="integer">5</item>
 | 
			
		||||
</resources>
 | 
			
		||||
@ -2,4 +2,5 @@
 | 
			
		||||
<resources>
 | 
			
		||||
    <dimen name="player_styled_progress_layout_height">28dp</dimen>
 | 
			
		||||
    <dimen name="player_styled_progress_margin_bottom">52dp</dimen>
 | 
			
		||||
    <item name="item_media_columns" type="integer">2</item>
 | 
			
		||||
</resources>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user