Search in sources :

Example 1 with TimeLineAvatarImageView

use of org.qii.weiciyuan.support.lib.TimeLineAvatarImageView in project weiciyuan by qii.

the class DMConversationAdapter method buildAvatar.

protected void buildAvatar(TimeLineAvatarImageView view, int position, final UserBean user) {
    ((IWeiciyuanDrawable) view).checkVerified(user);
    String image_url = user.getProfile_image_url();
    if (!TextUtils.isEmpty(image_url)) {
        view.setVisibility(View.VISIBLE);
        commander.downloadAvatar(view.getImageView(), user, (AbstractTimeLineFragment) fragment);
        view.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), UserInfoActivity.class);
                intent.putExtra("token", GlobalContext.getInstance().getSpecialToken());
                intent.putExtra("user", user);
                getActivity().startActivity(intent);
            }
        });
    } else {
        view.setVisibility(View.GONE);
    }
}
Also used : UserInfoActivity(org.qii.weiciyuan.ui.userinfo.UserInfoActivity) Intent(android.content.Intent) TimeLineAvatarImageView(org.qii.weiciyuan.support.lib.TimeLineAvatarImageView) TextView(android.widget.TextView) View(android.view.View) ListView(android.widget.ListView) IWeiciyuanDrawable(org.qii.weiciyuan.support.asyncdrawable.IWeiciyuanDrawable)

Example 2 with TimeLineAvatarImageView

use of org.qii.weiciyuan.support.lib.TimeLineAvatarImageView in project weiciyuan by qii.

the class BrowserWeiboMsgCommentAndRepostAdapter method buildAvatar.

protected void buildAvatar(TimeLineAvatarImageView view, int position, final UserBean user) {
    view.setVisibility(View.VISIBLE);
    view.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(getActivity(), UserInfoActivity.class);
            intent.putExtra("token", GlobalContext.getInstance().getSpecialToken());
            intent.putExtra("user", user);
            getActivity().startActivity(intent);
        }
    });
    view.setOnLongClickListener(new View.OnLongClickListener() {

        @Override
        public boolean onLongClick(View v) {
            UserDialog dialog = new UserDialog(user);
            dialog.show(fragment.getFragmentManager(), "");
            return true;
        }
    });
    view.checkVerified(user);
    buildAvatar(view.getImageView(), position, user);
}
Also used : UserInfoActivity(org.qii.weiciyuan.ui.userinfo.UserInfoActivity) Intent(android.content.Intent) ImageView(android.widget.ImageView) View(android.view.View) TimeLineAvatarImageView(org.qii.weiciyuan.support.lib.TimeLineAvatarImageView) TextView(android.widget.TextView) TimeTextView(org.qii.weiciyuan.support.lib.TimeTextView) ListView(android.widget.ListView)

Aggregations

Intent (android.content.Intent)2 View (android.view.View)2 ListView (android.widget.ListView)2 TextView (android.widget.TextView)2 TimeLineAvatarImageView (org.qii.weiciyuan.support.lib.TimeLineAvatarImageView)2 UserInfoActivity (org.qii.weiciyuan.ui.userinfo.UserInfoActivity)2 ImageView (android.widget.ImageView)1 IWeiciyuanDrawable (org.qii.weiciyuan.support.asyncdrawable.IWeiciyuanDrawable)1 TimeTextView (org.qii.weiciyuan.support.lib.TimeTextView)1