Skip to content

Commit

Permalink
mobile: set default widget size
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Dec 30, 2024
1 parent ff1fc5b commit e67e637
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/note_widget_info" />
android:resource="@xml/new_note_widget_info" />
</receiver>

<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,4 @@ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] a
updateAppWidget(context, appWidgetManager, appWidgetId,null);
}
}

@Override
public void onEnabled(Context context) {
// Enter relevant functionality for when the first widget is created
}

@Override
public void onDisabled(Context context) {
// Enter relevant functionality for when the last widget is disabled
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialKeyguardLayout="@layout/note_widget"
android:initialLayout="@layout/note_widget"
android:minWidth="50dp"
android:minHeight="50dp"
android:targetCellWidth="5"
android:targetCellHeight="1"
android:previewImage="@drawable/widget_preview"
android:resizeMode="horizontal|vertical"
android:updatePeriodMillis="86400000"
android:widgetCategory="home_screen"/>

0 comments on commit e67e637

Please sign in to comment.