app端优化
This commit is contained in:
1 parent
7994ed1ed3
commit
1e45ede5be
14 files changed
+357
-37
No files matched your search
@@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".ScheduleWidgetProvider"
|
android:name=".ScheduleWidgetProvider"
|
||||||
android:exported="false"
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/widget_schedule_name">
|
android:label="@string/widget_schedule_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
@@ -49,7 +50,8 @@
|
|||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".ExamWidgetProvider"
|
android:name=".ExamWidgetProvider"
|
||||||
android:exported="false"
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/widget_exam_name">
|
android:label="@string/widget_exam_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
@@ -59,6 +61,32 @@
|
|||||||
android:resource="@xml/exam_widget_info" />
|
android:resource="@xml/exam_widget_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<receiver
|
||||||
|
android:name=".AttendanceWidgetProvider"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/widget_attendance_name">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data
|
||||||
|
android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/attendance_widget_info" />
|
||||||
|
</receiver>
|
||||||
|
|
||||||
|
<receiver
|
||||||
|
android:name=".NotificationsWidgetProvider"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/widget_notifications_name">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data
|
||||||
|
android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/notifications_widget_info" />
|
||||||
|
</receiver>
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package edu.mingxu.jiaowu;
|
||||||
|
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.appwidget.AppWidgetProvider;
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public class AttendanceWidgetProvider extends AppWidgetProvider {
|
||||||
|
@Override
|
||||||
|
public void onUpdate(Context context, AppWidgetManager manager, int[] appWidgetIds) {
|
||||||
|
WidgetRenderer.updateAttendance(context, manager, appWidgetIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package edu.mingxu.jiaowu;
|
||||||
|
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.appwidget.AppWidgetProvider;
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public class NotificationsWidgetProvider extends AppWidgetProvider {
|
||||||
|
@Override
|
||||||
|
public void onUpdate(Context context, AppWidgetManager manager, int[] appWidgetIds) {
|
||||||
|
WidgetRenderer.updateNotifications(context, manager, appWidgetIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 3 of 14 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user