首先看效果图
当然了这个高度和宽度是可控的。想详细修改的话去代码里面修改吧.
使用方法
BouncingMenu.makeMenu(findViewById(R.id.rl), R.layout.layout_rv_sweet, adapter).show();
是的,你没看错,就是这么简单。
只需要传入view,布局id,以及adapter(这里使用的是recycleview.Adapter)。想修改其他的话直接去修改代码吧。
具体实现
首先是activity的布局,很简单,就是放了各种ImageView,然后上面放了个searchView。
这里就不写详细布局了
弹出视图
这里把视图分成2部分了。
RecycleView部分。使用的是LayoutAnimation。从下往上
布局:
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent" android:orientation="vertical"> <RelativeLayout android:id="@+id/freeGrowUpParent" android:layout_width="match_parent" android:layout_height="@dimen/sheet_height" android:layout_gravity="bottom" android:background="@android:color/transparent"> <!--自定义控件,就是那个波动view--> <com.xie.designpatterns.widget.BouncingView android:id="@+id/sv" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" /> <android.support.v7.widget.RecyclerView android:id="@+id/rv" android:layout_width="match_parent" an