I'm building Android app. I have created an action bar. Click Click with an item. In the menu.xml file, I have this code for the item
Now I want to click on this item and leave the page and go to the next activity by sliding. For this, I have tried to write the function on click.
Code: & amp; Lt; Item Android: ID = "@ + ID / Settings" Android: Title = "Settings" Android: But as I write this one line and on the emulator without writing the body of the function Trying to run the application, it shows off your app unexpectedly.
Anyone tell me how to sliding it on next item on an item click on the app bar. Thanks
Have you registered a new activity in your manifest file? Android needs to know all the activities used by your app beforehand if it is not intended to create a new activity in your app's manifest, it will crash.
Add new activity to your AndroidManifest.xml:
& lt; Application ... & lt; Activity Android: name = "NameFirer New Activity" & gt; & Lt; / Activity & gt; & Lt; / Application & gt;
No comments:
Post a Comment