TextView setCompoundDrawables - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:setBounds, setCompoundDrawables
                d = new BitmapDrawable(mResources, bitmap);
            } else { 
                d = mDefault;
            } 
 
            d.setBounds(0, 0, mPhotoSize, mPhotoSize);
            ((TextView) view).setCompoundDrawables(d, null, null, null);
 
            // Remember the photo associated with this contact 
            mCache.put(id, d);
        } else { 
            ((TextView) view).setCompoundDrawables(d, null, null, null);
        } 
 
        return true; 
    } 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getCompoundDrawables, setCompoundDrawables, setText
		super.onPageFinished(view, url);
	} 
 
	@Override 
	public void onPageStarted(WebView view, String url, Bitmap favicon) {
		mUrl.setText(url);
		mProgressBar.setProgress(0);
		 
		mUrl.setCompoundDrawables(mUrl.getCompoundDrawables()[0], null, mCircularProgress, null);
		((AnimationDrawable) mCircularProgress).start();
		 
		//mProgressBar.setVisibility(View.VISIBLE);		 
		super.onPageStarted(view, url, favicon);
	} 
 
	@Override 
	public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {		
		super.onReceivedSslError(view, handler, error);
		 
		StringBuilder sb = new StringBuilder();
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setCompoundDrawables
			DisplayMetrics dm = new DisplayMetrics();
			getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
			mPic = Drawable.createFromPath(mPicPath);
			int sideLength = (int) (dm.widthPixels * 0.2);
			mPic.setBounds(0, 0, sideLength, sideLength);
			mEtDescription.setCompoundDrawables(mPic, null, null, null);
			getActivity().invalidateOptionsMenu();
		} else { 
			mEtDescription.setCompoundDrawables(null, null, null, null);
			mPic = null;
		} 
	} 
 
	protected void capturePhoto() { 
		Uri uri = Intents.getOutputMediaFileUri(Intents.MEDIA_TYPE_IMAGE);
		mPicPath = uri.getPath();
		startActivityForResult(Intents.CAPTURE_PHOTO_INTENT.putExtra(
				MediaStore.EXTRA_OUTPUT, uri), Intents.RESULT_CAPTURE_IMAGE);
 
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related TextView setCompoundDrawables Questions & Answers:

setCompoundDrawables Method Overview
Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text.
See Code Examples for other Android TextView Methods: