mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 12:57:57 +01:00
Move Glance Widget to seperate module (#8989)
Move Widget to seperate module - Create a core module for presentation. Widget and App will share some resources and hopefully composables
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/appwidget_secondary_container" />
|
||||
<corners android:radius="@dimen/appwidget_background_radius" />
|
||||
</shape>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/cover_placeholder" />
|
||||
<corners android:radius="@dimen/appwidget_inner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:top="24dp"
|
||||
android:bottom="24dp"
|
||||
android:left="24dp"
|
||||
android:right="24dp">
|
||||
<vector
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/cover_placeholder"
|
||||
android:pathData="M21,5v6.59l-2.29,-2.3c-0.39,-0.39 -1.03,-0.39 -1.42,0L14,12.59 10.71,9.3c-0.39,-0.39 -1.02,-0.39 -1.41,0L6,12.59 3,9.58L3,5c0,-1.1 0.9,-2 2,-2h14c1.1,0 2,0.9 2,2zM18,11.42l3,3.01L21,19c0,1.1 -0.9,2 -2,2L5,21c-1.1,0 -2,-0.9 -2,-2v-6.58l2.29,2.29c0.39,0.39 1.02,0.39 1.41,0l3.3,-3.3 3.29,3.29c0.39,0.39 1.02,0.39 1.41,0l3.3,-3.28z"/>
|
||||
</vector>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/appwidget_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/loading"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="appwidget_background">@color/m3_sys_color_dynamic_dark_surface</color>
|
||||
<color name="appwidget_on_background">@color/m3_sys_color_dynamic_dark_on_surface</color>
|
||||
<color name="appwidget_surface_variant">@color/m3_sys_color_dynamic_dark_surface_variant</color>
|
||||
<color name="appwidget_on_surface_variant">@color/m3_sys_color_dynamic_dark_on_surface_variant</color>
|
||||
<color name="appwidget_secondary_container">@color/m3_sys_color_dynamic_dark_secondary_container</color>
|
||||
<color name="appwidget_on_secondary_container">@color/m3_sys_color_dynamic_dark_on_secondary_container</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="appwidget_background">@color/m3_sys_color_dynamic_light_surface</color>
|
||||
<color name="appwidget_on_background">@color/m3_sys_color_dynamic_light_on_surface</color>
|
||||
<color name="appwidget_surface_variant">@color/m3_sys_color_dynamic_light_surface_variant</color>
|
||||
<color name="appwidget_on_surface_variant">@color/m3_sys_color_dynamic_light_on_surface_variant</color>
|
||||
<color name="appwidget_secondary_container">@color/m3_sys_color_dynamic_light_secondary_container</color>
|
||||
<color name="appwidget_on_secondary_container">@color/m3_sys_color_dynamic_light_on_secondary_container</color>
|
||||
</resources>
|
||||
3
presentation-widget/src/main/res/values-v31/dimens.xml
Normal file
3
presentation-widget/src/main/res/values-v31/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="appwidget_background_radius">@android:dimen/system_app_widget_background_radius</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="appwidget_background">@color/tachiyomi_surface</color>
|
||||
<color name="appwidget_on_background">@color/tachiyomi_onSurface</color>
|
||||
<color name="appwidget_surface_variant">@color/tachiyomi_surfaceVariant</color>
|
||||
<color name="appwidget_on_surface_variant">@color/tachiyomi_onSurfaceVariant</color>
|
||||
<color name="appwidget_secondary_container">@color/tachiyomi_secondaryContainer</color>
|
||||
<color name="appwidget_on_secondary_container">@color/tachiyomi_onSecondaryContainer</color>
|
||||
</resources>
|
||||
4
presentation-widget/src/main/res/values/dimens.xml
Normal file
4
presentation-widget/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<dimen name="appwidget_background_radius">16dp</dimen>
|
||||
<dimen name="appwidget_inner_radius">12dp</dimen>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user