chinwag-android/app/src/main/res/layout/view_compose_schedule.xml
Levi Bard 80e0c55b67
Warn when scheduling a post within 5 minutes (#1698)
* Warn when scheduling a post within 5 minutes

* Fix NPE when scheduled post time isn't set

* Use AlertDialog with option to cancel instead of Toast when a post isn't scheduled far enough in advance

* Move schedule validation warning to scheduling bottom sheet

* Fix scheduling error display when sending after an initially-valid scheduling time has become invalid
2020-02-25 18:33:24 +01:00

49 lines
No EOL
2 KiB
XML

<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<Button
android:id="@+id/resetScheduleButton"
style="@style/TuskyButton.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/action_reset_schedule"
app:layout_constraintBottom_toTopOf="@id/invalidScheduleWarning"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/scheduledDateTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="4dp"
android:paddingStart="4dp"
android:paddingTop="4dp"
android:paddingBottom="16dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
app:layout_constraintBottom_toTopOf="@id/invalidScheduleWarning"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintStart_toEndOf="@id/resetScheduleButton"
tools:text="2020/01/01 00:00:00" />
<TextView
android:id="@+id/invalidScheduleWarning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="4dp"
android:paddingStart="4dp"
android:paddingTop="4dp"
android:paddingBottom="16dp"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintStart_toStartOf="parent"
tools:text="@string/warning_scheduling_interval"
android:visibility="gone" />
</merge>