mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #2404 from sigmabeta/master
Android: Scale number of columns in game grid according to screen width.
This commit is contained in:
commit
16726628a6
@ -54,7 +54,8 @@ public final class GameGridActivity extends Activity
|
||||
//mRecyclerView.setHasFixedSize(true);
|
||||
|
||||
// Specifying the LayoutManager determines how the RecyclerView arranges views.
|
||||
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this, 4);
|
||||
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this,
|
||||
getResources().getInteger(R.integer.game_grid_columns));
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
recyclerView.addItemDecoration(new GameAdapter.SpacesItemDecoration(8));
|
||||
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="game_grid_columns">4</integer>
|
||||
</resources>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="game_grid_columns">2</integer>
|
||||
</resources>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="game_grid_columns">3</integer>
|
||||
</resources>
|
4
Source/Android/app/src/main/res/values/integers.xml
Normal file
4
Source/Android/app/src/main/res/values/integers.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="game_grid_columns">1</integer>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user