В моем списке просмотра есть три вида текста и один флажок в горизонтальном порядке.
Мой listview xml
код
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="TEXT"
android:id="@+id/textView1"
android:textSize="20sp"
android:gravity="center"
android:layout_weight="5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="TEXT"
android:id="@+id/textView2"
android:textSize="20sp"
android:gravity="center"
android:layout_weight="10" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="TEXT"
android:id="@+id/textView3"
android:textSize="20sp"
android:gravity="center"
android:layout_weight="5" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/checkBox1"
android:focusable="false"
android:clickable="false"
android:layout_gravity="right"
android:layout_marginRight="10dp"/>
и MainActivity.java
код
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView,
View view, int position, long id) {
Object vo = (Object)adapterView.getAdapter().getItem(position);
Log.d(TAG, String.valueOf(vo));
}
});
вывод журнала для String.valueOf(vo)
равен
sn.studyroom.ListViewItem@f085546
Как получить каждое из трех значений Textview
?