小编joh*_*hnk的帖子

在 textView 中设置 Paint.STRIKE_THRU_TEXT_FLAG

我有一个问题,当用户点击checkbox里面的时候listViewtextView不会向它收费Paint.STRIKE_THRU_TEXT_FLAG)。当用户单击 时checkbox,罢工线将显示在textView.

           public void bindView(View row, Context context, Cursor c) {
            // TODO Auto-generated method stub

            listName = (TextView) row.findViewById(R.id.produtName);
            listCheck = (CheckBox) row.findViewById(R.id.check);
                            Item tag = (Item) listCheck.getTag();
            String pos = helper.getProductId(c);
            Log.i(CN, "getView: no tag on " + pos);
            tag = new Item();
            tag.id = Integer.parseInt(pos);
            listCheck.setTag(tag);
            listCheck.setChecked(false);
                        String status = helper.getProductStatusT(c);
            if (Integer.parseInt(status) == 0) {
                listCheck.setChecked(true);
                listName.setPaintFlags(listName.getPaintFlags()
                        | Paint.STRIKE_THRU_TEXT_FLAG);
            } else {
                listCheck.setChecked(false);
                listName.setPaintFlags(listName.getPaintFlags() …
Run Code Online (Sandbox Code Playgroud)

android listview

5
推荐指数
1
解决办法
5006
查看次数

标签 统计

android ×1

listview ×1