ImageView setColorFilter - 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 setColorFilter method.

This code example shows how to use the following methods:setColorFilter, setImageResource
		textView.setTextSize(14.0f);
		 
		textView.setText(inode.getDisplayName());
		textView.setGravity(Gravity.CENTER);
		 
		ImageView icon = new ImageView(context);
		icon.setImageResource(inode.getImageResource());
		if (inode.isDisabled()) {
			textView.setTextColor(Color.GRAY);
			icon.setColorFilter(0xff888888, Mode.SRC_ATOP); //argb
		} else { 
			textView.setTextColor(Color.WHITE);
			icon.setColorFilter(0xffffffff, Mode.SRC_ATOP); //argb
		} 
		setBackgroundColor(Color.BLACK);
		 
		addView(icon);
		addView(textView);
	} 
 
6
CodeRank
This code example shows how to use the following methods:setColorFilter
		TiUIHelper.firePostLayoutEvent(viewProxy);
	} 
 
	public void setColorFilter(ColorFilter filter)
	{ 
		imageView.setColorFilter(filter);
	} 
 
	private void updateScaleType() 
	{ 
		if (orientation > 0 || enableZoomControls) {
			imageView.setScaleType(ScaleType.MATRIX);
			imageView.setAdjustViewBounds(false);
		} else { 
			if (viewWidthDefined && viewHeightDefined) {
				imageView.setAdjustViewBounds(false);
				imageView.setScaleType(ScaleType.FIT_XY);
			} else if (!enableScale) {
				imageView.setAdjustViewBounds(false);
				imageView.setScaleType(ScaleType.CENTER);
6
CodeRank
This code example shows how to use the following methods:getLayoutParams, setLayoutParams, setOnTouchListener, setColorFilter, setVisibility
		setBoundaryPointParameters(endPointImageButton, leftMargin);
	} 
 
	private void setBoundaryPointParameters(ImageButton boundaryPoint, int leftMargin) {
		int pixelPerSecond = SoundMixer.getInstance().getPixelPerSecond();
		RelativeLayout.LayoutParams layout = (LayoutParams) boundaryPoint.getLayoutParams();
		layout.height = getHeight();
		layout.width = pixelPerSecond;
		layout.setMargins(leftMargin, 0, 0, 0);
		boundaryPoint.setColorFilter(Color.BLACK);
		boundaryPoint.setVisibility(VISIBLE);
		boundaryPoint.setLayoutParams(layout);
		boundaryPoint.setOnTouchListener(onTimelineTouchListener);
	} 
 
	public void resetTimeline() { 
		Iterator<Entry<Integer, TimelineTrackPosition>> it = trackPositions.entrySet().iterator();
 
		while (it.hasNext()) {
			HashMap.Entry<Integer, TimelineTrackPosition> pairs = it.next();
6
CodeRank
This code example shows how to use the following methods:setColorFilter
This code example shows how to use the following methods:setColorFilter
This code example shows how to use the following methods:setColorFilter
	public void setImageGrayscale(boolean greyscale) {
		this.greyscale = greyscale;
		if (greyscale) {
			ColorMatrix matrix = new ColorMatrix();
			matrix.setSaturation(0);
			imageView.setColorFilter(new ColorMatrixColorFilter(matrix));
		} else { 
			imageView.setColorFilter(null);
		} 
	} 
 
	public boolean isOpacity() { 
		return opacity;
	} 
 
	public boolean isGreyscale() { 
		return greyscale;
	} 
} 
5
CodeRank
This code example shows how to use the following methods:setColorFilter
	            other,main,other,0,0,
	            other,other,main,0,0,
	            0,0,0,1,0,0, 
	            0,0,0,0,1,0 
	            }); 
    	((ImageView)child).setColorFilter(new ColorMatrixColorFilter(matrix));
    	return super.drawChild(canvas, child, drawingTime);
    } 
 
    @Override 
    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY){
      return super.onFling(e1, e2, velocityX/2, velocityY/2);  
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:setColorFilter
		Calendar cal = Calendar.getInstance();
		return Long.toString(cal.getTimeInMillis() / 1000);
	} 
	 
	public static void darkenImage(ImageView v) {
		v.setColorFilter(0x55000000, PorterDuff.Mode.SRC_ATOP);
	} 
 
	public static void lightenImage(ImageView v) {
		v.setColorFilter(0x99FFFFFF, PorterDuff.Mode.SRC_ATOP);
	} 
	 
	public static boolean checkAuthorization(Context context) {
		SharedPreferences tokenInfo = context.getSharedPreferences(PREF_NAME, 0);
		String token = tokenInfo.getString("oauth_token", null);
		String tokenSecret = tokenInfo.getString("oauth_token_secret", null);
		String verifier = tokenInfo.getString("oauth_verifier", null);
		return (token != null && tokenSecret != null && verifier != null);
	} 
 
5
CodeRank
This code example shows how to use the following methods:setColorFilter
This code example shows how to use the following methods:setColorFilter
		updateDisplayName(); 
		deactivate(); 
	} 
 
	public void deactivate() { 
		mButton.setColorFilter(DEACTIVATED_BUTTON_COLOR);
		mText.setTextColor(DEACTIVATED_TEXT_COLOR);
		unPress(); 
	} 
 
	public void activate() { 
		mButton.clearColorFilter();
		mText.setTextColor(Color.WHITE);
	} 
 
	public ImageButton getButton() {
		return mButton;
	} 
 
	public boolean doubleClick() { 
4
CodeRank

Related ImageView setColorFilter Questions & Answers:

setColorFilter Method Overview
Set a tinting option for the image.
See Code Examples for other Android ImageView Methods: