From 100e7e2b3d40a2329c8cd9cc1394d12fe955b2ba Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 11:06:01 +0200 Subject: [PATCH] GameDetailsDialog: Hide description if empty In particular, Wii games don't have descriptions. --- .../dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index f5c355f04682..42b0224088a1 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -2,6 +2,7 @@ import android.app.Dialog; import android.os.Bundle; +import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; @@ -53,9 +54,14 @@ public Dialog onCreateDialog(Bundle savedInstanceState) FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch); String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()]; + String description = gameFile.getDescription(); textTitle.setText(gameFile.getTitle()); textDescription.setText(gameFile.getDescription()); + if (description.isEmpty()) + { + textDescription.setVisibility(View.GONE); + } textCountry.setText(country); textCompany.setText(gameFile.getCompany());