add the widget base
This commit is contained in:
parent
69fba230e7
commit
c4e0212c1c
4 changed files with 33 additions and 1 deletions
|
@ -18,6 +18,19 @@
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<receiver
|
||||||
|
android:name=".MyWidgetProvider"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="Simple Calendar">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/widget_info"/>
|
||||||
|
</receiver>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package calendar.simplemobiletools.com;
|
||||||
|
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.appwidget.AppWidgetProvider;
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public class MyWidgetProvider extends AppWidgetProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="dayView" parent="AppTheme">
|
<style name="dayView">
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:textColor">@color/lightGrey</item>
|
<item name="android:textColor">@color/lightGrey</item>
|
||||||
<item name="android:textSize">@dimen/day_text_size</item>
|
<item name="android:textSize">@dimen/day_text_size</item>
|
||||||
|
|
6
app/src/main/res/xml/widget_info.xml
Normal file
6
app/src/main/res/xml/widget_info.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:initialLayout="@layout/activity_main"
|
||||||
|
android:minHeight="250dp"
|
||||||
|
android:minWidth="250dp">
|
||||||
|
</appwidget-provider>
|
Loading…
Reference in a new issue