Categories

Archives

Icons in Options Menu in Android (Code)

Here is a brief topic on how to set icons on options menu in Android, this is an extension to Options Menu in Android.
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class Main extends Activity {
private int searchBtnId = Menu.FIRST;
private int scheduleBtnId = Menu.FIRST + 1;

/** Called when the activity is first [...]

Options Menu in Android (Code)

There are 2 types of menu in Android one is the “options menu” and the other is “context menu”.
The options menu is shown when you press the “Menu” button on the device, In this example we would only show how to use codes to display the options.
There are four ways of adding a menu item [...]