i wish to show a listView on a PreferenceActivity similar to what the android OS wifi-settings has for the list of networks (example here , on the bottom area of the image) . however , such a thing isn't availabe , so i've created a new class that extends Preference , and what i returned in the onCreateView is just a ListView instance .
it worked , but the listView has a constant size of about a single item no matter what i do to its layoutParams and no matter what i do to the adapter . even if i set the adapter inside the onCreateView , it has the exact same size .
not only that , but the listView cannot be scrolled , even though it is clear that it has multiple items within it .
i would , of course, want to use the same text size standard as on all of the preferences , to give a native feeling.
can anyone please tell me what can be done in order to make it work well?
btw, the app should work for android API 10+ (minimum 10) .
ok , the answer would be to use setContentView to whatever layout you wish (including any views you wish) , add there a listView for the preferences , and for this listView , call bind and setAdapter.
i've found this solution by looking at other solutions, like this one: http://kmansoft.com/2011/08/29/implementing-long-clickable-preferences/