Android - setting menu content in SlidingMenu library?



I want to use the SlidingMenu (http://ift.tt/XbmwkO) in my project, I've got everything set up. I've set the menu_content.xml to the SlidingMenu. The menu_content.xml consists of a single ListView. How do I populate this ListView?

menu_content.xml:



<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<ListView
android:id="@+id/menuItems"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ListView>


My project doesn't use Fragments. When the activity starts it goes to (for example) ExampleActivity.java. It sets the content view to ExampleActivity_layout.xml. How do I populate the ListView in menu_content.xml from ExampleActivity.java? The menu content isn't an activity, it's just a solo .xml file.


No comments:

Post a Comment