Skip to content

Commit cbd0928

Browse files
committed
show a folder icon at search results folder too
1 parent e8f30a2 commit cbd0928

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
704704
val isSelected = selectedKeys.contains(listItem.path.hashCode())
705705
view.apply {
706706
if (listItem.isSectionTitle) {
707+
item_icon.setImageDrawable(folderDrawable)
708+
707709
item_section.text = listItem.mName
708710
item_section.setTextColor(textColor)
709711
item_section.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize)
Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4-
android:id="@+id/item_section"
4+
android:id="@+id/item_frame"
55
android:layout_width="match_parent"
66
android:layout_height="wrap_content"
77
android:background="?attr/selectableItemBackground"
8-
android:paddingStart="@dimen/normal_margin"
9-
android:paddingTop="@dimen/activity_margin"
10-
android:paddingEnd="@dimen/normal_margin"
11-
android:paddingBottom="@dimen/activity_margin"
12-
android:textSize="@dimen/bigger_text_size"
13-
tools:text="/storage/emulated/0" />
8+
android:clickable="true"
9+
android:focusable="true"
10+
android:paddingTop="@dimen/normal_margin"
11+
android:paddingBottom="@dimen/tiny_margin">
12+
13+
<RelativeLayout
14+
android:id="@+id/item_holder"
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:paddingEnd="@dimen/activity_margin">
18+
19+
<ImageView
20+
android:id="@+id/item_icon"
21+
android:layout_width="@dimen/file_picker_icon_size"
22+
android:layout_height="@dimen/file_picker_icon_size"
23+
android:layout_centerVertical="true"
24+
android:padding="@dimen/medium_margin"
25+
android:src="@drawable/ic_folder_vector" />
26+
27+
<TextView
28+
android:id="@+id/item_section"
29+
android:layout_width="match_parent"
30+
android:layout_height="wrap_content"
31+
android:layout_toEndOf="@+id/item_icon"
32+
android:paddingTop="@dimen/activity_margin"
33+
android:paddingEnd="@dimen/normal_margin"
34+
android:paddingBottom="@dimen/activity_margin"
35+
android:textSize="@dimen/bigger_text_size"
36+
tools:text="/storage/emulated/0" />
37+
38+
</RelativeLayout>
39+
</FrameLayout>

0 commit comments

Comments
 (0)