Android - Windowmanager

Asked

Viewed 77 times

0

inserir a descrição da imagem aqui

See the layout above with a default home screen of a mobile phone. See that I highlighted the default screen of the phone with a text (Shadow Effect) and two notifications android (view1 and view2).

I wanted to implement this in a normal Relativelayout, with the aspects: shadow, and two views in the style of this printscreen.

Is it possible using Windowmanager? Or Windowmanager is not suitable for this case?

If it doesn’t fit, what can I use?

  • You don’t necessarily need to interact with WindowManager. My question is if you want the background of the application/Activity to be transparent (or with background in alpha) or have this effect of "modal" (would be your Shadow Effect? ) with any background? Shadows you can emulate with a Drawable or using the property Elevation (Android 5).

  • Hi, Wakim. So that’s exactly what I want. It’s just that I saw an API that used this and I thought I could do something similar. In my case, I would have 3 layouts. Layout 1: Main screen; Layout 2: After the main screen is loaded, the layout 2 will be shown as if it was just a shadow effect for the layout 3. It’s like I "adjust" the brightness of the screen (layout1) to something darker (with layout2) and then show layout 3 with a "Focus" effect and "full brightness". I hope you understand, hugs!

  • So you don’t really need to apply leftovers to both views. I think you can do it in two ways: Popupwindow (with transparent background and two Views) or using an Activity with transparent background. Take a look at these three questions that may help: http://stackoverflow.com/questions/3221488/blur-or-dim-background-when-android-popupwindow-active and http://stackoverflow.com/questions/17542517/activity-with-transparent-groundbackground and http://stackoverflow.com/questions/13406060/android-how-to-Blur-Glass-Frost-Current-Activity

  • Got it! Thanks a lot for the answers. Hug!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.