Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

Creating Native Android Menus in Processing Android Mode

$
0
0

Has anyone tried to get Native Android menus from within Processing Android Mode? It would be great to make apps that have the full android look and feel.

I'm not sure which folder the menu.xml file would go but I'm thinking about something like the code below:

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
//need to get menu.xml somehow

void setup()
{
orientation(LANDSCAPE);
}

public class MenuOptionsDemoProject extends Activity
{
/* Called when the activity is first created. /
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);//commented out - not working
}

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
//MenuInflater inflater = getMenuInflater();//commented out - not working
//inflater.inflate(R.menu.my_menu, menu);//commented out - not working
return true;
}
}
void draw()
{

}


Viewing all articles
Browse latest Browse all 941

Trending Articles