안녕하세요.
이미지 부분이 왜 안넘어가는지 잘 모르겠습니다.
HorizontalScrollView 부분에서 지정한 이미지들이 왜 가로로 스크롤이 안되는지 잘 모르겠습니다.
각 이미지의 id값을 주어서, 하나하나 switch문에서 넣으려고 만들었는데,이상하게도
이미지에 id로 지정하고 나서 switch문에 추가한 뒤에, 원래는 가로로 움직이던 HorizontalScrollView가 작동
을 하지 않습니다.. 어떤 이유에서 일까요 ㅠ 이것이 해결되면, 아래의 switch문의 case 1,2,3,4에는 이와 같이
하면 될것 같아서 그부분은 생략을 하였습니다..
왜 안되는지 이유를 잘 모르겠는데.. 한번 아래에 소스를 한번 첨부해 보았습니다.
8000자가 넘는 부분은, 아래의 답변 부분에 추가해 보았습니다.
< first_movie 부분의 .xml 파일입니다. >
<HorizontalScrollView
android:id="@+id/HorizontalScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/Eight_LinearLayout"
android:layout_marginTop="10dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/ScrollView_Image1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageView
android:id="@+id/ScrollView_Image2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageView
android:id="@+id/ScrollView_Image3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageView
android:id="@+id/ScrollView_Image4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageView
android:id="@+id/ScrollView_Image5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
</LinearLayout>
</HorizontalScrollView>