在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):roiacult/BackdropLayout开源软件地址(OpenSource Url):https://github.com/roiacult/BackdropLayout开源编程语言(OpenSource Language):Kotlin 90.1%开源软件介绍(OpenSource Introduction):BackdropLayouthttps://material.io/design/components/backdrop.html)this library is based on Material design guidance (Requirements
Setting upAdd it in your root build.gradle at the end of repositories: allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
} Add the dependency in your app build.gradle file dependencies {
...
implementation 'com.github.roiacult:BackdropLayout:VERSION'
} Note : replace VERSION with latest version from jitpack Usageyou need to include front and back layout inside backdropLayout and specifie front_layout and back_layout attribute or it will throw an exception <com.roacult.backdrop.BackdropLayout
android:id="@+id/container"
app:front_layout="@id/includedFront"
app:back_layout="@id/includedBack"
app:toolbarId="@id/toolbar"
app:peekHeight="56dp"
app:disable_when_open="true"
app:menuDrawable="@drawable/ic_menu"
app:closeDrawable="@drawable/ic_close"
app:animationDuration="400"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/includedBack"
layout="@layout/back_layout"/>
<include
android:id="@+id/includedFront"
layout="@layout/front_layout"/>
</com.roacult.backdrop.BackdropLayout>
// you can add listener
backdropLayout.setOnBackdropChangeStateListener{
when(it){
BackdropLayout.State.OPEN -> {
//TODO
}
BackdropLayout.State.CLOSE -> {
//TODO
}
}
}
// you can access front and back layout
backdropLayout.getFrontLayout()
backdropLayout.getBackLayout()
for more information see simple app included in this repo (https://github.com/roiacult/BackdropLayout/tree/master/app) contact |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论