您可以创建Dialog
基于Activity
.
Activity
为您的in设置主题AndroidManifest.xml
:
<android:name="YourActivity"
...
android:theme="@android:style/Theme.Dialog"/>
在YourActivity class
创建你的轮播Gallery
为 Activity 创建这样的布局:

这是示例布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.sits.TaxiMoldova"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/transparent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/backgroundCircleImage"
android:background="@drawable/bg"
android:layout_centerInParent="true"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"
android:id="@+id/contentLayout"
android:background="@android:color/transparent">
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="button 1"
android:id="@+id/button"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button 2"
android:id="@+id/button1"
android:layout_gravity="center"/>
</LinearLayout>
</RelativeLayout>
资源:
透明背景的圆圈
结果:

背景不是黑色,100%。而不是那个黑色背景将是您的活动(模态活动的父级)。这就是想法,玩弄比例,一切都会好起来的:)