Hey All,
I created a List view . Items for this list I am fetching from Database and
put it in an arryalist. My XML is
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<CheckBox android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
/>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+id/label"
android:textSize="20dip"
android:clickable="true"
android:onClick="showPopUp"/>
</LinearLayout>
I am just trying to get the Item which is selected by the user. For this I
added clickbility for TextView and onClick calling a function
showPopUp .
public void showPopUp(View button){
TextView selectedView = (TextView)findViewById(R.id.label);
String selectedData = selectedView.getText().toString();
System.out.println("========="+selectedData);
}
On click any item , the sysout is showing first item value. Can anybody
help me.
I want to do .... when click on a item.. based on that item.. i will fetch
the record (row) from the table and show in a alert dialogue builder.
Thanks,
KIRANKUMARKENDOLE
--
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