I add a button on Android I want to put the image in the center and put a schedule padding.
<Button
android:background="@drawble/~"
/>
I did it like this and it was full. ㅜ<
<Button
android:drawableTop="@drawable/~"
/>
This goes up and...TT
I wish I could be in the center! Masters, please tell us!
android button image padding
If the parent layout is RelativeLayout
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:paddingStart="10dp"
android:src="@drawable/image"
android:background="@android:color/transparent" />
If the parent layout is LinearLayout or FrameLayout, then
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingStart="10dp"
android:src="@drawable/download"
android:background="@android:color/transparent" />
I think we can do it like this.
using and src imagebutton drawable want want the Set, padding scaletype and allocation of inserted into it.~
And if you care about the background, assign it to @null~
925 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
618 GDB gets version error when attempting to debug with the Presense SDK (IDE)
585 PHP ssh2_scp_send fails to send files as intended
624 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.