当前位置: 动力学知识库 > 问答 > 编程问答 >

Bring view to focus like dialog Android

问题描述:

I want to bring a view to focus just like an AlertDialog. How can I do this ?

P.S: My view is fairly complex and hence, I'm using a FrameLayout as suggested in Android Docs.

网友答案:

Whenever I've show complex View in Dialog, I prefer to put whole view in XML and then Make a new Activity and set the content view of Activity to that XML and then start activity as Dialog by this

<activity android:theme="@android:style/Theme.Dialog" />

Have a look at the post

Android Activity as a dialog

it is fairly easy and simple and straight forward, Hope this helps!

分享给朋友:
您可能感兴趣的文章:
随机阅读: