GameDetailsDialog: Hide description if empty
In particular, Wii games don't have descriptions.
This commit is contained in:
parent
100f032e2f
commit
100e7e2b3d
|
@ -2,6 +2,7 @@ package org.dolphinemu.dolphinemu.dialogs;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -53,9 +54,14 @@ public final class GameDetailsDialog extends DialogFragment
|
||||||
FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch);
|
FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch);
|
||||||
|
|
||||||
String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()];
|
String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()];
|
||||||
|
String description = gameFile.getDescription();
|
||||||
|
|
||||||
textTitle.setText(gameFile.getTitle());
|
textTitle.setText(gameFile.getTitle());
|
||||||
textDescription.setText(gameFile.getDescription());
|
textDescription.setText(gameFile.getDescription());
|
||||||
|
if (description.isEmpty())
|
||||||
|
{
|
||||||
|
textDescription.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
textCountry.setText(country);
|
textCountry.setText(country);
|
||||||
textCompany.setText(gameFile.getCompany());
|
textCompany.setText(gameFile.getCompany());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue