Gotcha! Thanks, Mark!

Unfortunately, it solves half the problem. When clicked, the hidden
objects appear but the older selection doesn't disappear:

private int selection=-1;
...
    public void onListItemClick(ListView parent, View v,int position,
long id) {
        TextView tv;
        View linha;

        if (selection!=-1) {
                linha=(View) parent.getChildAt(selection);
                tv = (TextView) linha.findViewById(R.id.text2);
                tv.setVisibility(0);
                linha.postInvalidate();
        }

        linha=parent.getChildAt(position);
        tv = (TextView) linha.findViewById(R.id.text2);
        tv.setVisibility(1);

        selection=position;
...

Anyway, it seems I'll have to rethink my list since objects defined as
invisible in the layout nevertheless occupy screen space (!). I'll
have to create dinamically in my Java class.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to