Skip to content

Commit 51b5de1

Browse files
authored
Merge pull request #286 from herou/widget_hot_fixes
-fixed, text gets cut on widget
2 parents 31bd301 + 2e4cffd commit 51b5de1

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/MyWidgetProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MyWidgetProvider : AppWidgetProvider() {
2929
Thread {
3030
context.widgetsDB.getWidgets().forEach {
3131
val views = RemoteViews(context.packageName, R.layout.widget)
32-
views.setBackgroundColor(R.id.notes_widget_holder, context.config.widgetBgColor)
32+
views.setBackgroundColor(R.id.frame_widget, context.config.widgetBgColor)
3333
setupAppOpenIntent(context, views, R.id.notes_widget_holder, it)
3434

3535
Intent(context, WidgetService::class.java).apply {
@@ -57,4 +57,4 @@ class MyWidgetProvider : AppWidgetProvider() {
5757
}
5858
}.start()
5959
}
60-
}
60+
}

app/src/main/res/layout/widget.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:id="@+id/notes_widget_holder"
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/frame_widget"
54
android:layout_width="match_parent"
6-
android:layout_height="match_parent">
5+
android:layout_height="match_parent"
6+
android:orientation="vertical">
77

88
<ListView
99
android:id="@+id/notes_widget_listview"
1010
android:layout_width="match_parent"
11-
android:layout_height="wrap_content"
11+
android:layout_height="match_parent"
1212
android:divider="@null"/>
1313

14-
</RelativeLayout>
14+
<RelativeLayout
15+
android:id="@+id/notes_widget_holder"
16+
android:layout_width="match_parent"
17+
android:layout_height="match_parent">
18+
19+
</RelativeLayout>
20+
</FrameLayout>

0 commit comments

Comments
 (0)