0

I've been reading about Android graphic internals. Especially this "android graphics internals" post and the official Android graphics architecture page have given me an overview how it is working. I understand that there are Surfaces where the Apps are rendering into whether with Skia, OpenGL ES or something else.

Now I'm wondering where in this chain I'd have to put some extra code to rearrange the position of such objects rendered into such a Surface.

To make my question more clear hear a quick example:

If an android phone is attached to a monitor (via adapter) or the screen is shared (via chromecast or whatever), the display will contain unused space on the left and the right side because of the portrait mode. Where can I modify the rendering process so the tablet layout in landscape mode of the app is used to present the content?

Am I on the right way to tweak something somewhere in Skia or OpenGL ES or even somewhere down in SurfaceFlinger? It just seems to me like it would be the wrong way to modify some finished-for-display buffers.

I hoped that maybe I could keep it on a level where I can still see object properties like x, y, height and width. The final goal is to modify the appearance of i. e. the Navigation Drawer, so he will be always be visible and the rest of the content is scaled a bit smaller to make place. Achieving all this with altering buffers seams crazy to me.

I hope someone of you guys can point me in the right direction! I'd really appreciate it.

Community
  • 1
  • 1
dmorawetz
  • 497
  • 4
  • 12
  • Different layouts can handle this http://developer.android.com/guide/practices/screens_support.html However I think chrome-cast works a little differently when you share you screen. I would look into how chrome-cast screen sharing works if you need to adjust a view through the app. – Xjasz Jan 07 '16 at 19:29
  • Thanks for your comment, @Jasz. But I want to integrate this new feature into the operating system itself, so whenever a new screen is connected, the rendering switches to a better fitting layout for a desktop-screen. If you then also connect a bluetooth mouse and keyboard you can work with it more intuitively, like on a normal PC. When this works I want to make it optional on screen connect, but this shouldn't be part of my question. – dmorawetz Jan 07 '16 at 19:36

0 Answers0