Best code examples for ImageView setVisibility method (android.widget.ImageView.setVisibility)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setVisibility method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

ImageView setVisibility examples from Open Source projects
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
218:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
220:	if (mIconView.getVisibility() != VISIBLE) { 
221:	mIconView.setVisibility(VISIBLE); 
-
224:	mIconView.setVisibility(GONE); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: setImageDrawable, setImageResource, setVisibility
168:	mAirplane.setImageDrawable(null); 
-
205:	mAirplane.setImageResource(mAirplaneIconId); 
206:	mAirplane.setVisibility(View.VISIBLE); 
-
208:	mAirplane.setVisibility(View.GONE); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: setVisibility, setId, setLayoutParams
79:	mImageView = new ImageView(context); 
-
82:	mImageView.setLayoutParams(imageViewLayoutParams); 
83:	mImageView.setId(INTERNAL_IMAGEVIEW_ID); 
84:	mImageView.setVisibility(View.VISIBLE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
212:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
214:	if (mIconView.getVisibility() != VISIBLE) { 
215:	mIconView.setVisibility(VISIBLE); 
-
218:	mIconView.setVisibility(GONE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setImageDrawable, setScaleType, setVisibility, setId, setTag
347:	mStatusButton = new ImageView(mContext); 
348:	mStatusButton.setId(id); 
349:	mStatusButton.setScaleType(ScaleType.CENTER); 
-
352:	mStatusButton.setImageDrawable(icon); 
353:	mStatusButton.setTag(appId); 
354:	mStatusButton.setVisibility(View.VISIBLE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setImageBitmap, setVisibility
142:	if (imgView != null && AsyncDrawable.getTask(imgView) == this) { //make sure the ImageView instance has not been reused for another page 
-
144:	imgView.setImageBitmap(result); 
145:	imgView.setVisibility(View.VISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
218:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
220:	if (mIconView.getVisibility() != VISIBLE) { 
221:	mIconView.setVisibility(VISIBLE); 
-
224:	mIconView.setVisibility(GONE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
95:	iv.setVisibility(View.GONE); 
-
109:	iv.setVisibility(View.VISIBLE); 
110:	iv.setImageDrawable(item.getDrawable()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
218:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
220:	if (mIconView.getVisibility() != VISIBLE) { 
221:	mIconView.setVisibility(VISIBLE); 
-
224:	mIconView.setVisibility(GONE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
65:	i.setVisibility(View.VISIBLE); 
66:	i.setImageDrawable(image); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setVisibility, clearAnimation, startAnimation
142:	mCachedState.setVisibility(View.VISIBLE); 
143:	mCachedState.clearAnimation(); 
144:	mCachedState.startAnimation(out); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setScaleType, setVisibility, setId, setOnClickListener
325:	mStatusButton = new ImageView(mContext); 
326:	mStatusButton.setId(id); 
327:	mStatusButton.setOnClickListener(mStatusButtonClickListener); 
328:	mStatusButton.setPadding(mStatusButtonPadding, 0, mStatusButtonPadding, 0); 
329:	mStatusButton.setScaleType(ScaleType.CENTER); 
-
332:	mStatusButton.setImageDrawable(icon); 
333:	mStatusButton.setTag(appId); 
334:	mStatusButton.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
212:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
214:	if (mIconView.getVisibility() != VISIBLE) { 
215:	mIconView.setVisibility(VISIBLE); 
-
218:	mIconView.setVisibility(GONE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageBitmap, setVisibility
57:	view.setVisibility(View.VISIBLE); 
58:	view.setImageBitmap(bitmap); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setVisibility, clearAnimation, getVisibility, setAnimation
164:	this.mArrow.setVisibility(View.VISIBLE); 
-
167:	this.mArrow.setAnimation(mReverseFlipAnimation); 
-
192:	this.mArrow.setVisibility(View.VISIBLE); 
-
195:	this.mArrow.setAnimation(mFlipAnimation); 
-
208:	if (this.mArrow.getVisibility() != View.INVISIBLE) 
209:	this.mArrow.setVisibility(View.INVISIBLE); 
-
224:	this.mArrow.setVisibility(View.GONE); 
225:	mArrow.clearAnimation(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setColorFilter, setVisibility, getLayoutParams, setLayoutParams, setOnTouchListener
166:	RelativeLayout.LayoutParams layout = (LayoutParams) boundaryPoint.getLayoutParams(); 
-
170:	boundaryPoint.setColorFilter(Color.BLACK); 
171:	boundaryPoint.setVisibility(VISIBLE); 
172:	boundaryPoint.setLayoutParams(layout); 
173:	boundaryPoint.setOnTouchListener(onTimelineTouchListener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
33:	icon.setImageDrawable(item.getIcon()); 
34:	icon.setVisibility(item.getIcon() != null ? View.VISIBLE : View.GONE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
133:	view.setImageDrawable(drawable); 
134:	view.setVisibility(View.VISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageResource, setVisibility, setOnClickListener
88:	action.setImageResource(iconResourceId); 
-
92:	action.setVisibility(onClickListener != null ? View.VISIBLE : View.GONE); 
-
95:	action.setOnClickListener(onClickListener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setVisibility
49:	buttonAdd.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
338:	mDragView.setVisibility(GONE); 
-
341:	mDragView.setImageDrawable(null); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
133:	view.setImageDrawable(drawable); 
134:	view.setVisibility(View.VISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setImageResource, setVisibility, setOnClickListener
57:	mLogoView.setImageResource(resId); 
58:	mLogoView.setVisibility(View.VISIBLE); 
59:	mLogoView.setOnClickListener(onClickListener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, setBackgroundDrawable
222:	popupView.setVisibility(View.GONE); 
223:	popupView.setImageDrawable(null); 
224:	popupView.setBackgroundDrawable(null); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
85:	mLockIcon.setImageDrawable(d); 
86:	mLockIcon.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageResource, setVisibility
147:	mMobileType.setImageResource(mMobileTypeId); 
-
164:	mMobileType.setVisibility( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
319:	imageView.setVisibility(icon != null ? View.VISIBLE : View.GONE); 
320:	imageView.setImageDrawable(icon); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setScaleType, setVisibility
583:	mPresenceIcon = new ImageView(mContext); 
-
586:	mPresenceIcon.setImageDrawable(icon); 
587:	mPresenceIcon.setScaleType(ScaleType.CENTER); 
588:	mPresenceIcon.setVisibility(View.VISIBLE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getDrawable, setVisibility, setClickable, setEnabled
140:	Drawable drawable = imageView.getDrawable(); 
-
205:	imageView.setVisibility(View.GONE); 
206:	imageView.setClickable(false); 
207:	imageView.setEnabled(false); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, getVisibility
226:	mIconView.setImageDrawable(showIcon ? icon : null); 
-
228:	if (mIconView.getVisibility() != VISIBLE) { 
229:	mIconView.setVisibility(VISIBLE); 
-
232:	mIconView.setVisibility(GONE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setVisibility, startAnimation
285:	target.startAnimation(alphaAnim); 
286:	target.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setVisibility, clearAnimation
111:	mImageView1.setVisibility(View.INVISIBLE); 
-
113:	mImageView1.clearAnimation(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageResource, setScaleType, setVisibility
46:	customSpashScreen = new ImageView(this); 
47:	customSpashScreen.setImageResource(super.getIntegerProperty(C_CUSTOM_SPLASH_SCREEN, 0)); 
48:	customSpashScreen.setScaleType(ScaleType.CENTER_CROP); 
-
59:	customSpashScreen.setImageResource(super.getIntegerProperty(C_CUSTOM_SPLASH_SCREEN, 0)); 
60:	customSpashScreen.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility
81:	mImageButton = new ImageButton(context); 
-
144:	mImageButton.setVisibility(VISIBLE); 
145:	mImageButton.setImageDrawable(img); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, removeView
290:	dragView.setVisibility(GONE); 
-
292:	windowManager.removeView(dragView); 
293:	dragView.setImageDrawable(null); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageResource, setVisibility, setOnClickListener
59:	mLogoView.setImageResource(resId); 
60:	mLogoView.setVisibility(View.VISIBLE); 
61:	mLogoView.setOnClickListener(onClickListener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setImageDrawable, setVisibility, assignContactUri
165:	mAvatarView.assignContactUri(null); 
-
167:	mAvatarView.setImageDrawable(avatarDrawable); 
168:	mAvatarView.setVisibility(View.VISIBLE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setVisibility
82:	mButton.setVisibility(View.GONE); 
-
98:	mButton.setVisibility(View.VISIBLE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setVisibility
279:	mBackButton.setVisibility(View.GONE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setVisibility, clearAnimation, offsetLeftAndRight, offsetTopAndBottom
258:	unlocker.setVisibility(View.VISIBLE); 
-
274:	unlocker.offsetLeftAndRight(dx); 
275:	unlocker.offsetTopAndBottom(dy); 
-
277:	unlocker.clearAnimation(); 
Full Snippet Info
5
CodeRank
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

Displays an arbitrary image, such as an icon. The ImageView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the image so that it can be used in any layout manager, and pr...
setVisibility Method Overview
Set the enabled state of this view.
See Also
  • getDrawable
    Return the view's drawable, or null if no drawable has been assigned.
  • setAdjustViewBounds
    Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
  • setAlpha
    This method was deprecated in API level 16. use #setImageAlpha(int) instead
  • setImageURI
    Sets the content of this ImageView to the specified Uri.
  • setMaxHeight
    An optional argument to supply a maximum height for this view.
  • setMaxWidth
    An optional argument to supply a maximum width for this view.
  • setScaleType
    Controls how the image should be resized or moved to match the size of this ImageView.