Android - popover controller same as ipad [closed]

大城市里の小女人 提交于 2020-01-09 17:42:08

问题


Here is a popover controller of the ipad.

Any idea on how do we create the same kind of thing in Android? Actually i want to display html file or load webview with URL.


回答1:


You can use this 3D QuickAction

This is an open source project. You can get it here: http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/




回答2:


You can achieve this using a custom dialog (public class MenuDialog extends Dialog) that is semi-transparent (use alpha value in your bg color like #88000000). Set its content view to any XML layout you like, include a WebView if you want.

And in the constructor, you probably could put something like:

Window window = getWindow();
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
    WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

window.requestFeature(Window.FEATURE_NO_TITLE);
window.setGravity(Gravity.BOTTOM);

window.setBackgroundDrawable(  
    context.getResources().getDrawable(android.R.color.transparent) );


来源:https://stackoverflow.com/questions/5663912/android-popover-controller-same-as-ipad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!