拥有可移动头像的折叠Android工具栏:CollapsingAvatarToolbar

yexb 9年前

这个小库演示了如何将可折叠工具栏添加到您的应用程序中,并带有可移动和扩展的头像,类似于在Telegram Android应用中所看到的。

Demo

Check out the sample project included.

sample

Gradle

dependencies {      compile 'com.sloydev:collapsingavatartoolbar:1.1.0'        // Requires you to provide these dependencies yourself      compile 'com.android.support:appcompat-v7:23.0.0'      compile 'com.android.support:design:23.0.0'  }

Usage

Addcom.sloydev.collapsingavatartoolbar.CollapsingAvatarToolbarto your layout:

<com.sloydev.collapsingavatartoolbar.CollapsingAvatarToolbar    android:layout_width="wrap_content"    android:layout_height="?attr/actionBarSize"    app:collapsedPadding="@dimen/collapsedPadding"    app:expandedPadding="@dimen/expandedPadding"    app:collapsedImageSize="@dimen/collapsedImageSize"    app:expandedImageSize="@dimen/expandedImageSize"    app:collapsedTextSize="@dimen/collapsedTextSize"    app:expandedTextSize="@dimen/expandedTextSize"    >

项目主页:http://www.open-open.com/lib/view/home/1441154114003