在很多项目中我们可能会遇到这种效果。现在很多的应用效果都需要做的炫些,比如天天静听效果很炫的,源码已经对外开放了,有兴趣的可以去研究下;
直接上代码:
1.布局文件:
popwindow.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="@android:color/transparent">
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:dividerHeight="@dimen/divider_width_max"
android:paddingTop="@dimen/padding_20"
android:paddingLeft="@dimen/padding_10"
android:paddingRight="@dimen/padding_10"
android:divider="@color/color_diver"
android:paddingBottom="@dimen/padding_10"