Update Messages design
This commit is contained in:
@@ -16,9 +16,7 @@ import android.view.View
|
|||||||
import android.widget.ImageButton
|
import android.widget.ImageButton
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||||
import androidx.appcompat.app.AlertDialog
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.view.ContextThemeWrapper
|
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.graphics.drawable.DrawableCompat
|
import androidx.core.graphics.drawable.DrawableCompat
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
@@ -53,6 +51,7 @@ import com.github.gotify.messages.provider.MessageWithImage
|
|||||||
import com.github.gotify.service.WebSocketService
|
import com.github.gotify.service.WebSocketService
|
||||||
import com.github.gotify.settings.SettingsActivity
|
import com.github.gotify.settings.SettingsActivity
|
||||||
import com.github.gotify.sharing.ShareActivity
|
import com.github.gotify.sharing.ShareActivity
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.navigation.NavigationView
|
import com.google.android.material.navigation.NavigationView
|
||||||
import com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback
|
import com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
@@ -260,7 +259,7 @@ internal class MessagesActivity :
|
|||||||
startLoading()
|
startLoading()
|
||||||
binding.appBarDrawer.toolbar.subtitle = ""
|
binding.appBarDrawer.toolbar.subtitle = ""
|
||||||
} else if (id == R.id.logout) {
|
} else if (id == R.id.logout) {
|
||||||
AlertDialog.Builder(ContextThemeWrapper(this, R.style.AppTheme_Dialog))
|
MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(R.string.logout)
|
.setTitle(R.string.logout)
|
||||||
.setMessage(getString(R.string.logout_confirm))
|
.setMessage(getString(R.string.logout_confirm))
|
||||||
.setPositiveButton(R.string.yes) { _, _ -> doLogout() }
|
.setPositiveButton(R.string.yes) { _, _ -> doLogout() }
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/textView2"
|
android:id="@+id/textView2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.3" />
|
app:layout_constraintVertical_bias="0.3" />
|
||||||
|
|
||||||
<Button
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/learn_gotify"
|
android:id="@+id/learn_gotify"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.AppCompat.Button.Colored"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:background="?android:colorBackground">
|
android:background="?android:colorBackground">
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_date"
|
android:id="@+id/message_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
app:layout_constraintEnd_toStartOf="@+id/message_delete"
|
app:layout_constraintEnd_toStartOf="@+id/message_delete"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_title"
|
android:id="@+id/message_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/message_title" />
|
app:layout_constraintTop_toBottomOf="@+id/message_title" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_text"
|
android:id="@+id/message_text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:background="?android:colorBackground">
|
android:background="?android:colorBackground">
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_date"
|
android:id="@+id/message_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
app:layout_constraintEnd_toStartOf="@+id/message_delete"
|
app:layout_constraintEnd_toStartOf="@+id/message_delete"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_title"
|
android:id="@+id/message_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/message_text"
|
android:id="@+id/message_text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/nav_header_height"
|
android:layout_height="@dimen/nav_header_height"
|
||||||
android:layout_alignParentBottom="false"
|
android:layout_alignParentBottom="false"
|
||||||
@@ -26,7 +25,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:srcCompat="@drawable/gotify" />
|
app:srcCompat="@drawable/gotify" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/header_user"
|
android:id="@+id/header_user"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -36,7 +35,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/header_connection"
|
app:layout_constraintBottom_toTopOf="@+id/header_connection"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/header_connection"
|
android:id="@+id/header_connection"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -46,7 +45,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/header_version"
|
app:layout_constraintBottom_toTopOf="@+id/header_version"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/header_version"
|
android:id="@+id/header_version"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user