在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):henrytao-me/smooth-app-bar-layout开源软件地址(OpenSource Url):https://github.com/henrytao-me/smooth-app-bar-layout开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):smooth-app-bar-layout [Deprecated] ================ [DEPRECATED] The issue that is addressed in this library is fixed from support design 26.0.0 or above (finally). Please use support design instead.This is a smooth version of If you find that it still doesn't meet your need, don't hesitate to send me a request. I love to work with you to solve problems. Send a request HERE Installationcompile "me.henrytao:smooth-app-bar-layout:<latest-support-design-version>.<latest-smooth-app-bar-layout-fix>" Example: if the latest support design version is
Tested environments
DemoPlease note that the app on the Play store is not always the latest version. ConceptsFeatures
Checkout these demo videos:
Important Notes
UsageSuper easy! Just need to do 3 steps:
Original AppBarLayout from Google Support Design<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.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_toolbar_arrow_back"
style="@style/AppStyle.MdToolbar" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout> SmoothAppBarLayout<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.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<me.henrytao.smoothappbarlayout.SmoothAppBarLayout
android:id="@+id/smooth_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_toolbar_arrow_back"
style="@style/AppStyle.MdToolbar" />
</android.support.design.widget.CollapsingToolbarLayout>
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout>
</android.support.design.widget.CoordinatorLayout> SmoothCollapsingToolbarLayout example<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.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<me.henrytao.smoothappbarlayout.SmoothAppBarLayout
android:id="@+id/smooth_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_toolbar_arrow_back"
style="@style/AppStyle.MdToolbar" />
<me.henrytao.smoothappbarlayout.SmoothCollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:minHeight="?attr/actionBarSize"
app:sctl_avatar_id="@+id/avatar"
app:sctl_collapsed_avatarSize="?attr/mdIcon_sm"
app:sctl_collapsed_offsetX="?attr/actionBarSize"
app:sctl_collapsed_offsetY="0dp"
app:sctl_collapsed_subtitleTextSize="14dp"
app:sctl_collapsed_titleTextSize="16dp"
app:sctl_expanded_avatarSize="?attr/mdIcon_lg"
app:sctl_expanded_offsetX="?attr/mdLayout_spacing_md"
app:sctl_expanded_offsetY="?attr/mdLayout_spacing_md"
app:sctl_expanded_subtitleTextSize="16dp"
app:sctl_expanded_titleTextSize="34dp"
app:sctl_subtitle_id="@+id/subtitle"
app:sctl_title_id="@+id/title">
<ImageView
android:id="@+id/avatar"
android:layout_width="?attr/mdIcon_sm"
android:layout_height="?attr/mdIcon_sm"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_blank_circle" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="?attr/mdLayout_spacing_md"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:text="Title"
style="@style/MdText.Title" />
<TextView
android:id="@+id/subtitle"
android:text="Subtitle"
style="@style/MdText.Body1" />
</LinearLayout>
</me.henrytao.smoothappbarlayout.SmoothCollapsingToolbarLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout>
</android.support.design.widget.CoordinatorLayout> ContributingAny contributions are welcome! DonationLet's buy me some coffee |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论