小编use*_*759的帖子

ListView ImageButton 设置铃声

我想做以下链接:http://imagizer.imageshack.us/v2/800x600q90/42/gbs4.jpg

但是当我按下 ImageButton 时,我希望将声音设置为铃声。

这是我的代码:

    公共类 ListViewAdapter 扩展 BaseAdapter {

        私有Context上下文;
        私人清单项目;
        私有 LayoutInflater 充气器;
        字符串路径=“SD卡/媒体/铃声”;

        公共ListViewAdapter(上下文上下文,
                               列出项目 ) {
            inflater = LayoutInflater.from( 上下文 );
            this.context = 上下文;
            this.items = 项目;
        }

        公共 int getCount() {
            返回 items.size();
        }

        公共对象 getItem(int 位置) {
            返回 items.get(位置);
        }

        公共长 getItemId(int 位置) {
            返回位置;
        }

        公共视图 getView(int 位置,视图 ConvertView,ViewGroup 父级){
            字符串 item = items.get(position);
            查看 v = null;
            if( 转换视图!= null )
                v = 转换视图;
            别的
                v = inflater.inflate( R.layout.list_row, 父级, false); …

android listview imagebutton

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

标签 统计

android ×1

imagebutton ×1

listview ×1