想通过拉伸来缩放listview里面显示的文字字体,使用
TextView tv = (TextView)listView.findViewById(R.id.lb_item_title);
只能找到listview里面第一行的文本请问怎么遍历listview里面的所有item ?

解决方案 »

  1.   

    ListView做的不多,我想是不是可以通过setTag()方法来确定ID?
      

  2.   


        ListView listView = (ListView)findViewById(R.id.配置文件中ListView的ID);  
         //全选遍历ListView的选项,每个选项就相当于布局配置文件中的RelativeLayout  
         for(int i = 0; i < listView.getChildCount(); i++){  
             View view = listView.getChildAt(i);  
             CheckBox cb = (CheckBox)view.findViewById(R.id.配置文件中CheckBox的ID);  
             cb.setChecked(true);  
         }