0
세로로 스크롤해야하는 하나의 긴 이미지로 구성된 레이아웃을 만들려고합니다.ScrollView를 사용하여 ImageView 스크롤하기
e.e. - 전체 화면 너비를 취하고 전체 높이를 늘리려면 스트레칭해야합니다.
내 레이아웃은이 작업을 수행하지만 이미지 앞뒤에 이상한 틈이 생깁니다. 각 간격은 화면의 약 2/3을 차지하며 아래로 스크롤 할 수 있습니다.
ImageView
만 화면에 표시되도록 간격을 제거하려면 어떻게해야합니까?
내 활동 XML은 다음과 같이이다 : 나중에 참조 :
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="0dp" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
tools:context=".HelpActivity" >
<ImageView
android:id="@+id/imageHelp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:src="@drawable/tutorial_with_text" />
</LinearLayout>
</ScrollView>
시도의 배경에 이미지를 추가 Imageview –
LinearLayout이 필요하지 않습니다. 그리고 레이아웃에서 xmlns : android가 두 번 필요하지 않습니다. –
감사합니다. 네가 옳아 :) – Roman