Android Image Dialog/Popup

后端 未结 7 773
臣服心动
臣服心动 2020-12-12 14:08

Is it possible to have just an image popup/come-up in an Android application? It\'s similar to an overriding the normal view of an AlertDialog so that it contains just an im

7条回答
  •  执念已碎
    2020-12-12 14:36

    There is a couple ways you can do this. But, if you're looking to have your image appear to be floating above your existing activity, you may want to use an activity with android:theme="@style/Theme.Transparent" defined in the manifest. Then, design your layout to just have a single ImageView positioned in the center of the screen. The user will have to push the back button to get out of this, but it sounds like that's what you want.

    If you want it to look like an actual dialog, you can always use a dialog styled activity as well using Theme.Dialog. OR, you could just use a dialog and customize it.

提交回复
热议问题