I've created a button on the mainActivity. Once clicked, it takes a user to a second view. For some reason, there's no button to be seen anywhere and there's no errors? I have defined the layout in the xml.file and referenced it in the java.file. It's just strange that there's no obvious syntax errors and there's no button to be seen anywhere.
Below is the segment of the java code:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.reminder_list); mDbHelper = new RemindersDbAdapter(this); mDbHelper.open(); fillData(); registerForContextMenu(getListView()); setContentView(R.layout.reminder_list); final Button button = (Button) findViewById(R.id.insertion); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Performs action on click createReminder(); } }); }
This is the .xml file
http://imageshack.us/photo/my-images/171/xml.png/
Does anyone have any ideas?
Many thanks.