0

ive been messing around in android and have made my first screen. Its nothing much, has some values and a button on it. When i click the button i am trying to laod a new page with a custom list view

for this purpose i am using some code i found on here at Custom ListView Android in one of the responses.

It lists the code for the class that builds and it also lists the xml which defines a row i assume?

What i am stuck with is, when i click the button on my interface, how do i get that list view shown in the example above to display as the next page? Is it simply just calling

Intent intent = new Intent("com.testproj.MYLIST");...

or do i need to build an interface of some sort then add it? I am really struggling to break the mould of traditional thought process from Java and its killing me.

Thanks

Community
  • 1
  • 1
Biscuit128
  • 5,218
  • 22
  • 89
  • 149

2 Answers2

0

Assuming you are using the code described in the link that you have referenced, you only have to do the following:

Intent intent = new Intent(InitialActivity.this, YourListViewActivity.class);
startActivity(intent);

By the way, don't forget to reference YourListViewActivity in your manifest file.

<activity android:name="Package.YourListViewActivity">
</activity>
Amokrane Chentir
  • 29,907
  • 37
  • 114
  • 158
0

I suppose your list view is a ListActivity. See here to learn how to start an activity in Android: http://developer.android.com/guide/topics/fundamentals/activities.html#StartingAnActivity

I would also recommend to read the rest of the basic stuff on the developers site cited above.

Stefan
  • 4,645
  • 1
  • 19
  • 35