Skip to content

Commit 40d284c

Browse files
committed
fix layout and font issues
1 parent f98d802 commit 40d284c

3 files changed

Lines changed: 22 additions & 29 deletions

File tree

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,15 @@
1313
android:orientation="horizontal">
1414

1515
<TextView
16-
android:layout_width="wrap_content"
16+
style="@style/PopupWindow.Title"
17+
android:layout_width="0dp"
1718
android:layout_height="wrap_content"
18-
android:clickable="false"
19-
android:ellipsize="end"
20-
android:focusable="false"
21-
android:focusableInTouchMode="false"
22-
android:fontFamily="?attr/appFontFamilyTitle"
23-
android:maxLines="1"
19+
android:layout_weight="1"
2420
android:padding="8dp"
2521
android:text="@string/activity_history"
2622
android:textColor="#FFFFFF"
2723
android:textSize="13sp" />
2824

29-
<View
30-
android:layout_width="0dp"
31-
android:layout_height="0dp"
32-
android:layout_weight="1" />
33-
3425
<ImageView
3526
android:id="@+id/clearBtn"
3627
android:layout_width="@dimen/popupWindowIconSize"
@@ -56,6 +47,7 @@
5647
android:id="@+id/recycler_history"
5748
android:layout_width="match_parent"
5849
android:layout_height="wrap_content"
50+
android:background="#60808080"
5951
android:maxHeight="200dp"
6052
android:overScrollMode="never"
6153
android:scrollbars="none" />

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

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:layout_width="wrap_content"
2+
android:layout_width="match_parent"
33
android:layout_height="wrap_content"
44
android:background="#b6000000"
55
android:orientation="vertical">
@@ -13,24 +13,17 @@
1313

1414
<TextView
1515
android:id="@+id/app_name"
16-
android:layout_width="wrap_content"
16+
style="@style/PopupWindow.Title"
17+
android:layout_width="0dp"
1718
android:layout_height="wrap_content"
18-
android:clickable="false"
19+
android:layout_weight="1"
1920
android:ellipsize="end"
20-
android:focusable="false"
21-
android:focusableInTouchMode="false"
22-
android:fontFamily="?attr/appFontFamilyTitle"
2321
android:maxLines="1"
2422
android:padding="8dp"
2523
android:text="@string/unknown"
2624
android:textColor="#FFFFFF"
2725
android:textSize="13sp" />
2826

29-
<View
30-
android:layout_width="0dp"
31-
android:layout_height="0dp"
32-
android:layout_weight="1" />
33-
3427
<ImageView
3528
android:id="@+id/historyBtn"
3629
android:layout_width="@dimen/popupWindowIconSize"
@@ -59,14 +52,12 @@
5952
android:orientation="horizontal">
6053

6154
<TextView
55+
style="@style/NonInteractiveText"
6256
android:layout_width="80dp"
6357
android:layout_height="match_parent"
6458
android:layout_marginTop="1dp"
6559
android:layout_marginEnd="1dp"
6660
android:background="#60111111"
67-
android:clickable="false"
68-
android:focusable="false"
69-
android:focusableInTouchMode="false"
7061
android:fontFamily="?attr/appFontFamilyBody"
7162
android:gravity="center"
7263
android:padding="8dp"
@@ -94,14 +85,12 @@
9485
android:orientation="horizontal">
9586

9687
<TextView
88+
style="@style/NonInteractiveText"
9789
android:layout_width="80dp"
9890
android:layout_height="match_parent"
9991
android:layout_marginTop="1dp"
10092
android:layout_marginEnd="1dp"
10193
android:background="#60111111"
102-
android:clickable="false"
103-
android:focusable="false"
104-
android:focusableInTouchMode="false"
10594
android:fontFamily="?attr/appFontFamilyBody"
10695
android:gravity="center"
10796
android:padding="8dp"

app/src/main/res/values/themes.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@
7373
<item name="android:colorBackgroundCacheHint">@null</item>
7474
</style>
7575

76+
<style name="NonInteractiveText" parent="@style/Widget.AppCompat.TextView">
77+
<item name="android:clickable">false</item>
78+
<item name="android:longClickable">false</item>
79+
<item name="android:focusable">false</item>
80+
<item name="android:focusableInTouchMode">false</item>
81+
</style>
82+
83+
<style name="PopupWindow.Title" parent="@style/NonInteractiveText">
84+
<item name="android:fontFamily">?attr/appFontFamilyTitle</item>
85+
<item name="fontFamily">?attr/appFontFamilyTitle</item>
86+
</style>
87+
7688
<style name="Material.ToolbarTitle" parent="@style/TextAppearance.Material3.TitleLarge">
7789
<item name="android:fontFamily">?attr/appFontFamilyTitle</item>
7890
<item name="fontFamily">?attr/appFontFamilyTitle</item>

0 commit comments

Comments
 (0)