현재 스크롤뷰에 뷰페이저를 추가하여 사진을 옆으로 볼 수 있도록 하였는데요.
해상도에 따라 뷰페이저의 사진을 동적으로 변환시키기 위해 weight값을 넣으려고 하는데
height를 dp로 넣을 땐 사진이 잘 나오는데 layout_weight 값을 넣으면 사진이 아예 나오지가 않습니다.
스크롤뷰 안에 LinearLayout을 vertical로 구성하였고, 뷰페이저에 android:layout_height="0dp"로 주고,
layout_weight을 줬는데도 문제가 생기고 있어요.
구글링, 펍에서 다 찾아봤는데 도저히 나오지가 않네요. 고수님들 헬프 부탁드려요 ㅠ
아래는 xml코드입니다.
activity_detail.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1" >
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:adjustViewBounds="true" />
<TextView
android:id="@+id/detail_Name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:paddingLeft="10dp"
android:textSize="25sp"
android:text="detail_name" />