Robert,

PreferenceActivity is already built around a ListView.

Rather than trying to add another ListView, consider using Preference subclasses for the data items you want to show in the ListView.

FWIW, that's how Settings application implements Bluetooth (and WiFi) device lists. You can look it up here:

http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=summary

-- Kostya

25.03.2011 20:53, Robert пишет:
Basically I want a screen to show 3 Preferences on top and then a ListView at the bottom:
----------------------------
----------------------------
Preference 1
----------------------------
Preference 2
----------------------------
Preference 3
----------------------------

ListView







----------------------------
----------------------------

The screen showing is currently a PreferenceActivity. My ListView is dynamically populated during the course of the App. I have 2 xml files, one that specifies the PreferenceScreen and the other for the ListView (one's in the xml folder, the other layout folder).

I tried adding the PreferenceScreen and setting the content view via:
addPreferencesFromResource(R.xml.bluetooth_device_selection);
setContentView(R.layout.device_selection);

However this only has the PreferenceScreen lie on top of the ListView, so you only see the 3 Preferences. I'm not sure how to get both to show on the same screen (one underneath the other). I know that I can accomplish this via my own layout, but I was wondering if this could be achieved with using a PreferenceActivity and PreferenceScreens?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to