diff --git a/src/android/app/src/main/java/org/citra/citra_emu/ui/platform/PlatformGamesFragment.java b/src/android/app/src/main/java/org/citra/citra_emu/ui/platform/PlatformGamesFragment.java index 10da99f40..9fc30796f 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/ui/platform/PlatformGamesFragment.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/ui/platform/PlatformGamesFragment.java @@ -5,6 +5,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import androidx.core.content.ContextCompat; import androidx.fragment.app.Fragment; @@ -22,6 +23,7 @@ public final class PlatformGamesFragment extends Fragment implements PlatformGam private GameAdapter mAdapter; private RecyclerView mRecyclerView; + private TextView mTextView; @Override public void onCreate(Bundle savedInstanceState) { @@ -62,6 +64,7 @@ public final class PlatformGamesFragment extends Fragment implements PlatformGam @Override public void refresh() { mPresenter.refresh(); + updateTextView(); } @Override @@ -69,9 +72,15 @@ public final class PlatformGamesFragment extends Fragment implements PlatformGam if (mAdapter != null) { mAdapter.swapCursor(games); } + updateTextView(); + } + + private void updateTextView() { + mTextView.setVisibility(mAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE); } private void findViews(View root) { mRecyclerView = root.findViewById(R.id.grid_games); + mTextView = root.findViewById(R.id.gamelist_empty_text); } } diff --git a/src/android/app/src/main/res/layout/fragment_grid.xml b/src/android/app/src/main/res/layout/fragment_grid.xml index 7b5d1c5df..e5f0a5dc0 100644 --- a/src/android/app/src/main/res/layout/fragment_grid.xml +++ b/src/android/app/src/main/res/layout/fragment_grid.xml @@ -9,13 +9,25 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:layout_height="match_parent"> + + + + + \ No newline at end of file diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 619dcb3a0..22d58cdf5 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -125,6 +125,7 @@ The external storage needs to be available in order to use Citra Select This Directory + No files were found or no game directory has been selected yet. Software Keyboard