Java Code Examples for de.hdodenhof.circleimageview.CircleImageView#setOnClickListener()

The following examples show how to use de.hdodenhof.circleimageview.CircleImageView#setOnClickListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RegistActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void initData(){
    btn_regist = (ButtonFlat)this.findViewById(R.id.id_regist_btn_regist);
    btn_regist.setOnClickListener(this);
    btn_regist.setBackgroundColor(getResources().getColor(R.color.colorPrimaryDark));

    rb_man = (RadioButton)this.findViewById(R.id.id_regist_rb_man);
    rb_woman = (RadioButton)this.findViewById(R.id.id_regist_rb_woman);

    et_age = (MaterialEditText)this.findViewById(R.id.id_regist_et_age);
    et_username = (MaterialEditText)this.findViewById(R.id.id_regist_et_username);
    et_password = (MaterialEditText)this.findViewById(R.id.id_regist_et_password);
    et_ensure_password = (MaterialEditText)this.findViewById(R.id.id_regist_et_ensurepassword);
    et_recommend_name = (MaterialEditText)this.findViewById(R.id.id_regist_et_recommend_name);
    iv_head  = (CircleImageView)this.findViewById(R.id.id_regist_iv_head);
    iv_head.setOnClickListener(this);
}
 
Example 2
Source File: MenuViewProxy.java    From RelaxFinger with GNU General Public License v2.0 6 votes vote down vote up
private void initMenuView() {

        if (mIsBallRight) {
            mMenuView = LayoutInflater.from(mContext).inflate(R.layout.popup, null);
        } else {
            mMenuView = LayoutInflater.from(mContext).inflate(R.layout.popup_left, null);
        }

        mMenuA = (CircleImageView) mMenuView.findViewById(R.id.menuA);
        mMenuB = (CircleImageView) mMenuView.findViewById(R.id.menuB);
        mMenuC = (CircleImageView) mMenuView.findViewById(R.id.menuC);
        mMenuD = (CircleImageView) mMenuView.findViewById(R.id.menuD);
        mMenuE = (CircleImageView) mMenuView.findViewById(R.id.menuE);

        mMenuA.setOnClickListener(this);
        mMenuB.setOnClickListener(this);
        mMenuC.setOnClickListener(this);
        mMenuD.setOnClickListener(this);
        mMenuE.setOnClickListener(this);

        updateMenuIcons();

        mMenuLayout = (FrameLayout) mMenuView.findViewById(R.id.menu_layout);
        mMenuLayout.setOnClickListener(this);

    }
 
Example 3
Source File: AddGroupActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
private void initData(){
    iv_group_img = (CircleImageView)this.findViewById(R.id.id_add_group_iv_group_img);
    iv_group_img.setOnClickListener(this);
    et_group_description = (MaterialEditText)this.findViewById(R.id.id_add_group_et_description);
    et_groupname = (MaterialEditText)this.findViewById(R.id.id_add_group_et_groupname);
    tv_choose_point = (TextView)this.findViewById(R.id.id_add_group_tv_choose_point);
    btn_submit = (ButtonRectangle)this.findViewById(R.id.id_add_group_btn_add);
    btn_submit.setOnClickListener(this);
    tv_choose_point.setOnClickListener(this);

    rb_private_1 = (RadioButton)this.findViewById(R.id.id_add_group_rb_private_1);
    rb_private_2 = (RadioButton)this.findViewById(R.id.id_add_group_rb_private_2);
    rb_public_1 = (RadioButton)this.findViewById(R.id.id_add_group_rb_public_1);
    rb_public_2 = (RadioButton)this.findViewById(R.id.id_add_group_rb_public_2);
}
 
Example 4
Source File: MainActivity.java    From Alexa-Voice-Service with MIT License 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_app_bar);

    toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle("Login");

    preferences = Util.getPrefernces(MainActivity.this);

    myContext = MainActivity.this;

    mRequestContext = RequestContext.create(this);
    mRequestContext.registerListener(new AuthorizeListenerImpl());

    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);
    }

    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);
    }
 
Example 5
Source File: UserDataActivity.java    From Social with Apache License 2.0 4 votes vote down vote up
private void initData(){
    tv_nickname = (TextView)this.findViewById(R.id.id_user_data_tv_nickname);
    tv_username = (TextView)this.findViewById(R.id.id_user_data_tv_username);
    tv_city = (TextView)this.findViewById(R.id.id_user_data_tv_city);
    tv_signature = (TextView)this.findViewById(R.id.id_user_data_tv_signature);
    iv_head = (CircleImageView)this.findViewById(R.id.id_user_data_iv_userhead);
    //iv_sex = (ImageView)this.findViewById(R.id.id_user_data_iv_sex);
    iv_news_img_1 = (ImageView)this.findViewById(R.id.id_user_data_iv_news_img_1);
    iv_news_img_2 = (ImageView)this.findViewById(R.id.id_user_data_iv_news_img_2);
    iv_news_img_3 = (ImageView)this.findViewById(R.id.id_user_data_iv_news_img_3);
    btn_add = (ButtonRectangle)this.findViewById(R.id.id_user_data_btn_add);
    btn_chat = (ButtonRectangle)this.findViewById(R.id.id_user_data_btn_chat);
    btn_delet = (ButtonRectangle)this.findViewById(R.id.id_user_data_btn_delete);
    btn_add.setOnClickListener(this);
    btn_delet.setOnClickListener(this);
    btn_chat.setOnClickListener(this);
    iv_head.setOnClickListener(this);

    tv_sex = (TextView)this.findViewById(R.id.id_user_data_tv_sex);
    tv_age = (TextView)this.findViewById(R.id.id_user_data_tv_age);
    ll_sex = (LinearLayout)this.findViewById(R.id.id_user_data_ll_sex);

    tv_constellation = (TextView)this.findViewById(R.id.id_user_data_tv_constellation);
    ll_constellation = (LinearLayout)this.findViewById(R.id.id_user_data_ll_constellation);

    tv_occupation = (TextView)this.findViewById(R.id.id_user_data_tv_occupation);
    ll_occupation = (LinearLayout)this.findViewById(R.id.id_user_data_ll_occupation);

    rv_news = (RippleView)this.findViewById(R.id.id_user_data_rv_news);
    rv_news.setOnRippleCompleteListener(this);
    rv_photo = (RippleView)this.findViewById(R.id.id_user_data_rv_photo);
    rv_photo.setOnRippleCompleteListener(this);

    gridview = (MyGridView)this.findViewById(R.id.id_id_user_data_gv_photowall);
    gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
            Intent intent = new Intent(UserDataActivity.this, ShowNewsImageActivity.class);
            String[] list_path = new String[list_photo_wall.size()];
            for (int i=0; i<list_photo_wall.size();i++){
                list_path[i] =  list_photo_wall.get(i);
            }
            intent.putExtra("listpath",list_path);
            intent.putExtra("position",position);
            startActivity(intent);
        }
    });

}
 
Example 6
Source File: MainActivity.java    From FaceT with Mozilla Public License 2.0 4 votes vote down vote up
private void setupNavHeader() {

        View header = view.getHeaderView(0);
        final TextView usernameHeader = (TextView) header.findViewById(R.id.username_header);
        final TextView emailHeader = (TextView) header.findViewById(R.id.email_header);
        final CircleImageView headerphoto = (CircleImageView) header.findViewById(R.id.profile_image);
        headerphoto.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent accountIntent = new Intent(MainActivity.this, ProfileActivity.class);
                accountIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                startActivity(accountIntent);
            }
        });

        if (mAuth.getCurrentUser() != null) {
            mDatabaseUsers.child(mAuth.getCurrentUser().getUid()).addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    final User user_data = dataSnapshot.getValue(User.class);
                    if (user_data != null) {

                        Typeface fontType = FontManager.getTypeface(getApplicationContext(), FontManager.APP_FONT);
                        usernameHeader.setTypeface(fontType);
                        emailHeader.setTypeface(fontType);

                        usernameHeader.setText(user_data.getName());
                        if (user_data.getEmail() != null && user_data.getEmail().length() > 0)
                            emailHeader.setText(user_data.getEmail());
                        else if (user_data.getEmail() == null || user_data.getEmail().length() == 0)
                            emailHeader.setText(mAuth.getCurrentUser().getEmail());

                        Picasso.with(getApplicationContext()).load(user_data.getImage()).networkPolicy(NetworkPolicy.OFFLINE).into(headerphoto, new Callback() {
                            @Override
                            public void onSuccess() {
                            }

                            @Override
                            public void onError() {
                                Picasso.with(getApplicationContext())
                                        .load(user_data.getImage())
                                        .centerCrop()
                                        .fit()
                                        .into(headerphoto);
                            }
                        });
                    }
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {

                }
            });
        }
    }