forked from github/szkolny
[UI] Improve register unavailable dialog and card.
This commit is contained in:
parent
b7e35d0322
commit
22c540a3d4
@ -4,6 +4,7 @@
|
||||
|
||||
package pl.szczodrzynski.edziennik.ui.dialogs
|
||||
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.LayoutInflater
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
@ -56,6 +57,7 @@ class RegisterUnavailableDialog(
|
||||
Utils.openUrl(activity, status.message.url)
|
||||
}
|
||||
}
|
||||
b.text.movementMethod = LinkMovementMethod.getInstance()
|
||||
dialog = MaterialAlertDialogBuilder(activity)
|
||||
.setView(b.root)
|
||||
.setPositiveButton(R.string.close) { dialog, _ ->
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
package pl.szczodrzynski.edziennik.ui.modules.home.cards
|
||||
|
||||
import android.text.Html
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -58,8 +59,8 @@ class HomeAvailabilityCard(
|
||||
var onInfoClick = { _: View -> }
|
||||
|
||||
if (status != null && !status.available && status.message != null) {
|
||||
b.homeAvailabilityTitle.text = status.message.title
|
||||
b.homeAvailabilityText.text = status.message.contentShort
|
||||
b.homeAvailabilityTitle.text = Html.fromHtml(status.message.title)
|
||||
b.homeAvailabilityText.text = Html.fromHtml(status.message.contentShort)
|
||||
b.homeAvailabilityUpdate.isVisible = false
|
||||
b.homeAvailabilityIcon.setImageResource(R.drawable.ic_sync)
|
||||
if (status.message.icon != null)
|
||||
|
@ -45,7 +45,7 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{message.title}"
|
||||
android:text="@{Html.fromHtml(message.title)}"
|
||||
android:textAppearance="@style/NavView.TextView.Title"
|
||||
tools:text="Dziennik nie działa" />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user