How to implement 'pop up box' in Android s

2019-04-14 02:31发布

I work as a junior Android developer and the client has requested the following:

"Make research about implementation of pop up box, while application is in background. Thea idea is always when there is notification to show in notification panel, also to be shown in pop up box." (Viber was taken as an example of this)

I know how to work with activities and fragments and views in Android, but I don't know how to even google about this so I thought someone could point out a tutorial or just say if there is a word for this technique so I can study it. When a new message is received (Broadcast Receivers) the 'pop up box' is shown on top of the Android system. My question would be what is the pattern and what are the key pointss in implementing this feature. Thank you in advance

The pop up box should appear same as viber new message box.

2条回答
可以哭但决不认输i
2楼-- · 2019-04-14 03:04

Broadly speaking, possible way is to implement pop-up as an activity with transparent background. Here is the starting point: How do I create a transparent Activity on Android?

查看更多
做个烂人
3楼-- · 2019-04-14 03:21

It is so simple.

You just create Activity extends Dialog type.

So your activity type should show as image in above - the activity dialog.

查看更多
登录 后发表回答