fix: auto scale title font size
This commit is contained in:
parent
df23b2f62f
commit
3375496ef2
2 changed files with 69 additions and 2 deletions
67
app/src/main/res/layout-v26/currently_airing_widget.xml
Normal file
67
app/src/main/res/layout-v26/currently_airing_widget.xml
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:theme="@style/Theme.Dantotsu.AppWidgetContainer">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/backgroundView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/gradient_background"
|
||||||
|
tools:ignore="ContentDescription"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/widgetContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/logoView"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:foregroundGravity="center_vertical"
|
||||||
|
android:src="@drawable/ic_dantotsu_round"
|
||||||
|
tools:ignore="ContentDescription"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/widgetTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_toEndOf="@+id/logoView"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
|
android:text="@string/currently_airing"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/widgetListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="none"
|
||||||
|
android:layout_below="@id/widgetTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/empty_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="@string/no_shows_to_display"
|
||||||
|
android:textColor="#ffffff"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</RelativeLayout>
|
|
@ -38,8 +38,8 @@
|
||||||
android:layout_toEndOf="@+id/logoView"
|
android:layout_toEndOf="@+id/logoView"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center_vertical|start"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:maxLines="1"
|
android:maxLines="2"
|
||||||
android:ellipsize="end"
|
android:ellipsize="none"
|
||||||
android:text="@string/currently_airing"
|
android:text="@string/currently_airing"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue