material design设计风格

简单点:直接上代码了 运用了许多新的控件
2中不同的风格

第一种:状态栏实现滚动

<?xml version="1.0" encoding="utf-8"?>
<!--设置滑动页面-->
<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawable_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<!--主界面-->
    <!--设置 NestedScrollView在toolBar下方-->
    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        <android.support.v7.widget.Toolbar
            app:layout_scrollFlags="scroll|enterAlways|snap"
            android:id="@+id/toobar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
        </android.support.design.widget.AppBarLayout>
        <!--NestedScrollView配合toolBar滑动  scrollView不能相应滑动-->
        <android.support.v4.widget.NestedScrollView
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <TextView
                android:textSize="20sp"
                android:text="2018年1月20日的万达年会上,王健林就提出对万达进行组织架构调整,拟将原先的商业地产更名为商管集团,成为一个纯粹的商业物业持有和运营管理商。近日,万达官网显示旗下四大业务集团,已由此前的商业、文化、金融和网科,变更为现在的商管、文化、地产和金融。万达网科的命运节点似乎已经到来。

据王寡妇独家获悉,高朋科技正在腾讯的支持下接盘万达网科,收购谈判已近尾声,收购消息或最晚于5月公布。腾讯、京东、万达和由他们投资的“互联网+财税”选手高朋、大象慧云和万达网科交织在了一起,并且采用了三方最终交由腾讯系的高朋科技来操盘的方式。

时间回到2018年2月2日,并未获得主流财经媒体聚焦的另一条新闻,却极可能为今日万达网科的归宿埋下了伏笔。那就是一家名为海南高朋科技有限公司的企业收购了一家名为大象慧云的企业。而高朋科技和大象慧云的主营业务,都是以“电子发票”为切入口的大“互联网+财税”行业。

海南高朋科技并非一个大众耳熟能详的科技公司名号,其最初为腾讯和美国团购网站鼻祖Groupon合资成立的团购公司。团购大战后转型运营拥有微信二级入口的微影(后和猫眼合并),高朋的投资和运营动作一直和大腾讯系生态资源密不可分。

如今的高朋,又成为腾讯面向电子发票行业的尖刀,其在天使轮获得了腾讯产业共赢基金的投资,又获得了鼎辉创投、高瓴资本、IDG资本和万达商业的大额A轮融资。目前腾讯持有其21.07%的股份,为第一大股东。

在2018年2月2日高朋科技收购大象慧云信息技术有限公司时,海南省省长沈晓明和腾讯董事局主席马化腾都有出席见证,可见海南省政府和腾讯官方对高朋科技的重视程度。而当天被收购的大象慧云具有京东投资背景,亦是京东电子发票的供应商。"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>
        </android.support.v4.widget.NestedScrollView>
        <!--悬浮点击按钮-->
        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_gravity="bottom|end"
            android:layout_margin="16dp"
            android:src="@drawable/del"
            android:elevation="8dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </android.support.design.widget.CoordinatorLayout>
<!--侧滑节目-->
    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_gravity= "start"
        <!--具体详情布局-->
        app:menu="@menu/nav_menu"
        <!--头部布局-->
        app:headerLayout="@layout/nav_header"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
</android.support.v4.widget.DrawerLayout>

第二种:实现状态栏收缩效果,图爿的收缩

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">
    <!--AppBarLayout 只能作为CoordinatorLayout的子布局来使用-->
    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:fitsSystemWindows="true">
        <!--CollapsingToolbarLayout 作用于toolbar之上的布局,不能独立存在,被限定
        只能作为AppBarLayout的直接子布局来使用-->
        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolabar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:id="@+id/fruit_image_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true"
                android:scaleType="centerCrop"
                app:layout_collapseMode="parallax"/>

            <android.support.v7.widget.Toolbar
                android:id="@+id/toobar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin"/>
        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <TextView
            android:id="@+id/fruit_content_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="2018年1月20日的万达年会上,王健林就提出对万达进行组织架构调整,拟将原先的商业地产更名为商管集团,成为一个纯粹的商业物业持有和运营管理商。近日,万达官网显示旗下四大业务集团,已由此前的商业、文化、金融和网科,变更为现在的商管、文化、地产和金融。万达网科的命运节点似乎已经到来。

据王寡妇独家获悉,高朋科技正在腾讯的支持下接盘万达网科,收购谈判已近尾声,收购消息或最晚于5月公布。腾讯、京东、万达和由他们投资的“互联网+财税”选手高朋、大象慧云和万达网科交织在了一起,并且采用了三方最终交由腾讯系的高朋科技来操盘的方式。

时间回到2018年2月2日,并未获得主流财经媒体聚焦的另一条新闻,却极可能为今日万达网科的归宿埋下了伏笔。那就是一家名为海南高朋科技有限公司的企业收购了一家名为大象慧云的企业。而高朋科技和大象慧云的主营业务,都是以“电子发票”为切入口的大“互联网+财税”行业。

海南高朋科技并非一个大众耳熟能详的科技公司名号,其最初为腾讯和美国团购网站鼻祖Groupon合资成立的团购公司。团购大战后转型运营拥有微信二级入口的微影(后和猫眼合并),高朋的投资和运营动作一直和大腾讯系生态资源密不可分。

如今的高朋,又成为腾讯面向电子发票行业的尖刀,其在天使轮获得了腾讯产业共赢基金的投资,又获得了鼎辉创投、高瓴资本、IDG资本和万达商业的大额A轮融资。目前腾讯持有其21.07%的股份,为第一大股东。

在2018年2月2日高朋科技收购大象慧云信息技术有限公司时,海南省省长沈晓明和腾讯董事局主席马化腾都有出席见证,可见海南省政府和腾讯官方对高朋科技的重视程度。而当天被收购的大象慧云具有京东投资背景,亦是京东电子发票的供应商。"
            android:textSize="20sp"/>
    </android.support.v4.widget.NestedScrollView>

    <android.support.design.widget.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:src="@drawable/more"
        app:layout_anchor="@id/app_bar"
        app:layout_anchorGravity="bottom|end"/>
</android.support.design.widget.CoordinatorLayout>

以上:就是简单的效果

猜你喜欢

转载自blog.csdn.net/willba/article/details/79835174