AChep/literaryclock

View on GitHub
app/src/main/res/layout/widget.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@android:id/background"
    style="@style/Widget.AppWidget.AppWidget.Container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="16dp"
    android:theme="@style/Theme.AppWidget.AppWidgetContainer">

    <TextView
        android:id="@+id/quoteTextView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_above="@id/titleTextView"
        android:layout_alignParentTop="true"
        android:autoSizeMaxTextSize="32sp"
        android:autoSizeMinTextSize="12sp"
        android:autoSizeTextType="uniform"
        android:ellipsize="end"
        android:fontFamily="@font/robotoslab"
        android:textColor="?android:textColorPrimary"
        android:textSize="18sp"
        tools:text="At one minute to twelve, she was sure of it, and cursed herself for even thinking for a moment the cat-creature would help her escape." />

    <ImageView
        android:id="@+id/refreshBtn"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentBottom="true"
        android:scaleType="center"
        android:src="@drawable/ic_refresh"
        android:tint="?android:colorControlNormal"
        android:visibility="gone"
        tools:ignore="UseAppTint" />

    <TextView
        android:id="@+id/titleTextView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/authorTextView"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:layout_toEndOf="@id/refreshBtn"
        android:fontFamily="@font/robotoslab"
        android:gravity="end"
        android:textColor="?android:textColorSecondary"
        android:textSize="14sp"
        tools:text="Clariel" />

    <TextView
        android:id="@+id/authorTextView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="8dp"
        android:layout_toEndOf="@id/refreshBtn"
        android:fontFamily="@font/robotoslab"
        android:gravity="end"
        android:textColor="?android:textColorSecondary"
        android:textSize="14sp"
        android:textStyle="italic"
        tools:text="Garth Nix" />

</RelativeLayout>