feat: currently airing widget

This commit is contained in:
rebelonion 2024-03-25 21:20:17 -05:00
parent 95cddbd409
commit df23b2f62f
15 changed files with 446 additions and 182 deletions

View file

@ -20,8 +20,8 @@
<ImageView
android:id="@+id/logoView"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:foregroundGravity="center_vertical"
@ -31,20 +31,24 @@
<TextView
android:id="@+id/widgetTitle"
android:layout_width="wrap_content"
android:layout_height="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"
android:gravity="center_vertical|start"
android:textAlignment="viewStart"
android:maxLines="1"
android:ellipsize="end"
android:text="@string/currently_airing"
android:textSize="18sp"
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
@ -52,6 +56,8 @@
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"

View file

@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:padding="16dp">
@ -9,14 +10,103 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:labelFor="@id/appwidget_text"
android:text="@string/configure" />
<EditText
android:id="@+id/appwidget_text"
<Button
android:id="@+id/topBackgroundButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
android:layout_height="64dp"
android:layout_marginStart="-31dp"
android:layout_marginEnd="-31dp"
android:background="@drawable/ui_bg"
android:backgroundTint="?attr/colorSecondary"
android:backgroundTintMode="src_atop"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="31dp"
android:paddingEnd="31dp"
android:text="@string/top_background_color"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:icon="@drawable/ic_round_color_picker_24"
app:iconPadding="16dp"
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<Button
android:id="@+id/bottomBackgroundButton"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginStart="-31dp"
android:layout_marginEnd="-31dp"
android:background="@drawable/ui_bg"
android:backgroundTint="?attr/colorSecondary"
android:backgroundTintMode="src_atop"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="31dp"
android:paddingEnd="31dp"
android:text="@string/bottom_background_color"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:icon="@drawable/ic_round_color_picker_24"
app:iconPadding="16dp"
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<Button
android:id="@+id/titleColorButton"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginStart="-31dp"
android:layout_marginEnd="-31dp"
android:background="@drawable/ui_bg"
android:backgroundTint="?attr/colorSecondary"
android:backgroundTintMode="src_atop"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="31dp"
android:paddingEnd="31dp"
android:text="@string/title_color"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:icon="@drawable/ic_round_color_picker_24"
app:iconPadding="16dp"
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<Button
android:id="@+id/countdownColorButton"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginStart="-31dp"
android:layout_marginEnd="-31dp"
android:background="@drawable/ui_bg"
android:backgroundTint="?attr/colorSecondary"
android:backgroundTintMode="src_atop"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:paddingStart="31dp"
android:paddingEnd="31dp"
android:text="@string/countdown_text_color"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="?attr/colorOnBackground"
app:cornerRadius="0dp"
app:icon="@drawable/ic_round_color_picker_24"
app:iconPadding="16dp"
app:iconSize="24dp"
app:iconTint="?attr/colorPrimary" />
<Button
android:id="@+id/add_button"

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="8dp">
@ -9,9 +11,10 @@
<ImageView
android:id="@+id/image_show_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/airing_image"
android:src="@drawable/ic_launcher_foreground" />
android:layout_height="wrap_content"
app:shapeAppearanceOverlay="@style/roundedImageView"
android:contentDescription="@string/airing_image"/>
<LinearLayout
android:layout_width="0dp"
@ -25,8 +28,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_bold"
android:text="Placeholder Title"
android:text=""
android:textColor="@color/bg_white"
android:maxLines="3"
android:ellipsize="end"
android:textSize="16sp" />
<TextView
@ -34,8 +39,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins"
android:text="Placeholder Countdown"
android:textColor="@color/grey_60"
android:text=""
android:textColor="@color/bg_white"
android:textSize="14sp" />
</LinearLayout>