0

I currently have an app that looks like this, it's a terminal emulator: enter image description here

and if I press settings this appears on the screen:

enter image description here

However I would like to overlay some custom graphics on top, so that they are always there, some curves etc. Rough sketch:

enter image description here

So even when settings aren't visible this overlay would be shown on the terminal, at the top, around the edges etc. When I press settings I'd like them to come down and match the height of the graphics at the top like I have drawn, the bottom of the overlay matches the bottom of the settings. Is it possible to just have this overlay over everything? Or what is the best way to do this?

Paul
  • 5,756
  • 6
  • 48
  • 78

1 Answers1

1

Assuming then that you've created your layout using standard Android layouts and Views then my gut feeling is that trying to achieve the overlay is not possible (Using standard Views/Layouts is a trade off between ease-of-use and flexibility).

My own instinct tells me to take a look at using a SurfaceView to create ALL of your UI. This does means a lot of rework but you gain the flexibility I think you need to achieve your aim.

D-Dᴙum
  • 7,689
  • 8
  • 58
  • 97
  • Thanks, I will try to look into that. I just use linearlayouts and relativelayouts yes. Another way to do it would be to just have the image as a background like I have the blue background now, then set up some borders. This would take care of the bottom of the screen. For the top of the screen when settings is not shown i could have the curved graphic image shown, with the bit under the curve filled in black to match the terminal. Then when settings is pressed replace that top image with another image that looks similar but includes the settings buttons. that might be an alternative? – Paul Jan 31 '13 at 15:01
  • could I not create a view over another view with my image on it, with the centre of the image being transparent? – Paul Jan 31 '13 at 15:04
  • maybe like this? http://stackoverflow.com/questions/4901408/in-android-how-to-display-one-view-as-overlay-on-top-of-another-view – Paul Jan 31 '13 at 15:08
  • 1
    It might be possible to overlay a View with another View using relative or Absolute layout. You would have to work out how to get a window in the top View (to show what's beneath). All i can suggest is experiment and see how far you can push what's available to you in the Android API. – D-Dᴙum Jan 31 '13 at 15:09