-fixed, text gets cut on widget #284

This commit is contained in:
Eljo 2019-06-24 22:35:03 +02:00
parent 4d220d4d17
commit baadf29d34
3 changed files with 21 additions and 15 deletions

View File

@ -3,9 +3,9 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
def keystorePropertiesFile = rootProject.file("keystore.properties") //def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties() //def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) //keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion 28 compileSdkVersion 28
@ -21,23 +21,23 @@ android {
} }
signingConfigs { signingConfigs {
release { /* release {
keyAlias keystoreProperties['keyAlias'] keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword'] keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile']) storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword'] storePassword keystoreProperties['storePassword']
} }*/
} }
buildTypes { buildTypes {
debug { debug {
applicationIdSuffix ".debug" applicationIdSuffix ".debug"
} }
release { /*release {
minifyEnabled true minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }*/
} }
sourceSets { sourceSets {

View File

@ -29,7 +29,7 @@ class MyWidgetProvider : AppWidgetProvider() {
Thread { Thread {
context.widgetsDB.getWidgets().forEach { context.widgetsDB.getWidgets().forEach {
val views = RemoteViews(context.packageName, R.layout.widget) val views = RemoteViews(context.packageName, R.layout.widget)
views.setBackgroundColor(R.id.notes_widget_holder, context.config.widgetBgColor) views.setBackgroundColor(R.id.frame_widget, context.config.widgetBgColor)
setupAppOpenIntent(context, views, R.id.notes_widget_holder, it) setupAppOpenIntent(context, views, R.id.notes_widget_holder, it)
Intent(context, WidgetService::class.java).apply { Intent(context, WidgetService::class.java).apply {

View File

@ -1,14 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_widget"
android:id="@+id/notes_widget_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<ListView <ListView
android:id="@+id/notes_widget_listview" android:id="@+id/notes_widget_listview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:divider="@null"/> android:divider="@null"/>
</RelativeLayout> <RelativeLayout
android:id="@+id/notes_widget_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>
</FrameLayout>