I'm creating a slideshow project in which first an AlterDialog
appears then clicking on the "ok" Button
the "plan screen" in which nothing was written.
After that, when I click on the "menu" Button
of the device then a new slideshow is created after writing the name of it.
My problem is that blank xml may not appear,rather there is going to appear a Button
so when I click on it the user input Dialog
appears and after giving slideshow name new activity gets started. Please help me [here is source code][1]
[1]:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
slideshowListView = getListView(); // get the built-in ListView
// create and set the ListView's adapter
slideshowList = new ArrayList<SlideshowInfo>();
slideshowAdapter = new SlideshowAdapter(this, slideshowList);
slideshowListView.setAdapter(slideshowAdapter);
// create a new AlertDialog Builder
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.welcome_message_title);
builder.setMessage(R.string.welcome_message);
builder.setPositiveButton(R.string.button_ok, null);
builder.show();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.slideshow_menu, menu);
return true;
}![logcat here][1]