是否可以为我们添加的图像设置边距或填充android:drawableLeft?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/file_icon"
style="@style/fileChooserIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc" />
<TextView
android:id="@+id/file_name"
style="@style/fileChooserName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
Run Code Online (Sandbox Code Playgroud)
错误:This tag and its children can be replaced by one <TextView/> and a compound drawable
我是Android新手,并不完全了解什么是错误.某种解决方案令人伤心,使其复合但却没有得到它.