Skip to content

Commit

Permalink
GameDetailsDialog: Show game ID and revision
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed Nov 23, 2019
1 parent 84e6163 commit ec91674
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public Dialog onCreateDialog(Bundle savedInstanceState)

TextView textCountry = contents.findViewById(R.id.text_country);
TextView textCompany = contents.findViewById(R.id.text_company);
TextView textGameId = contents.findViewById(R.id.text_game_id);
TextView textRevision = contents.findViewById(R.id.text_revision);

FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch);

Expand All @@ -63,6 +65,8 @@ public Dialog onCreateDialog(Bundle savedInstanceState)
}
textCountry.setText(country);
textCompany.setText(gameFile.getCompany());
textGameId.setText(gameFile.getGameId());
textRevision.setText(Integer.toString(gameFile.getRevision()));

buttonLaunch.setOnClickListener(view ->
{
Expand Down
42 changes: 40 additions & 2 deletions Source/Android/app/src/main/res/layout/dialog_game_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:layout_width="match_parent"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingBottom="24dp"
android:transitionName="card_game">

<RelativeLayout
Expand Down Expand Up @@ -69,8 +70,25 @@
android:layout_below="@+id/icon_country"
android:layout_marginTop="16dp"
android:padding="6dp"
android:src="@drawable/ic_company"
android:layout_marginBottom="16dp"/>
android:src="@drawable/ic_company"/>

<ImageView
android:id="@+id/icon_game_id"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignStart="@+id/icon_company"
android:layout_below="@+id/icon_company"
android:layout_marginTop="16dp"
android:padding="6dp"/>

<ImageView
android:id="@+id/icon_revision"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignStart="@+id/icon_game_id"
android:layout_below="@+id/icon_game_id"
android:layout_marginTop="16dp"
android:padding="6dp"/>

<TextView
android:id="@+id/text_country"
Expand All @@ -93,6 +111,26 @@
android:gravity="center_vertical"
tools:text="Nintendo"/>

<TextView
android:id="@+id/text_game_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/icon_game_id"
android:layout_alignStart="@+id/text_company"
android:layout_alignTop="@+id/icon_game_id"
android:gravity="center_vertical"
tools:text="SOME01"/>

<TextView
android:id="@+id/text_revision"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/icon_revision"
android:layout_alignStart="@+id/text_game_id"
android:layout_alignTop="@+id/icon_revision"
android:gravity="center_vertical"
tools:text="0"/>

<android.support.design.widget.FloatingActionButton
android:id="@+id/button_launch"
android:layout_width="56dp"
Expand Down

0 comments on commit ec91674

Please sign in to comment.