use legacy minWidth/minHeight sizing trying to solve samsung resizing issues
This commit is contained in:
+2
-3
@@ -22,10 +22,8 @@ import androidx.glance.layout.wrapContentHeight
|
||||
import androidx.glance.text.Text
|
||||
import androidx.glance.text.TextStyle
|
||||
import androidx.glance.unit.ColorProvider
|
||||
import es.antonborri.home_widget.HomeWidgetLaunchIntent
|
||||
import android.net.Uri
|
||||
import es.antonborri.home_widget.actionStartActivity
|
||||
import androidx.core.net.toUri
|
||||
import es.antonborri.home_widget.actionStartActivity
|
||||
|
||||
class SearchBarGlanceWidget : GlanceAppWidget() {
|
||||
|
||||
@@ -62,6 +60,7 @@ private fun SearchBarContent(context: Context) {
|
||||
color = ColorProvider(Color(0xFF848388)),
|
||||
fontSize = 16.sp
|
||||
),
|
||||
maxLines = 1,
|
||||
modifier = GlanceModifier.defaultWeight()
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:initialLayout="@layout/glance_default_loading_layout"
|
||||
android:resizeMode="none"
|
||||
android:minWidth="320dp"
|
||||
android:minHeight="48dp"
|
||||
android:minResizeWidth="180dp"
|
||||
android:minResizeHeight="48dp"
|
||||
android:resizeMode="horizontal"
|
||||
android:targetCellWidth="5"
|
||||
android:targetCellHeight="1"
|
||||
android:widgetCategory="home_screen" />
|
||||
|
||||
@@ -15,6 +15,16 @@ allprojects {
|
||||
//Required by background_fetch build
|
||||
maven { url "${project(':background_fetch').projectDir}/libs" }
|
||||
}
|
||||
|
||||
configurations.configureEach {
|
||||
resolutionStrategy.eachDependency { details ->
|
||||
if (details.requested.group == 'androidx.glance' &&
|
||||
details.requested.name == 'glance-appwidget') {
|
||||
details.useVersion '1.1.1'
|
||||
details.because 'home_widget uses 1.+ and newer alpha releases require AGP 9.1 and compileSdk 37'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = "../build"
|
||||
|
||||
Reference in New Issue
Block a user