Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何显示如下图所示的弹出对话框?_Android - Fatal编程技术网

Android 如何显示如下图所示的弹出对话框?

Android 如何显示如下图所示的弹出对话框?,android,Android,我想做一个弹出按钮,像赛车游戏分享按钮。 如图所示,按下此按钮时显示三项。 实际上这个按钮是这样的。但按下后,你会看到上面的图片上显示的东西。 如果有人知道这个答案,请帮助我。 我搜索了很多,但什么也找不到。使用以下库,您将得到您想要的,如图所示 图书馆 Android浮动操作按钮->也检查示例应用程序 您还可以使用创建自定义下拉式弹出窗口: PopupWindow popupWindow = new PopupWindow(customLayout, width, height, true);

我想做一个弹出按钮,像赛车游戏分享按钮。 如图所示,按下此按钮时显示三项。 实际上这个按钮是这样的。但按下后,你会看到上面的图片上显示的东西。 如果有人知道这个答案,请帮助我。
我搜索了很多,但什么也找不到。

使用以下库,您将得到您想要的,如图所示

图书馆

Android浮动操作按钮->也检查示例应用程序

您还可以使用创建自定义下拉式弹出窗口:

PopupWindow popupWindow = new PopupWindow(customLayout, width, height, true);// Create a custom layout with icons
popupWindow.setBackgroundDrawable(new ColorDrawable());
popupWindow.setOutsideTouchable(true);
popupWindow.setFocusable(true);
popupWindow.showAsDropDown(buttonMenu);// Define on your UI a button which will trigger your custom popup