首页部分样式
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
<solid android:color="#40FFFFFF" />
|
||||
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
@@ -19,11 +19,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg_home_top"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_FAFAFA"
|
||||
android:visibility="visible">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
@@ -32,107 +38,137 @@
|
||||
android:background="@null"
|
||||
app:elevation="0dp">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll">
|
||||
app:contentScrim="#FF6956F0"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:minHeight="60dp"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_scrollFlags="scroll">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:minHeight="60dp"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_white_20dp_round"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:onClick="@{click}"
|
||||
android:text="@string/search_hint"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/color_B3B3B3"
|
||||
android:paddingStart="@dimen/dp_11"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawablePadding="@dimen/dp_7"
|
||||
android:drawableStart="@mipmap/ic_home_search" />
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_to_sign_in"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_to_sign_in" />
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/roll_view" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_room"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:onClick="@{click}"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="@{open_visible ? View.VISIBLE : View.GONE}"
|
||||
android:src="@mipmap/ic_open_room" />
|
||||
</LinearLayout>
|
||||
<android.support.constraint.Group
|
||||
android:id="@+id/home_banner_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="roll_view" />
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
/>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/roll_view" />
|
||||
app:contentInsetStart="0dp"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
<android.support.constraint.Group
|
||||
android:id="@+id/home_banner_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="roll_view" />
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_white_20dp_round"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:onClick="@{click}"
|
||||
android:text="@string/search_hint"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/white"
|
||||
android:paddingStart="@dimen/dp_11"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawablePadding="@dimen/dp_7"
|
||||
android:drawableStart="@mipmap/ic_home_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_to_sign_in"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_to_sign_in" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_room"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:onClick="@{click}"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="@{open_visible ? View.VISIBLE : View.GONE}"
|
||||
android:src="@mipmap/ic_open_room" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingRight="14dp" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_empty"
|
||||
android:onClick="@{click}"
|
||||
@@ -162,11 +198,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
|
BIN
app/src/main/res/mipmap-xhdpi/bg_home_top.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/bg_home_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
Binary file not shown.
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 908 B |
@@ -322,7 +322,10 @@
|
||||
<color name="color_FF1E1E">#FF1E1E</color>
|
||||
<color name="color_FFD888">#FFD888</color>
|
||||
<color name="color_2E3047">#2E3047</color>
|
||||
<!-- 30透明度-->
|
||||
<color name="color_30_FFFFFF">#B3FFFFFF</color>
|
||||
<!-- 75透明度-->
|
||||
<color name="color_75_FFFFFF">#40FFFFFF</color>
|
||||
<color name="color_ff5454">#ff5454</color>
|
||||
<color name="color_ff0000">#ff0000</color>
|
||||
<color name="color_fac41e">#fac41e</color>
|
||||
|
Reference in New Issue
Block a user