mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-20 20:13:04 +02:00
Improve loading layouts of the message list widget
This commit is contained in:
parent
86ae99dd6e
commit
5b448e5c69
@ -1200,7 +1200,10 @@ Please submit bug reports, contribute new features and ask questions at
|
||||
<string name="crypto_no_provider_button">Go to Settings</string>
|
||||
|
||||
<string name="mail_list_widget_text">K-9 Message List</string>
|
||||
<string name="mail_list_widget_loading">Loading messages…</string>
|
||||
<!-- Displayed in the the message list widget when the app hasn't had a chance to send content to it yet -->
|
||||
<string name="message_list_widget_initializing">Loading…</string>
|
||||
<!-- Might be displayed in the message list widget when the list is scrolled and new data can't be fetched fast enough -->
|
||||
<string name="message_list_widget_list_item_loading">Loading…</string>
|
||||
|
||||
<string name="openpgp_enabled_error_title">Encryption not possible</string>
|
||||
<string name="openpgp_enabled_error_msg">Some of the selected recipients don\'t support this feature!</string>
|
||||
|
@ -103,9 +103,9 @@ internal class MessageListRemoteViewFactory(private val context: Context) : Remo
|
||||
}
|
||||
|
||||
override fun getLoadingView(): RemoteViews {
|
||||
return RemoteViews(context.packageName, R.layout.message_list_widget_loading).apply {
|
||||
setTextViewText(R.id.loadingText, context.getString(UiR.string.mail_list_widget_loading))
|
||||
setViewVisibility(R.id.loadingText, View.VISIBLE)
|
||||
return RemoteViews(context.packageName, R.layout.message_list_widget_list_item_loading).apply {
|
||||
// Set the text here instead of in the layout so the app language override is used
|
||||
setTextViewText(R.id.loadingText, context.getString(UiR.string.message_list_widget_list_item_loading))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/loadingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:padding="16dp"
|
||||
android:textSize="15sp"
|
||||
tools:text="@string/message_list_widget_list_item_loading" />
|
@ -1,14 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loadingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
android:background="@android:color/white"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/message_list_widget_initializing"
|
||||
android:textSize="18sp" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:initialKeyguardLayout="@layout/message_list_widget_layout"
|
||||
android:initialLayout="@layout/message_list_widget_layout"
|
||||
android:initialKeyguardLayout="@layout/message_list_widget_loading"
|
||||
android:initialLayout="@layout/message_list_widget_loading"
|
||||
android:minHeight="180dp"
|
||||
android:minWidth="250dp"
|
||||
android:minResizeWidth="110dp"
|
||||
|
Loading…
Reference in New Issue
Block a user