mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 14:24:05 +01:00
fix to show error message on server selection screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
2ff5be1294
commit
deb512af91
@ -203,7 +203,6 @@ class ServerSelectionController :
|
||||
private fun checkServerAndProceed() {
|
||||
dispose()
|
||||
var url: String = binding?.serverEntryTextInputEditText?.text.toString().trim { it <= ' ' }
|
||||
binding?.serverEntryTextInputEditText?.isEnabled = false
|
||||
showserverEntryProgressBar()
|
||||
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
||||
binding?.importOrChooseProviderText?.visibility = View.INVISIBLE
|
||||
@ -281,8 +280,6 @@ class ServerSelectionController :
|
||||
hideserverEntryProgressBar()
|
||||
}
|
||||
|
||||
binding?.serverEntryTextInputEditText?.isEnabled = true
|
||||
|
||||
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
||||
binding?.importOrChooseProviderText?.visibility = View.VISIBLE
|
||||
binding?.certTextView?.visibility = View.VISIBLE
|
||||
@ -304,18 +301,17 @@ class ServerSelectionController :
|
||||
}
|
||||
|
||||
private fun setErrorText(text: String) {
|
||||
binding?.errorWrapper?.visibility = View.VISIBLE
|
||||
binding?.errorText?.text = text
|
||||
binding?.errorText?.visibility = View.VISIBLE
|
||||
binding?.serverEntryProgressBar?.visibility = View.GONE
|
||||
hideserverEntryProgressBar()
|
||||
}
|
||||
|
||||
private fun showserverEntryProgressBar() {
|
||||
binding?.errorText?.visibility = View.GONE
|
||||
binding?.errorWrapper?.visibility = View.INVISIBLE
|
||||
binding?.serverEntryProgressBar?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
private fun hideserverEntryProgressBar() {
|
||||
binding?.errorText?.visibility = View.GONE
|
||||
binding?.serverEntryProgressBar?.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
|
@ -133,23 +133,37 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
<LinearLayout
|
||||
android:id="@+id/error_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:lines="2"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@string/nc_server_unsupported"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/white"
|
||||
android:paddingEnd="2dp"
|
||||
android:visibility="invisible"
|
||||
app:drawableStartCompat="@android:drawable/stat_sys_warning"
|
||||
tools:visibility="visible" />
|
||||
android:orientation="horizontal"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@android:drawable/stat_sys_warning">
|
||||
</ImageView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:lines="2"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/white"
|
||||
tools:text="@string/nc_server_unsupported" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_or_choose_provider_text"
|
||||
|
Loading…
Reference in New Issue
Block a user