Java Question Center image in edittext

Blue.Sky

Active Member
Licensed User
Longtime User
Hi
I make library that insert image in edittext with below post java source
https://www.b4x.com/android/forum/threads/how-to-insert-image-to-edittext.52780/#content
I can insert image in edittext very good
But my image is not center in edittext
I can change Left,Top,Right,Bottom with java code :
B4X:
 BitmapDrawable drawable = new BitmapDrawable(BA.applicationContext.getResources(), Bitmap);
drawable.setBounds(Left,Top,Right,bottom);
But it isn't center
how do i use setbounds method for center picture ?
below picture
Thanks
 

Blue.Sky

Active Member
Licensed User
Longtime User
@Erel My question is about android.
I convert java code to library and cannot center image in edittext.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…