mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 17:48:52 -06:00
Implement dummy widget
This commit is contained in:
25
app/src/main/res/layout/small_widget.xml
Normal file
25
app/src/main/res/layout/small_widget.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:shadowColor="#000000"
|
||||
android:shadowDx="1"
|
||||
android:shadowDy="1"
|
||||
android:shadowRadius="3"
|
||||
android:padding="6dp"
|
||||
android:text="Widget"/>
|
||||
|
||||
</LinearLayout>
|
||||
7
app/src/main/res/layout/small_widget_preview.xml
Normal file
7
app/src/main/res/layout/small_widget_preview.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.isoron.uhabits.views.SmallWidgetView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp">
|
||||
|
||||
</org.isoron.uhabits.views.SmallWidgetView>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_small_widget_preview.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/ic_small_widget_preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_small_widget_preview.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_small_widget_preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_small_widget_preview.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_small_widget_preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_small_widget_preview.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/ic_small_widget_preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_small_widget_preview.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/ic_small_widget_preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
12
app/src/main/res/xml/small_widget_info.xml
Normal file
12
app/src/main/res/xml/small_widget_info.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:minHeight="40dp"
|
||||
android:minWidth="40dp"
|
||||
android:initialLayout="@layout/small_widget"
|
||||
android:previewImage="@mipmap/ic_small_widget_preview"
|
||||
android:resizeMode="none"
|
||||
android:updatePeriodMillis="3600000"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
|
||||
</appwidget-provider>
|
||||
Reference in New Issue
Block a user