From db3baa1548661b69f5a8dc2ef147ed330c8aa037 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Wed, 25 May 2022 14:58:09 +0530 Subject: [PATCH] Add refresh button in weather widget --- .../features/weather/WeatherInfoView.java | 1 + app/src/main/res/layout/layout_weather_info.xml | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherInfoView.java b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherInfoView.java index 01ba72dc17..e2b200fbe6 100644 --- a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherInfoView.java +++ b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherInfoView.java @@ -52,6 +52,7 @@ public class WeatherInfoView extends LinearLayout { } }); findViewById(R.id.weather_setting_imageview).setOnClickListener(v -> startWeatherPreferences()); + findViewById(R.id.weather_refresh_imageview).setOnClickListener(v -> WeatherUpdateService.scheduleNextUpdate(getContext(), true)); } @Override diff --git a/app/src/main/res/layout/layout_weather_info.xml b/app/src/main/res/layout/layout_weather_info.xml index d2b9e555fc..d0bdfcead1 100644 --- a/app/src/main/res/layout/layout_weather_info.xml +++ b/app/src/main/res/layout/layout_weather_info.xml @@ -15,7 +15,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" - android:layout_toStartOf="@+id/weather_setting_imageview" + android:layout_toStartOf="@+id/weather_refresh_imageview" android:padding="8dp" android:text="@string/weather" style="@style/WidgetTitle" /> @@ -28,6 +28,14 @@ android:contentDescription="@string/weather_setting" android:padding="8dp" android:src="@drawable/ic_settings_white_24dp" /> + +