Привет, у меня есть форма, и я пытаюсь включить ее в свой макет, но она не отображается?
Это моя форма.
И это мое, я думал, мне нужно включить Shape в макет.
<?xml version="1.0" encoding="utf-8"?>
<View android:id="@+id/damage" android:background="@layout/damage"
android:layout_width="5dip" android:layout_height="wrap_content">
</View>
<ImageView android:id="@+id/icon" android:layout_width="60px"
android:layout_height="60px" android:layout_marginRight="6dip"
android:src="@drawable/placeholder" />
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:padding="6dip">
<TextView android:layout_width="fill_parent" android:id="@+id/title"
android:layout_height="wrap_content" android:text="Item Name"
android:textStyle="bold" android:singleLine="true" android:textSize="16sp" />
<ImageView android:id="@+id/rating" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/rating_five" />
<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:layout_width="wrap_content" android:id="@+id/range"
android:layout_height="wrap_content" android:text="Range"
android:textStyle="bold" android:singleLine="true" android:textSize="16sp"
android:paddingRight="5dip" />
<TextView android:layout_width="fill_parent" android:id="@+id/condition"
android:layout_height="wrap_content" android:text="Condition"
android:textStyle="bold" android:singleLine="true" android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
Однако ничего не нарисовано?Куда я иду не так.Во-вторых, правильно ли устанавливать ширину и высоту фигуры в представлении, или я должен делать это в файлеmage.xml?Например,
<shape xmlns:android="http://schemas.android.com/apk/res/android"
shape="rectangle">
<solid color="#ff0000" />
<size android:height="wrap_content" />
<size android:width="5dip" />
<stroke width="3dp" color="#ff0000" />
Здесь компилятор жалуется на wrap_content.
Любая помощь будет принята с благодарностью.