<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.cardview.widget.CardView android:id="@+id/homeModuleIntelligentTopViewImageCardView" android:layout_width="match_parent" android:layout_height="match_parent" app:cardCornerRadius="@dimen/platform_dp_7" app:cardElevation="0dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/homeModuleIntelligentTopViewImage" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/home_image_default_back" android:scaleType="centerCrop"/> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <View android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="45"/> <View android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="55" android:background="@drawable/home_intelligent_gradient_back"/> </LinearLayout> </RelativeLayout> </androidx.cardview.widget.CardView> <TextView android:id="@+id/homeModuleIntelligentTopViewTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" android:layout_marginLeft="@dimen/platform_dp_14" android:layout_marginRight="@dimen/platform_dp_115" android:layout_marginBottom="67dp" android:ellipsize="end" android:maxLines="1" android:textColor="@color/platform_color_FFFFFF" android:textSize="@dimen/platform_dp_24" android:textStyle="bold" tools:text="先结婚还是先买先结婚还是先买房" /> <LinearLayout android:id="@+id/homeModuleIntelligentTopViewDescLayout" android:layout_width="wrap_content" android:layout_height="@dimen/platform_dp_18" android:layout_alignLeft="@+id/homeModuleIntelligentTopViewTitle" android:layout_alignParentBottom="true" android:layout_marginBottom="43dp" android:background="@drawable/home_test_top_view_layout_back" android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/platform_dp_10" android:paddingRight="@dimen/platform_dp_10"> <TextView android:id="@+id/homeModuleIntelligentTopViewHits" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/platform_color_444444" android:textSize="@dimen/platform_dp_12" android:textStyle="bold" tools:text="2486" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="已测" android:textColor="@color/platform_color_666666" android:textSize="@dimen/platform_dp_12" /> </LinearLayout> <RelativeLayout android:layout_width="@dimen/platform_dp_64" android:layout_height="@dimen/platform_dp_20" android:layout_alignParentRight="true" android:background="@drawable/home_intelligent_top_view_recommend_back"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="每日一测" android:textColor="@color/platform_but_text_color_specific" android:textSize="@dimen/platform_dp_12" android:textStyle="bold"/> </RelativeLayout> </RelativeLayout>