[android-developers] Re: change item layout when selected in a ListView

2008-08-25 Thread Mark Murphy
Andrew wrote: I have a question about the ListView. Example: In a ListView, there are many items. If I press up/down key to select one item, what I want is show a button on the selected view, and if the selected item is unselected, the button will be hide. How can I change the layout

[android-developers] Re: change item layout when selected in a ListView

2008-08-25 Thread Andrew
Thank you very much. It is helpful. And I have another question. I defined the List item in a xml like below: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5px

[android-developers] Re: change item layout when selected in a ListView

2008-08-25 Thread Andrew
I use below code to get the button click event: Button b = (Button)v.findViewById(R.id.reminder_item_btn); b.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Log.d(, timeString); } }); On Aug