二次修改
This commit is contained in:
@@ -249,20 +249,114 @@
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Two columns. Item margins leave 12dp between cards and room for their shadows. -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_devices"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="23dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_weight="1"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="12dp"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="4"
|
||||
tools:listitem="@layout/device_index_item" />
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- Two columns. Item margins leave room for card shadows. -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="12dp"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="4"
|
||||
tools:listitem="@layout/device_index_item" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/sv_empty_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="none">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_empty_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="239dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="34dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:cardBackgroundColor="#FFF3EA"
|
||||
app:cardCornerRadius="32dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_devices"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_empty_devices"
|
||||
style="@style/DeviceHomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="21dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/device_home_empty_message"
|
||||
android:textColor="#1F2329"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/btn_empty_add_device"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="38dp"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/device_home_add_device"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
app:cardBackgroundColor="@color/device_home_orange"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<TextView
|
||||
style="@style/DeviceHomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/device_home_add_device"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user