Forget the previous code sample I posted, I can see why that doesn't
work. This is what I tried today:

getListView().setMinimumHeight(0);
getListView().getChildAt(0).setVisibility(View.GONE);

which makes the preference invisible, but the list item height does
not change.

On Jun 11, 3:49 pm, Horchata Factory
<[email protected]> wrote:
> Hi,
>
> I want to be able to set the visibility of the preference list items
> in a PreferenceActivity, but I can't seem to figure out a way to do
> it.
>
> I've tried the following code, which doesn't do anything:
>
> //assume mSomePreference is an existing CheckBoxPreference
>
> View preferenceView = mSomePreference.getView( null, getListView() );
> preferenceView.setVisibility( View.GONE );
>
> I've also tried going through the list adapter and getting the view
> from there, and setting the visibility to GONE, but nothing happens.
> Is it just possible to do this, or am I doing something wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to