public void onClick(View v) { if (mUserinfoDialog != null && mUserinfoDialog.isShowing()) { mHeadTitle.setText(_username + " ▼"); mUserinfoDialog.hide(); } else { mHeadTitle.setText(_username + " ▲"); mUserinfoDialog.show(); } }
// 初始化视图控件 private void initView() { _hisuid = getIntent().getIntExtra("his_id", 0); _hisname = getIntent().getStringExtra("his_name"); _username = getIntent().getStringExtra("his_name"); _uid = ((AppContext) getApplication()).getLoginUid(); mBack = (ImageView) findViewById(R.id.user_center_back); mRefresh = (ImageView) findViewById(R.id.user_center_refresh); mHeadTitle = (TextView) findViewById(R.id.user_center_head_title); mProgressbar = (ProgressBar) findViewById(R.id.user_center_head_progress); mRelation = (RadioButton) findViewById(R.id.user_center_footbar_relation); mMessage = (RadioButton) findViewById(R.id.user_center_footbar_message); mAtme = (RadioButton) findViewById(R.id.user_center_footbar_atme); mTabActive = (Button) findViewById(R.id.user_center_btn_active); mTabBlog = (Button) findViewById(R.id.user_center_btn_blog); mUserinfoDialog = new UserInfoDialog(UserCenter.this); mUserface = (ImageView) mUserinfoDialog.findViewById(R.id.user_center_userface); mUsername = (TextView) mUserinfoDialog.findViewById(R.id.user_center_username); mFrom = (TextView) mUserinfoDialog.findViewById(R.id.user_center_from); mGender = (TextView) mUserinfoDialog.findViewById(R.id.user_center_gender); mJointime = (TextView) mUserinfoDialog.findViewById(R.id.user_center_jointime); mDevplatform = (TextView) mUserinfoDialog.findViewById(R.id.user_center_devplatform); mExpertise = (TextView) mUserinfoDialog.findViewById(R.id.user_center_expertise); mLatestonline = (TextView) mUserinfoDialog.findViewById(R.id.user_center_latestonline); mHeadTitle.setText(_username + " ▼"); // 设置第一选中项 mTabActive.setEnabled(false); mTabActive.setOnClickListener(tabBtnClick(mTabActive)); mTabBlog.setOnClickListener(tabBtnClick(mTabBlog)); mBack.setOnClickListener(UIHelper.finish(this)); mRefresh.setOnClickListener(refreshClickListener); mHeadTitle.setOnClickListener(headTitleClickListener); mMessage.setOnClickListener(messageClickListener); mAtme.setOnClickListener(atmeClickListener); mUserinfoDialog.setOnCancelListener(dialogCancelListener); this.initLvActive(); this.initLvBlog(); }