mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
launch the app on widgets Month click
This commit is contained in:
@ -80,9 +80,16 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calendar {
|
|||||||
remoteViews.setOnClickPendingIntent(id, pendingIntent);
|
remoteViews.setOnClickPendingIntent(id, pendingIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupAppOpenIntent(int id) {
|
||||||
|
final Intent intent = new Intent(cxt, MainActivity.class);
|
||||||
|
final PendingIntent pendingIntent = PendingIntent.getActivity(cxt, 0, intent, 0);
|
||||||
|
remoteViews.setOnClickPendingIntent(id, pendingIntent);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupButtons() {
|
private void setupButtons() {
|
||||||
setupIntent(PREV, R.id.left_arrow);
|
setupIntent(PREV, R.id.left_arrow);
|
||||||
setupIntent(NEXT, R.id.right_arrow);
|
setupIntent(NEXT, R.id.right_arrow);
|
||||||
|
setupAppOpenIntent(R.id.table_month);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SharedPreferences initPrefs(Context context) {
|
private SharedPreferences initPrefs(Context context) {
|
||||||
|
Reference in New Issue
Block a user