forked from PabloMK7/citra
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Implement About Game Dialog
Co-Authored-By: OpenSauce <[email protected]>
- Loading branch information
1 parent
702a332
commit 870b6b7
Showing
6 changed files
with
192 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
src/android/app/src/main/res/layout/dialog_about_game.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout 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="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<com.google.android.material.bottomsheet.BottomSheetDragHandleView | ||
android:id="@+id/drag_handle" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:nextFocusRight="@id/about_game_play" | ||
android:paddingHorizontal="16dp" | ||
android:paddingBottom="8dp"> | ||
|
||
<com.google.android.material.imageview.ShapeableImageView | ||
android:id="@+id/game_icon" | ||
android:layout_width="140dp" | ||
android:layout_height="140dp" | ||
android:focusable="false" | ||
app:layout_constraintBottom_toBottomOf="@+id/constraintLayout" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="@+id/constraintLayout" | ||
app:shapeAppearance="?attr/shapeAppearanceCornerLarge" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/constraintLayout" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHeight_min="140dp" | ||
app:layout_constraintStart_toEndOf="@id/game_icon" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:id="@+id/about_game_title" | ||
style="?attr/textAppearanceTitleMedium" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAlignment="viewStart" | ||
android:textSize="20sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="Detective Pikachu" /> | ||
|
||
<TextView | ||
android:id="@+id/about_game_company" | ||
style="?attr/textAppearanceBodyMedium" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintStart_toStartOf="@id/about_game_title" | ||
app:layout_constraintTop_toBottomOf="@id/about_game_title" | ||
tools:text="Nintendo" /> | ||
|
||
<TextView | ||
android:id="@+id/about_game_id" | ||
style="?attr/textAppearanceBodyMedium" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintStart_toStartOf="@id/about_game_company" | ||
app:layout_constraintTop_toBottomOf="@id/about_game_company" | ||
tools:text="00040000001C1E00" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<LinearLayout | ||
android:id="@+id/horizontal_layout" | ||
style="@style/ThemeOverlay.Material3.Button.IconButton.Filled.Tonal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="16dp" | ||
android:gravity="start|center" | ||
android:orientation="horizontal" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/game_icon"> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/about_game_play" | ||
style="@style/Widget.Material3.Button.Icon" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="3" | ||
android:contentDescription="@string/play" | ||
android:focusedByDefault="true" | ||
android:text="@string/play" | ||
app:icon="@drawable/ic_play" /> | ||
<TextView | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" /> | ||
|
||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:id="@+id/game_button_tray" | ||
style="@style/ThemeOverlay.Material3.Button.IconButton.Filled.Tonal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="16dp" | ||
android:gravity="start|center" | ||
android:orientation="horizontal" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/horizontal_layout"> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/cheats" | ||
style="@style/Widget.Material3.Button.TonalButton.Icon" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:contentDescription="@string/cheats" | ||
android:text="@string/cheats" /> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters