Reputation: 455
I would like to create a simple 4-item list menu as a main menu for an application. My first thought is to create a ListView but I know that ListView objects use an adapter to display their items. I don't want to use an adapter as there is no data to display, just new activities, which the list options lead to. What are the alternatives available to tackle this problem?
Upvotes: 2
Views: 5586
Reputation: 33856
Several ways to go about it. You could build a list with objects to create your own menu.
I don't want to use an adapter as there is no data to display, just new activities, which the list options lead to.
I think you are misunderstanding something. Every class in java extends Object
. So you could have a list of activities and by clicking on that item you could start the activity. Here is a good tutorial where he is doing exactly that (videos 18 - 21) Hosted by TheNewBoston, and made by MyBringBack
It is not wrong to go about it the way you originally thought, but for ease of use, design, and consistency, I suggest implementing one of Android's menus:
Last few can be found here
Upvotes: 2