mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-18 03:36:09 +02:00
widgets
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#151b2b" />
|
||||
<stroke android:width="1dp" android:color="#2c3958" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#101522" />
|
||||
<stroke android:width="1dp" android:color="#25304a" />
|
||||
<corners android:radius="18dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#1a2133" />
|
||||
<stroke android:width="1dp" android:color="#2c3958" />
|
||||
<corners android:radius="18dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#e2e8f4"
|
||||
android:pathData="M6,5 L15,12 L6,19 Z M17,5 L19,5 L19,19 L17,19 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#e2e8f4"
|
||||
android:pathData="M7,5 L10,5 L10,19 L7,19 Z M14,5 L17,5 L17,19 L14,19 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#e2e8f4"
|
||||
android:pathData="M8,5 L19,12 L8,19 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#e2e8f4"
|
||||
android:pathData="M5,5 L7,5 L7,19 L5,19 Z M18,5 L9,12 L18,19 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,51 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,71 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_play_pause"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Play"
|
||||
android:padding="7dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_next"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Next"
|
||||
android:padding="7dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_next" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,73 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_play_pause"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Play"
|
||||
android:padding="9dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_next"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Next"
|
||||
android:padding="9dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_next" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,149 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="82dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="82dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_previous"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Previous"
|
||||
android:padding="8dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_previous" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_play_pause"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Play"
|
||||
android:padding="8dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_next"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Next"
|
||||
android:padding="8dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_next" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/astra_widget_recent_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_1_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_2_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_3_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_4_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_5_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,324 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_previous"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="28dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Previous"
|
||||
android:padding="6dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_previous" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_play_pause"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Play"
|
||||
android:padding="6dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_next"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Next"
|
||||
android:padding="6dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_next" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/astra_widget_recent_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_1_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_1_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_2_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_2_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_3_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_3_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_4_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_4_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_5_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_5_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_6_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_6_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_7_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_7_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_recent_8_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Recently played"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_recent_8_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Recent"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,84 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/astra_widget_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/astra_widget_background"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/astra_widget_art"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:contentDescription="Current artwork"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/astra_widget_art_placeholder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Astra"
|
||||
android:textColor="#e2e8f4"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/astra_widget_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Tap to open"
|
||||
android:textColor="#8a98b8"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_previous"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Previous"
|
||||
android:padding="9dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_previous" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_play_pause"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Play"
|
||||
android:padding="9dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/astra_widget_next"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/astra_widget_control_background"
|
||||
android:contentDescription="Next"
|
||||
android:padding="9dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/astra_widget_ic_next" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="astra_widget_name">Astra Now Playing</string>
|
||||
<string name="astra_widget_description">Astra playback controls</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,12 @@
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:description="@string/astra_widget_description"
|
||||
android:initialLayout="@layout/astra_widget_3x1"
|
||||
android:minWidth="180dp"
|
||||
android:minHeight="40dp"
|
||||
android:minResizeWidth="180dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:targetCellWidth="3"
|
||||
android:targetCellHeight="1"
|
||||
android:updatePeriodMillis="0"
|
||||
android:widgetCategory="home_screen" />
|
||||
Reference in New Issue
Block a user