xml 卡片视图
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 卡片视图相关的知识,希望对你有一定的参考价值。
<android.support.v7.widget.CardView
android:id="@+id/backdrop"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/transparent"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toBottomOf="parent">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_home">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:contentDescription="@string/backdrop"
android:scaleType="fitXY"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="3.5:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/bg_home"/>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/fund_outline"
android:layout_width="36dp"
android:layout_height="40dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
android:contentDescription="@string/backdrop"
android:src="@drawable/icon_arrow"
app:layout_constraintBottom_toBottomOf="@+id/main_amount"
app:layout_constraintEnd_toEndOf="@+id/image"
app:layout_constraintTop_toTopOf="@+id/main_amount"/>
<TextView
android:id="@+id/main_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="16dp"
android:text="@string/pay_staff"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/textView25"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="32dp"
android:text="@string/pay_domestic_staff"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/fund_outline"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/main_amount"
app:layout_constraintTop_toBottomOf="@+id/main_amount"
app:layout_constraintVertical_bias="0.0"/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
以上是关于xml 卡片视图的主要内容,如果未能解决你的问题,请参考以下文章