Joj*_*ojo 1 android android-layout material-design
我试图在按钮上的文本之前显示一个普通的图标。我知道它应该如何工作,我也不知道为什么它不起作用。
我已经尝试过的事情:
这是我使用的代码:
<Button
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_check_black_24dp"
android:text="Button with Left Icon" />
Run Code Online (Sandbox Code Playgroud)
关于我可以尝试的方法或如何使带图标的按钮不同的任何提示?
小智 5
这样尝试
<com.google.android.material.button.MaterialButton
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TEXT"
style="@style/Widget.AppCompat.Button.Borderless"
app:icon="@drawable/ic_refresh_black_24dp"
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
106 次 |
| 最近记录: |