use material buttons in timeline (#1627)
* use material buttons in timeline * remove wrong switch option
This commit is contained in:
parent
b87a1711f2
commit
e5b78f65cf
15 changed files with 96 additions and 107 deletions
|
@ -136,13 +136,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -150,12 +150,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -172,13 +171,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_button"
|
||||
tools:text="This is a status" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_content"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -186,12 +185,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -225,7 +223,6 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
<com.keylesspalace.tusky.view.MediaPreviewImageView
|
||||
android:id="@+id/status_media_preview_2"
|
||||
android:layout_width="0dp"
|
||||
|
@ -384,7 +381,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -398,13 +394,12 @@
|
|||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/statusContentWarningButton"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -42,12 +42,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContentWarningDescription"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -62,13 +61,13 @@
|
|||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContentWarningButton" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/buttonToggleContent"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -76,12 +75,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusContent"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
@ -117,13 +117,13 @@
|
|||
tools:text="content warning which is very long and it doesn't fit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -138,6 +138,7 @@
|
|||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -156,13 +157,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_content_warning_button"
|
||||
tools:text="This is a status" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_content"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -171,12 +172,11 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_content"
|
||||
tools:text="@string/status_content_show_less"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -386,13 +386,12 @@
|
|||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -93,13 +93,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/status_avatar"
|
||||
tools:text="CW this is a long long long long long long long long content warning" />
|
||||
|
||||
<ToggleButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_content_warning_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:importantForAccessibility="no"
|
||||
android:minWidth="160dp"
|
||||
android:minHeight="0dp"
|
||||
|
@ -108,11 +108,10 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_content_warning_description" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_content_warning_description"
|
||||
tools:text="@string/status_content_warning_show_more" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/status_content"
|
||||
|
@ -387,7 +386,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -401,13 +399,12 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container" />
|
||||
|
||||
<!-- using AppCompatButton because we don't want the inflater to turn it into a MaterialButton -->
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<Button
|
||||
android:id="@+id/status_poll_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:gravity="center"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="Example CW text" />
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/notification_content_warning_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -91,7 +91,6 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@id/notification_status_avatar"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -99,8 +98,8 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
tools:text="@string/status_content_warning_show_more"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
@ -116,8 +115,7 @@
|
|||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="Example status here" />
|
||||
|
||||
|
||||
<ToggleButton
|
||||
<Button
|
||||
android:id="@+id/button_toggle_notification_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -125,7 +123,6 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@id/notification_status_avatar"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minWidth="150dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -133,8 +130,8 @@
|
|||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_show_less"
|
||||
android:textOn="@string/status_content_show_more"
|
||||
tools:text="@string/status_content_show_less"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue