当前位置: 首页>>代码示例>>Java>>正文


Java CircleImageView.setVisibility方法代码示例

本文整理汇总了Java中de.hdodenhof.circleimageview.CircleImageView.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java CircleImageView.setVisibility方法的具体用法?Java CircleImageView.setVisibility怎么用?Java CircleImageView.setVisibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.hdodenhof.circleimageview.CircleImageView的用法示例。


在下文中一共展示了CircleImageView.setVisibility方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setRoundCornerDefault

import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
/**
 * Set the default image for this thread in the action bar.
 * */
protected void setRoundCornerDefault(CircleImageView circleImageView, ImageView roundedCornerImageView, View.OnClickListener onClickListener){
    circleImageView.setVisibility(View.INVISIBLE);
    roundedCornerImageView.setVisibility(View.INVISIBLE);

    if (thread.getTypeSafely() == BThread.Type.Public)
        roundedCornerImageView.setImageResource(R.drawable.ic_users);
    else if (thread.getUsers().size() < 3)
        roundedCornerImageView.setImageResource(R.drawable.ic_profile);
    else
        roundedCornerImageView.setImageResource(R.drawable.ic_users);

    roundedCornerImageView.setVisibility(View.VISIBLE);

    roundedCornerImageView.bringToFront();

    roundedCornerImageView.setOnClickListener(onClickListener);
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:21,代码来源:ChatSDKAbstractChatActivity.java

示例2: convert

import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
@Override
protected void convert(BaseViewHolder helper, FriendInfo item) {
    CircleImageView profileImg = helper.getView(R.id.friend_profile_list_item);
    CircleImageView onlineImg = helper.getView(R.id.online_flag_img);
    Utility.loadFriendProfileImg(mContext.getApplicationContext(), item.getUsername(), profileImg);
    if (item.isOnline()) {
        onlineImg.setVisibility(View.VISIBLE);
        onlineImg.setImageResource(R.drawable.green);
    } else {
        onlineImg.setVisibility(View.INVISIBLE);
    }

    helper.setText(R.id.friend_name_list_item, item.getUsername());
    helper.setText(R.id.friend_des_list_item,
            String.format("今日跑步%d次 | 共跑步%d次", item.getNumToday(), item.getNumAll()));
}
 
开发者ID:SailFlorve,项目名称:RunHDU,代码行数:17,代码来源:FriendRecyclerViewAdapter.java

示例3: initViews

import de.hdodenhof.circleimageview.CircleImageView; //导入方法依赖的package包/类
@Override
protected void initViews() {
    StatusBarUtil.setPaddingSmart(this, findViewById(R.id.id_statusbar));
    StatusBarUtil.immersive(this, ResouceUtil.getColor(R.color.gray));
    
    mAutorTv = (TextView) findViewById(R.id.id_author_tv);
    mAvatarIv = (CircleImageView) findViewById(R.id.id_avatar_iv);
    mFollowTv = (TextView) findViewById(R.id.id_follow_tv);
    mWebView = (UIWebView) findViewById(R.id.id_webview);

    mAvatarIv.setVisibility(View.GONE);
    mFollowTv.setVisibility(View.VISIBLE);

    findViewById(R.id.id_back_iv).setOnClickListener(this);
    mFollowTv.setOnClickListener(this);
    mWebView.setOnKeyListener((v, keyCode, event) -> {
        if (event.getAction() == KeyEvent.ACTION_DOWN) {
            if (keyCode == KeyEvent.KEYCODE_BACK && mWebView.canGoBack()) {  //表示按返回键
                mWebView.goBack();
                return true;
            }
        }
        return false;
    });
}
 
开发者ID:Wilshion,项目名称:HeadlineNews,代码行数:26,代码来源:WebViewActivity.java

示例4: 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;
    }
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:57,代码来源:ChatSDKAbstractChatActivity.java


注:本文中的de.hdodenhof.circleimageview.CircleImageView.setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。