Remove extra spacing after event time when weather disabled.
This commit is contained in:
parent
ea0be72478
commit
43f085b13c
@ -53,7 +53,7 @@ object IntentHelper {
|
|||||||
mapIntent
|
mapIntent
|
||||||
} else {
|
} else {
|
||||||
val map = "https://www.google.com/maps/search/?api=1&query=${Uri.encode(address)}"
|
val map = "https://www.google.com/maps/search/?api=1&query=${Uri.encode(address)}"
|
||||||
val i = Intent(Intent.ACTION_VIEW, Uri.parse(map));
|
val i = Intent(Intent.ACTION_VIEW, Uri.parse(map))
|
||||||
i
|
i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ object WidgetHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onTypefaceRequestFailed(reason: Int) {
|
override fun onTypefaceRequestFailed(reason: Int) {
|
||||||
handlerThread.quit();
|
handlerThread.quit()
|
||||||
function.invoke(null)
|
function.invoke(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
|
|||||||
// Weather
|
// Weather
|
||||||
if (Preferences.showWeather && Preferences.weatherIcon != "") {
|
if (Preferences.showWeather && Preferences.weatherIcon != "") {
|
||||||
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
|
||||||
|
|
||||||
val i = Intent(context, WidgetClickListenerReceiver::class.java)
|
val i = Intent(context, WidgetClickListenerReceiver::class.java)
|
||||||
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
|
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
|
||||||
@ -116,7 +116,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
views.setViewVisibility(R.id.weather_rect, View.GONE)
|
views.setViewVisibility(R.id.weather_rect, View.GONE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
|
|||||||
|
|
||||||
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, if (Preferences.showWeather && Preferences.weatherIcon != "") View.VISIBLE else View.GONE)
|
||||||
views.setViewVisibility(R.id.first_line_rect, View.GONE)
|
views.setViewVisibility(R.id.first_line_rect, View.GONE)
|
||||||
|
|
||||||
views.setViewVisibility(R.id.sub_line_top_margin_small_sans, View.GONE)
|
views.setViewVisibility(R.id.sub_line_top_margin_small_sans, View.GONE)
|
||||||
@ -575,7 +575,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
|
|||||||
bindingView.dateLayout.isVisible = false
|
bindingView.dateLayout.isVisible = false
|
||||||
bindingView.calendarLayout.isVisible = true
|
bindingView.calendarLayout.isVisible = true
|
||||||
bindingView.subLine.isVisible = true
|
bindingView.subLine.isVisible = true
|
||||||
bindingView.weatherSubLine.isVisible = true
|
bindingView.weatherSubLine.isVisible = Preferences.showWeather && Preferences.weatherIcon != ""
|
||||||
|
|
||||||
bindingView.subLineTopMarginSmall.visibility = View.GONE
|
bindingView.subLineTopMarginSmall.visibility = View.GONE
|
||||||
bindingView.subLineTopMarginMedium.visibility = View.GONE
|
bindingView.subLineTopMarginMedium.visibility = View.GONE
|
||||||
|
@ -99,7 +99,7 @@ class StandardWidget(val context: Context) {
|
|||||||
// Weather
|
// Weather
|
||||||
if (Preferences.showWeather && Preferences.weatherIcon != "") {
|
if (Preferences.showWeather && Preferences.weatherIcon != "") {
|
||||||
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
|
||||||
|
|
||||||
val i = Intent(context, WidgetClickListenerReceiver::class.java)
|
val i = Intent(context, WidgetClickListenerReceiver::class.java)
|
||||||
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
|
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
|
||||||
@ -119,7 +119,7 @@ class StandardWidget(val context: Context) {
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
views.setViewVisibility(R.id.weather_rect, View.GONE)
|
views.setViewVisibility(R.id.weather_rect, View.GONE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ class StandardWidget(val context: Context) {
|
|||||||
)
|
)
|
||||||
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
|
||||||
views.setViewVisibility(R.id.weather_sub_line_rect, View.VISIBLE)
|
views.setViewVisibility(R.id.weather_sub_line_rect, if (Preferences.showWeather && Preferences.weatherIcon != "") View.VISIBLE else View.GONE)
|
||||||
|
|
||||||
views.setViewVisibility(R.id.first_line_rect, View.GONE)
|
views.setViewVisibility(R.id.first_line_rect, View.GONE)
|
||||||
|
|
||||||
@ -604,7 +604,7 @@ class StandardWidget(val context: Context) {
|
|||||||
bindingView.dateLayout.isVisible = false
|
bindingView.dateLayout.isVisible = false
|
||||||
bindingView.calendarLayout.isVisible = true
|
bindingView.calendarLayout.isVisible = true
|
||||||
bindingView.subLine.isVisible = true
|
bindingView.subLine.isVisible = true
|
||||||
bindingView.weatherSubLine.isVisible = true
|
bindingView.weatherSubLine.isVisible = Preferences.showWeather && Preferences.weatherIcon != ""
|
||||||
|
|
||||||
bindingView.subLineTopMarginSmall.visibility =
|
bindingView.subLineTopMarginSmall.visibility =
|
||||||
if (Preferences.secondRowTopMargin == Constants.SecondRowTopMargin.SMALL.rawValue) View.VISIBLE else View.GONE
|
if (Preferences.secondRowTopMargin == Constants.SecondRowTopMargin.SMALL.rawValue) View.VISIBLE else View.GONE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user