mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
Implement multiple widget providers
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
style="@style/habitsListStarStyle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:id="@+id/label"
|
||||
style="@style/habitsListNameStyle" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
17
app/src/main/res/layout/small_widget_preview.xml
Normal file
17
app/src/main/res/layout/small_widget_preview.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dp">
|
||||
|
||||
<org.isoron.uhabits.views.CheckmarkView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -11,7 +11,7 @@
|
||||
android:paddingRight="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:id="@+id/label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:minHeight="40dp"
|
||||
android:minWidth="40dp"
|
||||
android:initialLayout="@layout/widget_small"
|
||||
android:initialLayout="@layout/widget_checkmark"
|
||||
android:previewImage="@mipmap/ic_small_widget_preview"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:resizeMode="none"
|
||||
android:updatePeriodMillis="3600000"
|
||||
android:configure="org.isoron.uhabits.HabitWidgetConfigure"
|
||||
android:configure="org.isoron.uhabits.widgets.HabitPickerDialog"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
|
||||
15
app/src/main/res/xml/widget_history_info.xml
Normal file
15
app/src/main/res/xml/widget_history_info.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:minHeight="80dp"
|
||||
android:minWidth="80dp"
|
||||
android:minResizeWidth="40dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:initialLayout="@layout/widget_graph"
|
||||
android:previewImage="@mipmap/ic_small_widget_preview"
|
||||
android:resizeMode="vertical|horizontal"
|
||||
android:updatePeriodMillis="3600000"
|
||||
android:configure="org.isoron.uhabits.widgets.HabitPickerDialog"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
|
||||
</appwidget-provider>
|
||||
15
app/src/main/res/xml/widget_score_info.xml
Normal file
15
app/src/main/res/xml/widget_score_info.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:minHeight="80dp"
|
||||
android:minWidth="80dp"
|
||||
android:minResizeWidth="40dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:initialLayout="@layout/widget_graph"
|
||||
android:previewImage="@mipmap/ic_small_widget_preview"
|
||||
android:resizeMode="vertical|horizontal"
|
||||
android:updatePeriodMillis="3600000"
|
||||
android:configure="org.isoron.uhabits.widgets.HabitPickerDialog"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
|
||||
</appwidget-provider>
|
||||
15
app/src/main/res/xml/widget_streak_info.xml
Normal file
15
app/src/main/res/xml/widget_streak_info.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:minHeight="80dp"
|
||||
android:minWidth="80dp"
|
||||
android:minResizeWidth="40dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:initialLayout="@layout/widget_graph"
|
||||
android:previewImage="@mipmap/ic_small_widget_preview"
|
||||
android:resizeMode="vertical|horizontal"
|
||||
android:updatePeriodMillis="3600000"
|
||||
android:configure="org.isoron.uhabits.widgets.HabitPickerDialog"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
|
||||
</appwidget-provider>
|
||||
Reference in New Issue
Block a user