Android: Show the version name as a subtitle in the GameGridActivity.

This commit is contained in:
sigmabeta 2015-06-08 18:07:26 -04:00
parent 9521bc1fc6
commit f80f4bb542
2 changed files with 9 additions and 3 deletions

View File

@ -14,7 +14,11 @@ android {
applicationId "org.dolphinemu.dolphinemu"
minSdkVersion 18
targetSdkVersion 21
// TODO This should be set to the Buildbot build number for release builds, and be "1" for debug builds.
versionCode 13
// TODO This should be set to the string currently provided by NativeLibrary.GetVersionString().
versionName "0.13"
}

View File

@ -19,6 +19,7 @@ import android.view.View;
import android.widget.ImageButton;
import android.widget.Toolbar;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.adapters.GameAdapter;
import org.dolphinemu.dolphinemu.model.GameDatabase;
@ -50,9 +51,10 @@ public final class GameGridActivity extends Activity implements LoaderManager.Lo
ImageButton buttonAddDirectory = (ImageButton) findViewById(R.id.button_add_directory);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.grid_games);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
//mRecyclerView.setHasFixedSize(true);
// TODO Rather than calling into native code, this should use the commented line below.
// String versionName = BuildConfig.VERSION_NAME;
String versionName = NativeLibrary.GetVersionString();
toolbar.setSubtitle(versionName);
// Specifying the LayoutManager determines how the RecyclerView arranges views.
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this,