Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 834af66a authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge branch '129-r-fix_widget' into 'v1-r'

Fix widget ui

See merge request e/os/android_packages_apps_etar!12
parents 9ea99cf5 ce08725e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -211,6 +211,15 @@ public class CalendarAppWidgetProvider extends AppWidgetProvider {
                            | DateUtils.FORMAT_NO_YEAR);
            views.setTextViewText(R.id.day_of_week, dayOfWeek);
            views.setTextViewText(R.id.date, date);

            // Set widget header background based on chosen primary app color
            int headerColor = DynamicTheme.getColorId(DynamicTheme.getPrimaryColor(context));
            views.setInt(R.id.header, "setBackgroundResource", headerColor);

            // Set widget background color based on chosen app theme
            int backgroundColor = DynamicTheme.getWidgetBackgroundStyle(context);
            views.setInt(R.id.widget_background, "setBackgroundResource", backgroundColor);

            // Attach to list of events
            views.setRemoteAdapter(R.id.events_list, updateIntent);
            appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.events_list);