문제

I am developing an app that retrieves contact image from contact database and set it to EditText as drawableLeft along with contact name

I am able to retrieve name as well as contact image as bitmap, but not able to set it as drawableLeft

도움이 되었습니까?

해결책 2

Instead of setting bitmap on textview use ImageView

다른 팁

Try this code:

BitmapDrawable drawableLeft = new BitmapDrawable(getResources(), yourBitmap);
mYourEditText.setCompoundDrawablesWithIntrinsicBounds(drawableLeft, null, null, null);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top