I RecyclerViewの項目を表し、リソースファイル内の次のXMLコードを、持っている:android.support.v7.cardview:cardBackgroundColorが動作しない
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android.support.v7.cardview="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android.support.v7.cardview:cardBackgroundColor="#9e9e9e"
android.support.v7.cardview:cardElevation="7dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="vertical">
<ImageView
android:id="@+id/type"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="end" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/field_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="2dp"
android:textColor="#000000"
android:textSize="20sp"
android:typeface="monospace" />
<LinearLayout
android:layout_width="15dp"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/main_recyclerview_item_actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:visibility="gone">
<Button
android:id="@+id/delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/delete"
android:textColor="@color/colorAccent"
style="@style/Widget.AppCompat.Button.Borderless"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
問題はCardViewは決してないということです以下の画像のように9e9e9e: 色は白コードに問題がある
9e9e9eされていない色を取得しますか?そして、私はこの問題をどうやって解決できますか?
card_view:cardBackgroundColor = "#9e9e9e" withroid.support.v7なしで試しましたか? –
非常に良い。私はそれを変更し、カードは色を持っています。ありがとうございました。 –
私はあなたがもちろん欲しいなら、私が助けてくれれば答えることができます:) –