現在、詳細ビューページで忙しいです。私は今、私が設計したもののようなカードビューをどのように見せることができるのだろうと思っていました。私はそうする方法をGoogle上で見つけることができない。私はカードをマルチカラーにしたい:トップの25%は白で、残りの75プロットは赤でなければならない。どうすればいいですか?私はdrawablesについて考えていましたが、私はそれが別の携帯電話で醜いと思うと思います。複数の背景色を持つCardview
私はそれが次のようになりたい:
私はこのcardviewを持っている:
<android.support.v7.widget.CardView
android:id="@+id/view4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/material_grey_50"
android:orientation="vertical">
<TextView
style="@style/TextViewAppearance.Body3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:text="Descriptie"
android:textColor="?attr/colorPrimaryDark" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:background="@color/material_grey_200" />
<TextView
android:id="@+id/descriptionText"
style="@style/TextViewAppearance.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:textColor="@color/material_grey_600" />
</LinearLayout>
</android.support.v7.widget.CardView>