whitewind664/sdp

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

Summary

Maintainability
Test Coverage
<FrameLayout
    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"
    tools:context=".activities.GameModeChooserActivity"
    android:background="@color/white">

    <include layout="@layout/activity_base" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipToPadding="false"
        android:gravity="center"
        android:orientation="vertical"
        android:paddingStart="16dp"
        android:paddingTop="16dp"
        android:paddingEnd="16dp"
        android:paddingBottom="100dp">

        <TextView
            android:id="@+id/gameModeChooser_textView_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:padding="0sp"
            android:text="@string/gameModeChooser_title"
            android:textAlignment="center"
            android:textAppearance="@style/TextAppearance.AppCompat.Body2"
            android:textSize="20sp"
            android:textStyle="bold"
            android:layout_marginBottom="16dp"
            app:layout_constraintBottom_toTopOf="@+id/tutorial_textView_explanation"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

        <EditText
            android:id="@+id/gameModeChooser_editText_loginUsername"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:hint="@string/gameModeChooser_loginUsername"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/gameModeChooser_textView_title" />

        <EditText
            android:id="@+id/gameModeChooser_editText_loginPassword"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:hint="@string/gameModeChooser_loginPassword"
            android:visibility="gone"
            android:inputType="textPassword"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/gameModeChooser_editText_loginUsername"
            app:layout_constraintBottom_toBottomOf="parent"/>

        <Button
            android:id="@+id/gameModeChooser_button_loginSubmit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/gameModeChooser_buttonLoginSubmit"
            android:visibility="gone"
            app:layout_constraintTop_toBottomOf="@+id/gameModeChooser_editText_loginPassword" />

        <Button
            android:id="@+id/gameModeChooser_button_challenge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/gameModeChooser_buttonChallenge"
            android:visibility="gone" />

        <Button
            android:id="@+id/gameModeChooser_button_local"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/gameModeChooser_buttonLocal"
            app:layout_constraintBottom_toBottomOf="@+id/gameModeChooser_button_bluetooth" />

        <Button
            android:id="@+id/gameModeChooser_button_bluetooth"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="@string/gameModeChooser_buttonBluetooth"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>

        <Button
            android:id="@+id/gameModeChooser_button_ranked"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/gameModeChooser_buttonRanked" />

        <Button
            android:id="@+id/gameModeChooser_button_unranked"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/gameModeChooser_buttonUnranked" />

    </LinearLayout>

</FrameLayout>