asfoury/projmag

View on GitHub
app/src/main/res/layout/activity_video_subtitling.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".activities.VideoSubtitlingActivity">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/video_subtitling_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="@string/video_subtitling_title"
            android:textAppearance="@style/TextAppearance.AppCompat.Display1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <VideoView
            android:id="@+id/video_subtitling_videoview"
            android:layout_width="wrap_content"
            android:layout_height="250dp"
            android:layout_marginStart="32dp"
            android:layout_marginTop="24dp"
            android:layout_marginEnd="32dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/video_subtitling_title" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/constraintLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginTop="32dp"
            android:layout_marginEnd="32dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/video_subtitling_videoview">

            <TextView
                android:id="@+id/video_subtitling_start_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/video_subtitling_set_start_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <Button
                android:id="@+id/video_subtitling_set_start_button"
                android:layout_width="120dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="32dp"
                android:text="@string/video_subtitling_set_start"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <EditText
            android:id="@+id/video_subtitling_subtitle_text"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"

            android:layout_marginTop="32dp"
            android:layout_marginEnd="32dp"
            android:ems="10"
            android:hint="@string/video_subtitling_field"
            android:importantForAutofill="no"
            android:inputType="textMultiLine"
            android:text="@string/video_subtitling_field"
            android:textAlignment="center"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/constraintLayout2" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/constraintLayout2"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginTop="32dp"
            android:layout_marginEnd="32dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/constraintLayout">

            <TextView
                android:id="@+id/video_subtitling_end_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/video_subtitling_set_end_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <Button
                android:id="@+id/video_subtitling_set_end_button"
                android:layout_width="120dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="32dp"
                android:text="@string/video_subtitling_set_end"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <Button
            android:id="@+id/video_subtitling_add"
            android:layout_width="120dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="28dp"
            android:text="@string/video_subtitling_add"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/video_subtitling_subtitle_text" />

        <Button
            android:id="@+id/video_subtitling_submit_button"
            android:layout_width="120dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="32dp"
            android:layout_marginBottom="32dp"
            android:text="@string/ok"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/video_subtitling_add" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>