View pager 2 render issue with full screen mode android . When I scroll in full screen mode the UI cuts and when its not in full screen with gesture mode off its work fine. I am using view pager 2 with media view and recyclyer view adapter issue image and orignal one and orignal one
any one know the solution
tried adding full sreen mode to application but it now make it worst
Related
I am using webview to show number of HTML pages with the help of view pager.
In portrait mode I use to show one web view and in landscape mode two web views.
When I rotate device from portrait to landscape the view is updated but page content size is portrait one (i.e-page size is big like in portrait mode) for the first webview again when I rotate device from landscape to portrait view is updated but page content size is small as in landscape mode but when I move to other pages the page size is wrap content to the web view.
I have a viewpager with 2 fragments, each with their own video views. I have used this SO answer to successfully scale landscape video to fit full screen portrait mode in a cropCenter-type way, and it did that successfully, showing the center part of the video only, while scaling up the height. Since the resizing sets the videoView's width to wider than the frame, scrolling to the next page will indeed play the 2nd video, but it is covered by the first video view.
Setting each of the views to GONE is not an option, since it creates a black screen between the swipes until the other video is set back to VISIBLE.
How can I properly crop the views? Other posts offered third-party libraries, but the libs are either not updated or don't contain the methods I need from the video view.
I have a working ViewPager app which renders an ImageView. This ImageView fills the screen in portrait mode but when the user orientates their device to landscape I wish to display the current ImageView on the left and the next ImageView in the sequene on the right.
Currently in landscape the ImageView is simply displayed in the centre of the screen.
I know that I have to define a res/layout-land version of the PageViewer layout, but more than that I don't know.
Is this possible?
Thanks,
Mark.
I don't think it is possible to display more than 1 view on a viewpager (doesn't matter if youre using horizontal or vertical orientation). What you could try is creating 2 viewpagers, but this may become confusing (updating the positions on both viewpagers.. as I assume you want to update the images like flipping through a book). Viewpagers are quite limiting in that sense.
You can try using a ViewFlipper, instead, which allows more flexibility.
I have a 'Portrait mode' tabbed based application that contains a SurfaceView (with a camera preview on it) within one of the tabs. I have been creating my camera code from the Android API Demos and I have it all set-up working correctly bar one thing. The resulting camera preview is stretched and scaled making the preview look off.
Ideally I want to render the SurfaceView at the native preview size defined by the camera within the tab. However that would involve making the contents of the tab larger than its parent! (Or rather larger than the FrameLayout the tab activities are contained in).
How can I go about Achieving this?
Image of problem:
Make the FrameLayout the root object, then pile the camera view in it, then header and the tab widget. You may have to do some fancy work with gravity settings and stacking the header/footer in linear layouts but it definitely is possible.
aka:
frame.addView(cameraPreview);
frame.addView(header);
frame.addView(footer);
This will draw the objects in layers.
EDIT: If you don't want to use your current frame layout, just make another one. Stack the header, frame layout, and footer inside a linear layout. Create a new frame layout, add the linear layout to it, then add the preview onto it to draw over it.
I was able to create a split view using fragments in landscape mode to maximize the space. So for example, I can search on the left pane and it will show the detailed view on the right pane.
If the user switches to portrait mode during application usage, how can it be implemented in such a way that it is no longer in split view?
Android has this exact example in their code. You can specify a different layout dependent on the screen orientation. In the code you can perform a check to see what the current orientation is.