(Android) Added placeholder ActionBar
@ -11,11 +11,28 @@ public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int ic_launcher=0x7f020000;
|
||||
public static final int ic_action_close=0x7f020000;
|
||||
public static final int ic_action_history=0x7f020001;
|
||||
public static final int ic_action_load=0x7f020002;
|
||||
public static final int ic_action_open=0x7f020003;
|
||||
public static final int ic_action_save=0x7f020004;
|
||||
public static final int ic_action_settings=0x7f020005;
|
||||
public static final int ic_launcher=0x7f020006;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int close=0x7f060003;
|
||||
public static final int history=0x7f060004;
|
||||
public static final int load=0x7f060001;
|
||||
public static final int open=0x7f060000;
|
||||
public static final int save=0x7f060002;
|
||||
public static final int settings=0x7f060005;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int main=0x7f030000;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int main_menu=0x7f050000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040001;
|
||||
public static final int hello=0x7f040000;
|
||||
|
BIN
android/res/drawable-hdpi/ic_action_close.png
Normal file
After Width: | Height: | Size: 729 B |
BIN
android/res/drawable-hdpi/ic_action_history.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
android/res/drawable-hdpi/ic_action_load.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
android/res/drawable-hdpi/ic_action_open.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
android/res/drawable-hdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
android/res/drawable-hdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
android/res/drawable-ldpi/ic_action_close.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
android/res/drawable-ldpi/ic_action_history.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
android/res/drawable-ldpi/ic_action_load.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
android/res/drawable-ldpi/ic_action_open.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
android/res/drawable-ldpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 306 B |
BIN
android/res/drawable-ldpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
android/res/drawable-mdpi/ic_action_close.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
android/res/drawable-mdpi/ic_action_history.png
Normal file
After Width: | Height: | Size: 234 B |
BIN
android/res/drawable-mdpi/ic_action_load.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
android/res/drawable-mdpi/ic_action_open.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
android/res/drawable-mdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
android/res/drawable-mdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 395 B |
12
android/res/menu/main_menu.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item android:id="@+id/open" android:showAsAction="ifRoom|withText" android:title="Open ROM" android:icon="@drawable/ic_action_open"></item>
|
||||
<item android:id="@+id/close" android:showAsAction="ifRoom|withText" android:title="Close ROM" android:icon="@drawable/ic_action_close"></item>
|
||||
<item android:id="@+id/load" android:showAsAction="ifRoom|withText" android:title="Load" android:icon="@drawable/ic_action_load"></item>
|
||||
<item android:id="@+id/save" android:showAsAction="ifRoom|withText" android:title="Save" android:icon="@drawable/ic_action_save"></item>
|
||||
<item android:id="@+id/history" android:showAsAction="ifRoom|withText" android:title="History" android:icon="@drawable/ic_action_history"></item>
|
||||
<item android:id="@+id/settings" android:showAsAction="ifRoom|withText" android:title="Settings" android:icon="@drawable/ic_action_settings"></item>
|
||||
|
||||
|
||||
</menu>
|
@ -2,6 +2,10 @@ package com.retroarch;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.os.Bundle;
|
||||
|
||||
@ -18,6 +22,20 @@ public class MainActivity extends Activity
|
||||
setContentView(ctx_gl);
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menu)
|
||||
{
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item)
|
||||
{
|
||||
Toast.makeText(this, "MenuItem " + item.getTitle() + " selected.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause()
|
||||
{
|
||||
|