(Android) Added placeholder ActionBar

This commit is contained in:
Twinaphex 2012-06-17 03:36:59 +02:00
parent 13839bc511
commit d843dacfd4
26 changed files with 48 additions and 1 deletions

View File

@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View 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>

View File

@ -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()
{