mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
highlight selected items at list views too
This commit is contained in:
parent
9ff50cc48a
commit
1b5040ebcd
4 changed files with 27 additions and 19 deletions
|
@ -680,6 +680,10 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
||||||
dir_check.background?.applyColorFilter(primaryColor)
|
dir_check.background?.applyColorFilter(primaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isListViewType) {
|
||||||
|
dir_holder.isSelected = isSelected
|
||||||
|
}
|
||||||
|
|
||||||
if (scrollHorizontally && !isListViewType && folderStyle == FOLDER_STYLE_ROUNDED_CORNERS) {
|
if (scrollHorizontally && !isListViewType && folderStyle == FOLDER_STYLE_ROUNDED_CORNERS) {
|
||||||
(dir_thumbnail.layoutParams as RelativeLayout.LayoutParams).addRule(RelativeLayout.ABOVE, dir_name.id)
|
(dir_thumbnail.layoutParams as RelativeLayout.LayoutParams).addRule(RelativeLayout.ABOVE, dir_name.id)
|
||||||
|
|
||||||
|
|
|
@ -534,6 +534,10 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: ArrayList<ThumbnailI
|
||||||
medium_check?.background?.applyColorFilter(primaryColor)
|
medium_check?.background?.applyColorFilter(primaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isListViewType) {
|
||||||
|
media_item_holder.isSelected = isSelected
|
||||||
|
}
|
||||||
|
|
||||||
var path = medium.path
|
var path = medium.path
|
||||||
if (hasOTGConnected && context.isPathOnOTG(path)) {
|
if (hasOTGConnected && context.isPathOnOTG(path)) {
|
||||||
path = path.getOTGPublicPath(context)
|
path = path.getOTGPublicPath(context)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/dir_holder"
|
android:id="@+id/dir_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:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:foreground="@drawable/selector"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/small_margin"
|
||||||
android:paddingBottom="@dimen/small_margin">
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/media_item_holder"
|
android:id="@+id/media_item_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -8,6 +7,7 @@
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:foreground="@drawable/selector"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/small_margin"
|
||||||
android:paddingBottom="@dimen/small_margin">
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
@ -65,9 +65,9 @@
|
||||||
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="@dimen/medium_margin"
|
|
||||||
android:paddingEnd="@dimen/small_margin"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:paddingEnd="@dimen/small_margin"
|
||||||
|
android:paddingBottom="@dimen/medium_margin"
|
||||||
android:shadowColor="@color/default_background_color"
|
android:shadowColor="@color/default_background_color"
|
||||||
android:shadowRadius="4"
|
android:shadowRadius="4"
|
||||||
android:text="@string/gif"
|
android:text="@string/gif"
|
||||||
|
|
Loading…
Reference in a new issue