0
点赞
收藏
分享

微信扫一扫

10.Android组件-ListView

奋斗De奶爸 2022-03-12 阅读 69
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/background"
    android:orientation="vertical">


    <ListView
        android:id="@+id/lv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</RelativeLayout>
Businesses_2_Adapter bank_card_adapter = new Businesses_2_Adapter();
lv.setAdapter(bank_card_adapter);
lv.setOnItemClickListener(mbankcardListItemClickListener);
holder.button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Log.e(TAG, "位置" + position);
                DataBean items = (DataBean) getItem(position);
                String apkLoadUrl = items.getApkLoadUrl();
                Button bt = (Button) view;
                bt.setText("安装中");
//                notifyDataSetChanged();
            }
        });
举报

相关推荐

0 条评论