use of com.yuxuan.admin.expression.adapter.MyInfoAdapter in project expression by happy-yuxuan.
the class MyInfoFragment method findView.
// 初始化布局
private void findView(View view) {
dialog = new CustomDialog(getActivity(), WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, R.layout.dialog_photo, R.style.Theme_dialog, Gravity.BOTTOM, R.style.pop_anim_style);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
listview = (ListView) view.findViewById(R.id.list_myinfo);
cv_head = (CircleImageView) view.findViewById(R.id.cv_head);
cv_head.setBorderColor(Color.BLUE);
cv_head.setOnClickListener(this);
// 初始化头像
initImgHead();
btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);
btn_cancel.setOnClickListener(this);
btn_camera = (Button) dialog.findViewById(R.id.btn_camera);
btn_camera.setOnClickListener(this);
btn_picture = (Button) dialog.findViewById(R.id.btn_picture);
btn_picture.setOnClickListener(this);
listview.setAdapter(new MyInfoAdapter(getData(), getActivity()));
// 设置listview Item 点击事件
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
String itemTextString = data.get(arg2).getTv_item_myinfo();
switch(itemTextString) {
// 我的订单
case "我的订单":
startActivity(new Intent(getActivity(), UMyOrdersActivity.class));
break;
// 我的信息
case "我的信息":
startActivity(new Intent(getActivity(), UMyInfomationActivity.class));
break;
// 我去派件
case "我去派件":
startActivity(new Intent(getActivity(), UMyPaiJianActivity.class));
break;
// 历史订单
case "历史订单":
startActivity(new Intent(getActivity(), UHistoryRecordActivity.class));
break;
// 关于我们
case "关于我们":
startActivity(new Intent(getActivity(), UAboutWeActivity.class));
break;
// 设置
case "设置":
startActivity(new Intent(getActivity(), USetingActivity.class));
break;
default:
break;
}
}
});
}
Aggregations