How rotate image portrait to landscape in view page - android

I have more images in view pager, I want to rotate the image from portrait to landscape and landscape to portrait. I have already loaded images into view pager but I don't know how to change selected image screen orientation.
Any help will be appreciated!
Thanks.

Related

Cropping image for portrait and landscape modes

In my app user can select his own background image. The problem is, that current crop library only allows single rectangle selection. So when user selects image in portrait and rotates to landscape, image becomes inappropriately cropped. Is there a library that would at least allow to have two visible rectangles (one for portrait, another one for landscape) while selecting the image?
Scissors
https://github.com/lyft/scissors
i am using this library to done cropping for portrait and landscape. if u use this library just sent the ViewPortRatio of CropView for portrait or landscape cropping.
cropView.setViewportRatio(1f / 1.77f); // For Portrait
cropView.setViewportRatio(35f / 19f); // For Landscape

Screen orientation of view pager

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.

Contents are getting overlap in landscape when using recycler view and card view

I am using recycler view and cardview for the first time. My problem is when it is in potrait, it looks good but when screen is rotated to landscape the card view content are not fully visible.
Thanks in advance.Potrait image
Landscape image

MultiScreen ListView Android does not work well when rotated

Hello guys i have problem with my Listview . I have different layout for portrait and landscape item listview (layout and layout-land) like here :
Item listview Layout for Portrait
Item listview Layout for Landscape
this is simulation rotate from portrait to landscape
result on portrait / not yet rotated
result after rotated landscape
Which I want after rotated
so how to solve it ?
This link helped me to solve a similar problem. I hope that it helps you too.
Android: alternate layout xml for landscape mode

Android: Is that possible to mix portrait and landscape in viewpager?

I have a question about viewpager.
Is that possible to mix portrait and landscape orientation in one viewpager?
To be specific, some of the pages are in portrait orientation while other pages are in landscape orientation.
Thanks.
you can override the method getWidth(int) from the adapter to change the width of each page and with that, changing their proportions.

Categories

Resources