ImageView setVisibility - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setVisibility method.

This code example shows how to use the following methods: getVisibility, setImageDrawable, setVisibility
        if (mIconView == null) {
            insertIconView(); 
        } 
 
        if (icon != null || mPreserveIconSpacing) {
            mIconView.setImageDrawable(showIcon ? icon : null);
 
            if (mIconView.getVisibility() != VISIBLE) {
                mIconView.setVisibility(VISIBLE);
            } 
        } else { 
            mIconView.setVisibility(GONE);
        } 
    } 
 
    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mIconView != null && mPreserveIconSpacing) {
            // Enforce minimum icon spacing 
            ViewGroup.LayoutParams lp = getLayoutParams();
Full Snippet Info
9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setImageDrawable, setImageResource, setVisibility
        if (mMobileType != null) {
            mMobileType.setImageDrawable(null);
        } 
 
        if(mAirplane != null) {
            mAirplane.setImageDrawable(null);
        } 
 
        apply(); 
    } 
 
    // Run after each indicator change. 
    private void apply() { 
        if (mWifiGroup == null) return;
 
        if (mWifiVisible) {
            mWifi.setImageResource(mWifiStrengthId);
            mWifiActivity.setImageResource(mWifiActivityId);
 
            mWifiGroup.setContentDescription(mWifiDescription);

10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setId, setLayoutParams, setVisibility
This code example shows how to use the following methods: getVisibility, setImageDrawable, setVisibility
        if (mIconView == null) {
            insertIconView(); 
        } 
         
        if (icon != null || mPreserveIconSpacing) {
            mIconView.setImageDrawable(showIcon ? icon : null);
 
            if (mIconView.getVisibility() != VISIBLE) {
                mIconView.setVisibility(VISIBLE);
            } 
        } else { 
            mIconView.setVisibility(GONE);
        } 
    } 
     
    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mIconView != null && mPreserveIconSpacing) {
            // Enforce minimum icon spacing 
            ViewGroup.LayoutParams lp = getLayoutParams();
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setId, setTag, setImageDrawable, setScaleType, setVisibility
     * Sets up the status icon, creating it if necessary. 
     */ 
    public void setStatusButton(Drawable icon, int id, long appId) {
        if (icon != null) {
            if (mStatusButton == null) {
                mStatusButton = new ImageView(mContext);
                mStatusButton.setId(id);
                mStatusButton.setScaleType(ScaleType.CENTER);
                addView(mStatusButton);
            } 
            mStatusButton.setImageDrawable(icon);
            mStatusButton.setTag(appId);
            mStatusButton.setVisibility(View.VISIBLE);
        } else { 
            if (mStatusButton != null) {
                mStatusButton.setVisibility(View.GONE);
            } 
        } 
    } 
 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related ImageView setVisibility Questions & Answers:

Other ImageView setVisibility Examples

198:				videoPreview.setVisibility(View.GONE);
199:	
200:				imgPreview.setVisibility(View.VISIBLE);
201:	
202:				// bimatp factory
-
222:			try {
223:				// hide image preview
224:				imgPreview.setVisibility(View.GONE);
225:	
226:				videoPreview.setVisibility(View.VISIBLE);

Read More

54:	        
55:	        imgIcon.setImageResource(spinnerNavItem.get(position).getIcon());
56:	        imgIcon.setVisibility(View.GONE);
57:	        txtTitle.setText(spinnerNavItem.get(position).getTitle());
58:	        return convertView;

Read More

setVisibility Method Overview
Set the enabled state of this view.
See Code Examples for other Android ImageView Methods: