0

I have a listview where I am doing setAdapter. In the list Item I have 2 textviews and one seekbar. In my activity apart from the listview I have a button also. I want on the click of this button I should get the values which is set in these textview. I am setting the value in the textview by changing the seekbar.

I want to know is this possible to get the value (which is set after changing the seekbar) of the views inside listview on the click of button which is not part of the listview but is in the same activity?

4

1 に答える 1

0

そのマップにテキスト値を作成HashMapしてActivity保存します

TextViewの最初の行からオブジェクトを取得していますListView:

View v = listView.getChildAt(0);
// if your row base layout is LinearLayout
// get it and find in this layout your TextView by id

if(v instanceof LinearLayout){
    v.findViewById(R.id.textView);
}
于 2012-12-26T15:13:35.807 に答える