0

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]

https://i.stack.imgur.com/Sk6r9.png [1]:

  • can you post the most relevant code into your post using the "edit" button below the tags, please? Also, if you could make it a little more clear. We tried as much as possible to edit but your question/issue still is a little confusing. – codeMagic Mar 05 '15 at 21:31
  • i want to create new intent on butto click ..but i dnt find xml file of it.. i hope now u get my question – Amara waseem Mar 07 '15 at 20:24
  • You don't find xml file for what? – codeMagic Mar 08 '15 at 00:56
  • On which i may put button on it..if i create my own xml file and i may add it in oncreate method then my app stops working after displaying that xml file..i know my qs is confusing but i dnt know how can i make my qs clear..can i mail u my project so u can run it and see ..may b u got my point – Amara waseem Mar 08 '15 at 14:55
  • On blank xml appears but i dnt know about it – Amara waseem Mar 08 '15 at 14:58
  • Post what code you try to use when it crashes and the logcat output when it crashes then we can have a better idea of what's going on – codeMagic Mar 08 '15 at 15:07
  • i have upload the logcat output pic and also its relevant code – Amara waseem Mar 08 '15 at 18:29
  • You'll find the answer in the linked post above – codeMagic Mar 09 '15 at 00:52

1 Answers1

0

Can you show us some code(instead source code) and maybe explain things little better?

I assume you're using Intent on Button click

So your problem is that the new screen doesn't show anything or that the app crashes when you try to open new screen with Intent

1.Nothing is shown = nothing is added in the .xml file you call in the new screen

2.Your activity for new screen(new activity) is not defined in Android Manifest

ii7scw
  • 351
  • 1
  • 3
  • 17