Skip to content
Permalink
Browse files

GameDetailsDialog: Hide description if empty

In particular, Wii games don't have descriptions.
  • Loading branch information
JosJuice committed Jun 16, 2019
1 parent 100f032 commit 100e7e2b3d40a2329c8cd9cc1394d12fe955b2ba
@@ -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());

0 comments on commit 100e7e2

Please sign in to comment.
You can’t perform that action at this time.