mintris/app/src/main/res/layout/activity_main.xml

289 lines
No EOL
11 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="@color/black"
android:fitsSystemWindows="true"
tools:context=".MainActivity">
<!-- Game Container with Glow -->
<FrameLayout
android:id="@+id/gameContainer"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.mintris.game.GameView
android:id="@+id/gameView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- Glowing Border -->
<View
android:id="@+id/glowBorder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/glow_border" />
</FrameLayout>
<!-- Title Screen -->
<com.mintris.game.TitleScreen
android:id="@+id/titleScreen"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- HUD Container - Score, Level, Lines -->
<LinearLayout
android:id="@+id/gameControlsContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/hudContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_gravity="end"
android:orientation="vertical">
<TextView
android:id="@+id/scoreText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="24sp"
android:fontFamily="sans-serif-light"
tools:text="Score: 0" />
<TextView
android:id="@+id/currentLevelText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="24sp"
android:fontFamily="sans-serif-light"
tools:text="Level: 1" />
<TextView
android:id="@+id/linesText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="24sp"
android:fontFamily="sans-serif-light"
tools:text="Lines: 0" />
<TextView
android:id="@+id/comboText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="24sp"
android:fontFamily="sans-serif-light"
tools:text="Combo: 0" />
</LinearLayout>
<!-- Next Piece Preview -->
<com.mintris.game.NextPieceView
android:id="@+id/nextPieceView"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_margin="16dp"
android:layout_gravity="end" />
<!-- Settings button -->
<ImageButton
android:id="@+id/pauseButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="start"
android:layout_margin="16dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/settings"
android:padding="12dp"
android:src="@drawable/ic_pause" />
</LinearLayout>
<!-- Game Over overlay -->
<LinearLayout
android:id="@+id/gameOverContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/gameOverText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/game_over"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:id="@+id/finalScoreText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textColor="@color/white"
android:textSize="18sp" />
<Button
android:id="@+id/playAgainButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@color/transparent"
android:text="@string/play"
android:textColor="@color/white" />
</LinearLayout>
<!-- Settings Menu overlay -->
<LinearLayout
android:id="@+id/pauseContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold"
android:layout_marginBottom="32dp" />
<Button
android:id="@+id/pauseStartButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:text="@string/start"
android:textColor="@color/white"
android:textSize="18sp" />
<Button
android:id="@+id/resumeButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/transparent"
android:text="@string/resume"
android:textColor="@color/white"
android:textSize="18sp" />
<Button
android:id="@+id/pauseRestartButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/transparent"
android:text="@string/restart"
android:textColor="@color/white"
android:textSize="18sp" />
<Button
android:id="@+id/highScoresButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/transparent"
android:text="@string/high_scores"
android:textColor="@color/white"
android:textSize="18sp" />
<LinearLayout
android:id="@+id/levelSelectorContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/select_level"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<Button
android:id="@+id/pauseLevelDownButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@color/transparent"
android:text=""
android:textColor="@color/white"
android:textSize="24sp" />
<TextView
android:id="@+id/pauseLevelText"
android:layout_width="48dp"
android:layout_height="48dp"
android:gravity="center"
android:text="1"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold" />
<Button
android:id="@+id/pauseLevelUpButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@color/transparent"
android:text="+"
android:textColor="@color/white"
android:textSize="24sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/settingsButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@color/transparent"
android:text="@string/sound_on"
android:textColor="@color/white"
android:textSize="18sp" />
<ImageButton
android:id="@+id/musicToggle"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/toggle_music"
android:padding="12dp"
android:src="@drawable/ic_volume_up"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pauseStartButton"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>