<?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);
获取Adapter上的某个组件
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();
}
});
|