Android Question Whatsapp camera tab fullscreen

josejad

Expert
Licensed User
Longtime User
Hi all:

Is possible to reproduce the way whatsapp shows the camera panel when you slide the camera tab?
I've been searching the forum, "hiding title bar", "inmersive mode", "full screen theme"... but reading this post of Erel, I think it's not possible.
I know I can initialize the camera to a panel in the tab, and it's similar, but whatsapp, when the tab is full showed, fills the screen.

I mean this "effect"

reside_tab_shot.png
 

JordiCP

Expert
Licensed User
Longtime User
Oops, I'm late!:)

A second approach with the camera in a tabstrip.
Just fusioned Erel's Tabstrip and CameraEx example, with minor modifications for a simple trick

  • The layout is not directly loaded to an activity, but to a container panel with the same size as the Activity, plus a vertical offset, equal to the Tabstrip header size.
  • Changed the Panel1 name of the CameraEx class to CameraPanel (also in the "1" layout) for clearness
  • Added an intermediate panel (PanelTrick) to the rest of already-made layouts, that extends the whole activity. Current container panel for each layout is now a child of PanelTrick, with bottom anchors = 50dip, the rest of them = 0
  • Some magic when we scroll the pages.

In fact whatsapp approach is different since what it does is to 'reveal' (not scroll) the camera panel, that is behind the scenes
 

Attachments

  • TabstripCamex.zip
    16.9 KB · Views: 336
Upvote 0

josejad

Expert
Licensed User
Longtime User
Great Jordi. Very ingenious.

Good avatar too :D
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Not the only one in this forum, neither the first to do it
And not the last btw. I´ve just changed mine too. I don´t want my Avatar getting ill as he is always present in the forums.... ? ?
 
Last edited:
Upvote 0

josejad

Expert
Licensed User
Longtime User
Hi again @JordiCP :

I'm afraid I forgot to say I have a title bar too... Is any kind of magic for this? :(

app.gif
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
Ops! As the first post was without a title bar, I thought that this was the case.
Is it an Activity TitleBar or a custom panel?
Let me check...
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Activity TitleBar
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
I have tried to hide and show the title with this, and it works, but an empty space appears at the bottom that can't be used in any way.

If you want to use a panel instead of a titleBar, it can be done more easily.?‍♂️
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Thanks for the effort JordiCP.
Don't worry, your first solution is fine.

Que sea leve el encierro, ya queda menos¡¡
 
Upvote 0
Top