I am trying to create a very simple help page in my app. The layout xml for the page contains only a textview that displays the help info. In the Eclipse layout view, the layout looks perfect... however, when i try to load it in the emulator (via an OptionsMenu) it comes up as a blank black screen. What am I doing wrong??
Here is the Code:
//This is my Help page code
package com.soapbox.servicerec;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
public class HelpPage extends Activity {
private static final int INSERT_ID = Menu.FIRST;
private static final int ACTIVITY_CREATE=0;
protected void onCreate(){
setContentView(R.layout.help_page);
setTitle(R.string.help_title);
}
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
menu.add(0, INSERT_ID, 0, R.string.menu_insert);
return true;
}
public boolean onMenuItemSelected(int featureId, MenuItem item) {
switch(item.getItemId()) {
case INSERT_ID:
createNote();
return true;
}
return super.onMenuItemSelected(featureId, item);
}
private void createNote() {
Intent i = new Intent(this, NoteEdit.class);
startActivityForResult(i, ACTIVITY_CREATE);
}
}
AND the layout XML...
<?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"
android:background="@android:color/white">
<TextView android:textSize="16px" android:textColor="@android:color/black" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:gravity="center_horizontal" android:paddingLeft="10px"
android:paddingRight="10px" android:text="@string/help_text"/>
</LinearLayout>