android - Landscape ViewPager -


when change orientationon landscape photo half ... want when change orientation on facebook , show full picture .

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >  <android.support.v4.view.viewpager     android:id="@+id/pager"     android:layout_width="fill_parent"     android:layout_height="fill_parent"    /> 

you have create layout horizontal layout. if want portrait view different landscape view. must create xml file landscape. 2 xml file handled same java code. although can programmatically listen orientation change prefer different layout different orientation.

create 2 types of layout directories handle orientation . layout-land layout-port put xml same name in both directory. example if have main.xml file add have put in both directory.

documentation on supporting multiple screen


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -