Instead of setting bitmap on textview use ImageView
Set bitmap as drawableLeft to EditText
-
19-07-2023 - |
Pergunta
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
Solução 2
Outras dicas
Try this code:
BitmapDrawable drawableLeft = new BitmapDrawable(getResources(), yourBitmap);
mYourEditText.setCompoundDrawablesWithIntrinsicBounds(drawableLeft, null, null, null);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow