android - GridView长按改变颜色
ringa_lee
ringa_lee 2017-04-17 16:09:52
0
2
574
ringa_lee
ringa_lee

ringa_lee

membalas semua(2)
迷茫
gridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
            @Override
            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
                view.setBackgroundColor(...);
                return true;
            }
        });
巴扎黑

for (int i=0;i < arg0.getChildCount();i++){

                if (position==i){
                    v.setBackgroundColor();
                }else{
                    v.setBackgroundColor();
                }
            }
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan