76 lines
3.0 KiB
XML
76 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout
|
|
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">
|
|
|
|
<data />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@color/device_preview_background"
|
|
android:fitsSystemWindows="true"
|
|
android:orientation="vertical"
|
|
tools:locale="en">
|
|
|
|
<!-- 复用通用标题栏,通过可选参数设置本页标题和深色文字。 -->
|
|
|
|
<include
|
|
android:id="@+id/include_title"
|
|
layout="@layout/include_activity_top_title_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="48dp"
|
|
app:title="@{@string/device_preview_title}"
|
|
app:titleTextColor="@{@color/device_home_text}" />
|
|
|
|
<!-- 内容允许滚动,小屏幕和较大字体下仍能查看底部卡片。 -->
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:clipToPadding="false"
|
|
android:fillViewport="true"
|
|
android:scrollbars="none">
|
|
|
|
<!-- 按窗口宽度测量,大屏内容居中,手机保持占满宽度。 -->
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<com.ckkj.griddle.custom.view.AdaptiveContentLayout
|
|
android:layout_gravity="top|center_horizontal"
|
|
app:maxContentWidth="1100dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clipChildren="false"
|
|
android:clipToPadding="false"
|
|
android:orientation="vertical"
|
|
android:paddingHorizontal="25dp"
|
|
android:paddingTop="7dp"
|
|
android:paddingBottom="24dp">
|
|
|
|
<include
|
|
layout="@layout/device_preview_device_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<include
|
|
layout="@layout/device_preview_carbon_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp" />
|
|
|
|
<include
|
|
layout="@layout/device_preview_actions_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp" />
|
|
</com.ckkj.griddle.custom.view.AdaptiveContentLayout>
|
|
</FrameLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
</LinearLayout>
|
|
</layout>
|