mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
removing the dividers from the file thumbnails list view too
This commit is contained in:
parent
8dac3880d6
commit
bd7ae6b182
2 changed files with 23 additions and 16 deletions
|
@ -13,6 +13,7 @@ import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
import android.widget.RelativeLayout
|
||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import androidx.core.view.MenuItemCompat
|
import androidx.core.view.MenuItemCompat
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
@ -680,6 +681,11 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
|
|
||||||
private fun setupGridLayoutManager() {
|
private fun setupGridLayoutManager() {
|
||||||
val layoutManager = media_grid.layoutManager as MyGridLayoutManager
|
val layoutManager = media_grid.layoutManager as MyGridLayoutManager
|
||||||
|
(media_grid.layoutParams as RelativeLayout.LayoutParams).apply {
|
||||||
|
topMargin = 0
|
||||||
|
bottomMargin = 0
|
||||||
|
}
|
||||||
|
|
||||||
if (config.scrollHorizontally) {
|
if (config.scrollHorizontally) {
|
||||||
layoutManager.orientation = RecyclerView.HORIZONTAL
|
layoutManager.orientation = RecyclerView.HORIZONTAL
|
||||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
|
@ -775,6 +781,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
layoutManager.spanCount = 1
|
layoutManager.spanCount = 1
|
||||||
layoutManager.orientation = RecyclerView.VERTICAL
|
layoutManager.orientation = RecyclerView.VERTICAL
|
||||||
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
media_refresh_layout.layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
|
|
||||||
|
val smallMargin = resources.getDimension(R.dimen.small_margin).toInt()
|
||||||
|
(media_grid.layoutParams as RelativeLayout.LayoutParams).apply {
|
||||||
|
topMargin = smallMargin
|
||||||
|
bottomMargin = smallMargin
|
||||||
|
}
|
||||||
|
|
||||||
mZoomListener = null
|
mZoomListener = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
android:id="@+id/media_item_holder"
|
android:id="@+id/media_item_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:paddingStart="@dimen/small_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingTop="@dimen/small_margin">
|
android:paddingTop="@dimen/small_margin"
|
||||||
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.gallery.pro.views.MySquareImageView
|
<com.simplemobiletools.gallery.pro.views.MySquareImageView
|
||||||
android:id="@+id/medium_thumbnail"
|
android:id="@+id/medium_thumbnail"
|
||||||
|
@ -21,9 +23,10 @@
|
||||||
android:layout_height="@dimen/selection_check_size"
|
android:layout_height="@dimen/selection_check_size"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:contentDescription="@null"
|
android:layout_marginTop="@dimen/small_margin"
|
||||||
android:layout_margin="@dimen/small_margin"
|
android:layout_marginEnd="@dimen/medium_margin"
|
||||||
android:background="@drawable/circle_background"
|
android:background="@drawable/circle_background"
|
||||||
|
android:contentDescription="@null"
|
||||||
android:padding="@dimen/tiny_margin"
|
android:padding="@dimen/tiny_margin"
|
||||||
android:src="@drawable/ic_check_vector"
|
android:src="@drawable/ic_check_vector"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
@ -38,7 +41,7 @@
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
android:paddingEnd="@dimen/normal_margin"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="@dimen/bigger_text_size"
|
android:textSize="@dimen/bigger_text_size"
|
||||||
|
@ -62,7 +65,7 @@
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginEnd="@dimen/small_margin"
|
android:layout_marginEnd="@dimen/small_margin"
|
||||||
android:paddingBottom="6dp"
|
android:paddingBottom="@dimen/medium_margin"
|
||||||
android:paddingEnd="@dimen/small_margin"
|
android:paddingEnd="@dimen/small_margin"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
android:shadowColor="@color/default_background_color"
|
android:shadowColor="@color/default_background_color"
|
||||||
|
@ -77,7 +80,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginBottom="6dp"
|
android:layout_marginBottom="@dimen/medium_margin"
|
||||||
android:layout_toStartOf="@+id/play_outline"
|
android:layout_toStartOf="@+id/play_outline"
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/small_margin"
|
||||||
android:paddingRight="@dimen/small_margin"
|
android:paddingRight="@dimen/small_margin"
|
||||||
|
@ -86,13 +89,4 @@
|
||||||
android:textSize="@dimen/normal_text_size"
|
android:textSize="@dimen/normal_text_size"
|
||||||
tools:text="00:05"/>
|
tools:text="00:05"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/dir_list_divider"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_alignBottom="@+id/medium_thumbnail"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:layout_toEndOf="@+id/medium_thumbnail"
|
|
||||||
android:background="@drawable/divider"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
Loading…
Reference in a new issue