在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):truizlop/FABRevealLayout开源软件地址(OpenSource Url):https://github.com/truizlop/FABRevealLayout开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):FABRevealLayoutA layout to transition between two views using a Floating Action Button as shown in many Material Design concepts Usage
<com.truizlop.fabreveallayout.FABRevealLayout
android:id="@+id/fab_reveal_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/fab_reveal_height"
>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@color/some_color"
android:src="@drawable/some_drawable"
/>
<RelativeLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
...
</RelativeLayout>
<RelativeLayout
android:id="@+id/secondary_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
...
</RelativeLayout>
</com.truizlop.fabreveallayout.FABRevealLayout> Please note that the secondary view should have a transparent background so that the color animation works correctly. Further animationIf you want to animate the items inside the views of a private void configureFABReveal(FABRevealLayout fabRevealLayout) {
fabRevealLayout.setOnRevealChangeListener(new OnRevealChangeListener() {
@Override
public void onMainViewAppeared(FABRevealLayout fabRevealLayout, View mainView) {}
@Override
public void onSecondaryViewAppeared(final FABRevealLayout fabRevealLayout, View secondaryView) {}
});
} Also, to trigger the reveal and hide animations programmatically, you can use the following methods: fabRevealLayout.revealMainView();
fabRevealLayout.revealSecondaryView(); LimitationsCurrently, both main and secondary views inside Get it!
dependencies{
implementation 'com.truizlop.fabreveallayout:library:1.0.0'
} Acknowledgements
License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论