本文整理汇总了Java中de.hdodenhof.circleimageview.CircleImageView.setOnClickListener方法的典型用法代码示例。如果您正苦于以下问题:Java CircleImageView.setOnClickListener方法的具体用法?Java CircleImageView.setOnClickListener怎么用?Java CircleImageView.setOnClickListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.hdodenhof.circleimageview.CircleImageView
的用法示例。
在下文中一共展示了CircleImageView.setOnClickListener方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void initView(View view)
{
et_username= (EditText) view.findViewById(R.id.et_username);
et_sex= (EditText) view.findViewById(R.id.et_sex);
et_age= (EditText) view.findViewById(R.id.et_age);
et_desc= (EditText) view.findViewById(R.id.et_desc);
btn_change_userinfo= (Button) view.findViewById(R.id.btn_change_userinfo);
btn_exit= (Button) view.findViewById(R.id.btn_exit);
btn_change_ok= (Button) view.findViewById(R.id.btn_change_ok);
circle_avatar= (CircleImageView) view.findViewById(R.id.circle_avatar);
tv_courier= (TextView) view.findViewById(R.id.tv_courier);
tv_place= (TextView) view.findViewById(R.id.tv_place);
//添加监听器
btn_change_userinfo.setOnClickListener(this);
btn_exit.setOnClickListener(this);
btn_change_ok.setOnClickListener(this);
circle_avatar.setOnClickListener(this);
tv_courier.setOnClickListener(this);
tv_place.setOnClickListener(this);
//默认不允许在输入框中输入
setEnabled(false);
//在输入框中显示用户信息
showUserInfo();
}
示例2: CardViewHolder
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
CardViewHolder(View view) {
super(view);
mUpFlipper = (ViewFlipper) view.findViewById(R.id.mUpFlipper);
mDownFlipper = (ViewFlipper) view.findViewById(R.id.mDownFlipper);
user_name = (TextView) view.findViewById(R.id.review_user_name);
review_date = (TextView) view.findViewById(R.id.review_date);
review_summary = (TextView) view.findViewById(R.id.review_summary);
review_up_score = (TextView) view.findViewById(R.id.review_up_score);
review_down_score = (TextView) view.findViewById(R.id.review_down_score);
review_rating = (RatingBar) view.findViewById(R.id.review_rating);
user_image = (CircleImageView) view.findViewById(R.id.review_user_image);
review_card = (CardView) view.findViewById(R.id.card_review);
review_read_more = (TextView) view.findViewById(R.id.review_read_more);
/*onClickListeners*/
user_image.setOnClickListener(this);
review_read_more.setOnClickListener(this);
review_card.setOnClickListener(this);
mUpFlipper.setOnClickListener(this);
mDownFlipper.setOnClickListener(this);
}
示例3: refreshView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void refreshView(Model model) {
View root = model.tag;
final Author author = model.author;
CircleImageView portrait = (CircleImageView) root.findViewById(R.id.iv_portrait);
TextView name = (TextView) root.findViewById(R.id.tv_name);
ImageView isSelected = (ImageView) root.findViewById(R.id.iv_select);
View line = root.findViewById(R.id.line);
ImageLoader.loadImage(Glide.with(getContext()), portrait, author.getPortrait(), R.mipmap.widget_default_face);
portrait.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
OtherUserHomeActivity.show(v.getContext(), author.getId());
}
});
name.setText(author.getName());
if (model.isSelected) {
isSelected.setVisibility(View.VISIBLE);
} else {
isSelected.setVisibility(View.INVISIBLE);
}
line.setVisibility(View.GONE);
}
示例4: initViews
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
/**
*
*/
@Override
public void initViews() {
View fragView = _sendFragment.getView();
if (fragView == null) return;
_amountEdit = (EditText) fragView.findViewById(R.id.send_amount_textview);
_addressEdit = (EditText) fragView.findViewById(R.id.send_address_input);
_maxTextView = (TextView) fragView.findViewById(R.id.send_max_textview);
_sendBtn = (CircleImageView) fragView.findViewById(R.id.send_btn_id);
_surfaceView = (SurfaceView) fragView.findViewById(R.id.send_camera_preview);
_maxTextView.setOnClickListener(this);
_sendBtn.setOnClickListener(this);
_addressEdit.addTextChangedListener(this);
_amountEdit.addTextChangedListener(this);
System.out.println("listeners setup");
}
示例5: initView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void initView() {
mineFunAllOrder = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fun_all_order);
mineFunWaitPay = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fun_wait_pay);
mineFunWaitReceive = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fun_wait_receive);
mineFunPayback = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fun_payback);
mineFunEvaluate = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fun_evaluate);
mTBoardBottom = (LinearLayout) pullScrollView.getPullRootView().findViewById(R.id.m_t_board_bottom);
contentContainer = (LinearLayout) pullScrollView.getPullRootView().findViewById(R.id.content_container);
mTxtUserName = (TextView) pullScrollView.getPullRootView().findViewById(R.id.txt_username);
attenCountTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_atten_shop_tv);
fansTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_fansno_tv);
salecardTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_quan_tv);
bankNoTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_hb_bankno_tv);
availableMoneyTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_hb_availablemoney_tv);
frozenMoneyTv = (TextView) pullScrollView.getPullRootView().findViewById(R.id.mine_hb_frozenmoney_tv);
imgHead = (CircleImageView) pullScrollView.getPullRootView().findViewById(R.id.img_head);
mineFunAllOrder.setOnClickListener(this);
mineFunWaitPay.setOnClickListener(this);
mineFunWaitReceive.setOnClickListener(this);
mineFunPayback.setOnClickListener(this);
mineFunEvaluate.setOnClickListener(this);
mTxtUserName.setOnClickListener(this);
imgHead.setOnClickListener(this);
pullScrollView.getPullRootView().findViewById(R.id.mine_tt_settings_iv).setOnClickListener(this);
}
示例6: fillDrawerLayoutInfo
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void fillDrawerLayoutInfo() {
//空指针异常
drawerHead = (CircleImageView) findViewById(R.id.nav_head_image);
drawerNickName = (TextView) findViewById(R.id.nav_head_nickname);
drawerPhone = (TextView) findViewById(R.id.nav_head_phonenum);
verifyLogo = (ImageView) findViewById(R.id.nav_head_verify_logo);
if (isLogin) {
curUser.readFromLocalDatabase();
drawerHead.setImageBitmap(Utility.convertStringToBitmap(curUser.getHeadIcon()));
drawerNickName.setText(curUser.getNickName());
//////
String phoneT = curUser.getPhoneNum();
drawerPhone.setText(phoneT.substring(0, 3) + "****" + phoneT.substring(7));
drawerHead.setOnClickListener(null);
if (curUser.isVerified()) {
verifyLogo.setImageResource(R.mipmap.icon_yes_verify);
} else {
verifyLogo.setImageResource(R.mipmap.icon_no_verify);
}
} else {
curUser.setNullValue();
drawerHead.setImageResource(R.drawable.login);
drawerNickName.setText(curUser.getNickName());
drawerPhone.setText(curUser.getPhoneNum());
drawerHead.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(ClientMainActivity.this, LoginActivity.class));
//finish();
}
});
verifyLogo.setImageBitmap(null);
}
}
示例7: initView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void initView() {
mEditUser = (TextView) findViewById(R.id.edit_user);
mEditUser.setOnClickListener(this);
mUserName = (EditText) findViewById(R.id.et_username);
mSex = (EditText) findViewById(R.id.et_sex);
mAge = (EditText) findViewById(R.id.et_ages);
mDesc = (EditText) findViewById(R.id.et_desc);
mConfirmUpdate = (Button) findViewById(R.id.confirm_update);
mConfirmUpdate.setOnClickListener(this);
mAddPic = (CircleImageView) findViewById(R.id.profile_image);
mAddPic.setOnClickListener(this);
UtilTools.getImageFromShare(this, mAddPic);
mDialog = new CustomDialog(this,
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
R.layout.dialog_photo, R.style.pop_anim_style, Gravity.BOTTOM);
//屏幕外点击无效
mDialog.setCancelable(false);
mCamera = (Button) mDialog.findViewById(R.id.btn_camera);
mCamera.setOnClickListener(this);
mPicture = (Button) mDialog.findViewById(R.id.btn_picture);
mPicture.setOnClickListener(this);
mCancel = (Button) mDialog.findViewById(R.id.btn_cancel);
mCancel.setOnClickListener(this);
//设置具体的值
MyUser userInfo = BmobUser.getCurrentUser(MyUser.class);
mUserName.setText(userInfo.getUsername());
mAge.setText(userInfo.getAge() + "");
mSex.setText(userInfo.isSex() ? "男" : "女");
mDesc.setText(userInfo.getDesc());
setEnabled(false);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
示例8: initView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
@SuppressLint("SetTextI18n")
private void initView() {
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.getMenu().getItem(0).setChecked(true);
collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
tabLayout = (TabLayout) findViewById(R.id.tab_layout);
viewPager = (ViewPager) findViewById(R.id.view_pager);
progressRunTimesText = (TextView) findViewById(R.id.progress_times);
progressStepsText = (TextView) findViewById(R.id.progress_step_num);
progressDisEnergyText = (TextView) findViewById(R.id.progress_dis_energy);
circleProgress = (GradeProgressView) findViewById(R.id.circle_progress);
menuButton = (ImageView) findViewById(R.id.menu_button);
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
fab = (FloatingActionButton) findViewById(R.id.fab);
menuBgImg = (ImageView) navigationView.getHeaderView(0).findViewById(R.id.menu_bg_img);
columnChart = (ColumnChartView) findViewById(R.id.column_chart);
welcomeText = (TextView) navigationView.getHeaderView(0).findViewById(R.id.welcome_text);
profileImage = (CircleImageView) navigationView.getHeaderView(0).findViewById(R.id.profile_image);
dataDescription = (TextView) findViewById(R.id.data_description);
progressViewLayout = (RelativeLayout) findViewById(R.id.progress_view_layout);
chartView = (RelativeLayout) findViewById(R.id.chart_view_layout);
//conn = new SocialServiceConn();
setToolbar(R.id.toolbar_main, false);
menuButton.setOnClickListener(this);
fab.setOnClickListener(this);
profileImage.setOnClickListener(this);
menuBgImg.setOnClickListener(this);
navigationView.setNavigationItemSelectedListener(this);
//初始化进度条数值
circleProgress.setProgressWidthAnimation(0);
//初始化Title
collapsingToolbarLayout.setTitle(getResources().getString(R.string.title_activity_main));
//初始化TabLayout
mTitle.add("跑步详情");
mTitle.add("数据统计");
mFragment.add(new RunListFragment());
mFragment.add(new StatisticsFragment());
MyFragmentPagerAdapter adapter = new MyFragmentPagerAdapter(getSupportFragmentManager(), mTitle, mFragment);
runListFragment = (RunListFragment) adapter.getItem(0);
statisticsFragment = (StatisticsFragment) adapter.getItem(1);
viewPager.setAdapter(adapter);
tabLayout.setupWithViewPager(viewPager);
//初始化ColumnChart
columnChart.setContainerScrollEnabled(true, ContainerScrollType.HORIZONTAL);
columnChart.setInteractive(true);
columnChart.setZoomEnabled(false);
columnChart.setContainerScrollEnabled(true, ContainerScrollType.HORIZONTAL);
chartView.setVisibility(View.INVISIBLE);
//初始化welcome文字
welcomeText.setText(Utility.getTime(Types.TYPE_AM_PM) + "好," + username + "!");
}
示例9: setThreadImage
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
/**
* Setting the thread image in the action bar.
* */
protected boolean setThreadImage(final CircleImageView circleImageView, final ImageView imageView, final View.OnClickListener onClickListener){
final String imageUrl = thread.threadImageUrl();
if (circleImageView.getTag() == null || StringUtils.isEmpty(imageUrl) || !imageUrl.equals(circleImageView.getTag()))
{
if (StringUtils.isEmpty(imageUrl))
setRoundCornerDefault(circleImageView, imageView, onClickListener);
else
{
// Check if there is a image saved in the cahce for this thread.
// if (thread.getType()==BThread.Type.Private)
if (imageUrl.split(",").length > 1)
{
int size = getResources().getDimensionPixelSize(R.dimen.chat_sdk_chat_action_barcircle_image_view_size);
new MakeThreadImage(imageUrl.split(","), size, size, thread.getEntityID(), circleImageView);
circleImageView.setOnClickListener(onClickListener);
circleImageView.setVisibility(View.VISIBLE);
circleImageView.bringToFront();
}
else
VolleyUtils.getImageLoader().get(imageUrl, new ImageLoader.ImageListener() {
@Override
public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {
if (response.getBitmap() != null) {
circleImageView.setTag(imageUrl);
circleImageView.setVisibility(View.INVISIBLE);
imageView.setVisibility(View.INVISIBLE);
circleImageView.setImageBitmap(response.getBitmap());
circleImageView.setVisibility(View.VISIBLE);
// setting the task description again so the thread image will be seeing.
setTaskDescription(response.getBitmap(), getTaskDescriptionLabel(), getTaskDescriptionColor());
circleImageView.setOnClickListener(onClickListener);
circleImageView.bringToFront();
}
}
@Override
public void onErrorResponse(VolleyError error) {
setRoundCornerDefault(circleImageView, imageView, onClickListener);
}
});
}
return true;
}
return false;
}
示例10: onCreate
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_app_bar);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
myContext = MainActivity.this;
mRequestContext = RequestContext.create(this);
mRequestContext.registerListener(new AuthorizeListenerImpl());
txt = (TextView) findViewById(R.id.text);
PRODUCT_DSN = Settings.Secure.getString(getApplicationContext().getContentResolver(),
Settings.Secure.ANDROID_ID);
try {
codeVerifier = CodeVerifierandChallengeMethods.generateCodeVerifier();
codeChallenge = generateCodeChallenge(codeVerifier, "S256");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("Your JRE does not support the required "
+ "SHA-256" + " algorithm.", e);
}
refreshToken= true;
DownChannelestablished = true;
dwn = new DownChannel();
tokenHanlder = new TokenHandler(myContext);
Loginbtn = (CircleImageView) findViewById(R.id.btn);
Loginbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo != null && activeNetworkInfo.isConnected())
intiLogi();
else
{
Snackbar.make(v, "No Internet Connectivity", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
}
});
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
NavigationFragment navigationFragment = (NavigationFragment)
getSupportFragmentManager().findFragmentById(R.id.navigation_fragment);
navigationFragment.setUp(R.id.navigation_fragment,(DrawerLayout)findViewById(R.id.drawer_layout),toolbar);
}
示例11: findView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
private void findView(View view) {
btn_exit_user = (Button) view.findViewById(R.id.btn_exit_user);
btn_exit_user.setOnClickListener(this);
edit_user = (TextView) view.findViewById(R.id.edit_user);
edit_user.setOnClickListener(this);
tv_courier = (TextView) view.findViewById(R.id.tv_courier);
tv_courier.setOnClickListener(this);
tv_phone = (TextView) view.findViewById(R.id.tv_phone);
tv_phone.setOnClickListener(this);
et_username = (EditText) view.findViewById(R.id.et_username);
et_sex = (EditText) view.findViewById(R.id.et_sex);
et_age = (EditText) view.findViewById(R.id.et_age);
et_desc = (EditText) view.findViewById(R.id.et_desc);
btn_update_ok = (Button) view.findViewById(R.id.btn_update_ok);
btn_update_ok.setOnClickListener(this);
profile_image = (CircleImageView) view.findViewById(R.id.profile_image);
profile_image.setOnClickListener(this);
//初始化dialog
dialog = new CustomDialog(getActivity(), 0, 0,
R.layout.dialog_photo, R.style.pop_anim_style, Gravity.BOTTOM, 0);
//提示框以外点击无效
dialog.setCancelable(false);
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);
btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);
btn_cancel.setOnClickListener(this);
//默认是不可点击的/不可输入
setEnabled(false);
//设置具体的值
MyUser userInfo = BmobUser.getCurrentUser(MyUser.class);
et_username.setText(userInfo.getUsername());
et_age.setText(userInfo.getAge() + "");
et_sex.setText(userInfo.isSex() ? getString(R.string.text_boy) : getString(R.string.text_girl_f));
et_desc.setText(userInfo.getDesc());
}
示例12: getItemView
import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
public View getItemView(int position, View convertView, ViewHolder holder) {
CircleImageView iv_avatar = (CircleImageView) holder.getView(R.id.iv_avatar);
TextView tv_username = (TextView) holder.getView(R.id.tv_username);
TextView tv_date = (TextView) holder.getView(R.id.tv_date);
TextView tv_content = (TextView) holder.getView(R.id.tv_content);
CheckBox cb_fav = (CheckBox) holder.getView(R.id.cb_fav);
TextView tv_comment = (TextView) holder.getView(R.id.tv_comment);
TextView tv_share = (TextView) holder.getView(R.id.tv_share);
ImageView iv_tag = (ImageView) holder.getView(R.id.iv_tag);
ImageView iv_avatar_tag = (ImageView) holder.getView(R.id.iv_avatar_tag);
ProgressBar pb_active = (ProgressBar) holder.getView(R.id.pb_active);
TextView tv_del = (TextView) holder.getView(R.id.tv_del);
NineGridLayout nineGridLayout = (NineGridLayout) holder.getView(R.id.iv_content);
final int i = position;
((Button) holder.getView(R.id.btn_menu)).setOnClickListener(new OnClickListener() {
public void onClick(View v) {
TimeLineAdapter.this.showPopupMenu(v, i);
}
});
Post post = (Post) this.data.get(position);
tv_username.setText(post.user != null ? post.user.nickname : "");
tv_date.setText(DateHelper.timezoneFormat(post.created_at, "MM-dd HH:mm"));
tv_content.setText(post.body);
TimeLineUtility.addLinks(tv_content);
loadAvatar(iv_avatar, post);
loadContentImg(nineGridLayout, post);
cb_fav.setText(post.envious_count + "");
tv_comment.setText(post.comment_count + "");
cb_fav.setChecked(isFav(post));
setUpTopTag(iv_tag, post);
setUpAvatarTag(pb_active, iv_avatar_tag, post);
setUpOwner(tv_del, post);
AvartaClickListener listener = new AvartaClickListener(post.user.nickname);
iv_avatar.setOnClickListener(listener);
tv_username.setOnClickListener(listener);
cb_fav.setOnClickListener(new FavClickListener(position));
tv_comment.setOnClickListener(new CommentClickListener(post, position));
tv_share.setOnClickListener(new ShareClickListener(post));
convertView.setOnLongClickListener(new LongClickCopy(post));
return convertView;
}