开发者

Update text within a spinner

Is it possible to update a single item within a spinner when it is selected. For example I am wanting to put some sort of indic开发者_开发百科ator, such as *, next to the ones that have been selected. I can't seem to find any setText or anything similar so im doubting it is possible. I'm guessing it would need to be completely repopulated.

Can anyone shed some light for me?


Yes , you are using this method you can get event of on selected item listener...

Spinner1.setOnItemSelectedListener(new OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1,
                int arg2, long arg3) {

             // update your code here
                }
            @Override
        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub

        }

    });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜