Skip to content

Commit 6c96ac1

Browse files
committed
use bigger images at grid view
1 parent 83fec3d commit 6c96ac1

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.simplemobiletools.filemanager.pro.views
2+
3+
import android.content.Context
4+
import android.util.AttributeSet
5+
import androidx.appcompat.widget.AppCompatImageView
6+
7+
class MySquareImageView : AppCompatImageView {
8+
constructor(context: Context) : super(context)
9+
10+
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
11+
12+
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
13+
14+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
15+
super.onMeasure(widthMeasureSpec, widthMeasureSpec)
16+
}
17+
}

app/src/main/res/layout/item_file_dir_grid.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
android:layout_height="wrap_content"
2020
android:layout_marginBottom="@dimen/activity_margin">
2121

22-
<ImageView
22+
<com.simplemobiletools.filemanager.pro.views.MySquareImageView
2323
android:id="@+id/item_icon"
24-
android:layout_width="@dimen/grid_view_icon_size"
25-
android:layout_height="@dimen/grid_view_icon_size"
24+
android:layout_width="match_parent"
25+
android:layout_height="match_parent"
2626
android:layout_centerHorizontal="true"
27+
android:padding="@dimen/small_margin"
2728
android:src="@drawable/ic_folder_vector" />
2829

2930
<TextView

0 commit comments

Comments
 (0)