Some menu navigation now possible - can go from main screen to
'open' (rom browser screen - stub for now) and back
@ -10,7 +10,7 @@
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".main"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@ -18,6 +18,7 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:label="@string/app_name" android:name="rombrowser" />
|
||||
</application>
|
||||
<!-- Tell the system this app requires OpenGL ES 2.0. -->
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
|
@ -14,23 +14,24 @@ public final class R {
|
||||
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_quit=0x7f020004;
|
||||
public static final int ic_action_main=0x7f020003;
|
||||
public static final int ic_action_open=0x7f020004;
|
||||
public static final int ic_action_save=0x7f020005;
|
||||
public static final int ic_action_settings=0x7f020006;
|
||||
public static final int ic_launcher=0x7f020007;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int close=0x7f060001;
|
||||
public static final int history=0x7f060004;
|
||||
public static final int load=0x7f060002;
|
||||
public static final int open=0x7f060000;
|
||||
public static final int quit=0x7f060006;
|
||||
public static final int save=0x7f060003;
|
||||
public static final int settings=0x7f060005;
|
||||
public static final int close=0x7f060002;
|
||||
public static final int history=0x7f060005;
|
||||
public static final int load=0x7f060003;
|
||||
public static final int main=0x7f060000;
|
||||
public static final int open=0x7f060001;
|
||||
public static final int save=0x7f060004;
|
||||
public static final int settings=0x7f060006;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int main=0x7f030000;
|
||||
public static final int rombrowser=0x7f030001;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int main_menu=0x7f050000;
|
||||
|
BIN
android/res/drawable-hdpi/ic_action_main.png
Normal file
After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 797 B |
BIN
android/res/drawable-ldpi/ic_action_main.png
Normal file
After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 411 B |
BIN
android/res/drawable-mdpi/ic_action_main.png
Normal file
After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 536 B |
BIN
android/res/drawable-xhdpi/ic_action_main.png
Normal file
After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 797 B |
12
android/res/layout/rombrowser.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello world from RomBrowser" />
|
||||
|
||||
</LinearLayout>
|
@ -1,13 +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/main" android:showAsAction="ifRoom|withText" android:title="Main" android:icon="@drawable/ic_action_main"></item>
|
||||
<item android:id="@+id/open" android:showAsAction="collapseActionView" android:title="Open ROM" android:icon="@drawable/ic_action_open"></item>
|
||||
<item android:id="@+id/close" android:showAsAction="collapseActionView" android:title="Close ROM" android:icon="@drawable/ic_action_close"></item>
|
||||
<item android:id="@+id/load" android:showAsAction="collapseActionView" android:title="Load" android:icon="@drawable/ic_action_load"></item>
|
||||
<item android:id="@+id/save" android:showAsAction="collapseActionView" android:title="Save" android:icon="@drawable/ic_action_save"></item>
|
||||
<item android:id="@+id/history" android:showAsAction="collapseActionView" android:title="History" android:icon="@drawable/ic_action_history"></item>
|
||||
<item android:id="@+id/settings" android:showAsAction="collapseActionView" android:title="Settings" android:icon="@drawable/ic_action_settings"></item>
|
||||
<item android:id="@+id/quit" android:showAsAction="collapseActionView" android:title="Quit" android:icon="@drawable/ic_action_quit"></item>
|
||||
|
||||
|
||||
</menu>
|
||||
|
@ -1,7 +1,11 @@
|
||||
package com.retroarch;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import com.retroarch.R;
|
||||
import com.retroarch.R.id;
|
||||
import com.retroarch.R.menu;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.Context;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
@ -10,7 +14,7 @@ import android.widget.Toast;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class MainActivity extends Activity
|
||||
public class main extends Activity
|
||||
{
|
||||
private GLSurfaceView ctx_gl;
|
||||
|
||||
@ -34,13 +38,19 @@ public class MainActivity extends Activity
|
||||
{
|
||||
switch (item.getItemId())
|
||||
{
|
||||
case R.id.quit:
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
return true;
|
||||
case R.id.main:
|
||||
this.finish();
|
||||
break;
|
||||
case R.id.open:
|
||||
Intent myIntent = new Intent(main.this, rombrowser.class);
|
||||
main.this.startActivity(myIntent);
|
||||
break;
|
||||
default:
|
||||
Toast.makeText(this, "MenuItem " + item.getTitle() + " selected.", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|