레이아웃 안에 이미지와 텍스트를 결합하려고했습니다. 나는 scrollview 내부에 레이아웃을 만들었고, ListView 내에서 scrollview 자체를 만든다. 긴 텍스트가 있기 때문에 텍스트를 스크롤하고 문제를 해결할 수 있습니다. 그러나 listview에서 항목을 클릭하려고하면 새로운 문제가 나타납니다. 클릭 할 수없는 것 같습니다. 왜냐하면 내가 텍스트를 감싸는 scrollview를 제거하기 때문에, 내부의 항목에 대한 리스너 이벤트를 호출 할 수 있기 때문이다. ScrollView에서 래핑 된 항목을 클릭하십시오 ListView 내부에서
<?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="wrap_content"
android:orientation="horizontal"
android:background="@color/hijau_tua"
>
<ImageView
android:id="@+id/flag"
android:layout_width="125dp"
android:layout_height="80dp"
android:layout_gravity="top"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<TextView
android:id="@+id/txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="15dp"
/>
<TextView
android:id="@+id/cur"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12dp"
/>
</LinearLayout>
</ScrollView>
이미지와 텍스트 뷰를 표시하도록 레이아웃의
. 나는 그것을 (TextView) ScrollView 안에 래핑한다. (여전히 항목 중 하나를 클릭하면 응답 없음)
문제를 지적하십시오. 감사합니다.
은 위의 레이아웃 목록보기에서 행 의미 확장? – KOTIOS
어쩌면이 도움말 : http://stackoverflow.com/questions/6210895/listview-inside-scrollview-is-not-scrolling-on-android/14577399#14577399 –
^그 작품입니다. 그러나 그것은 내가 이미지를 만질 때만 작동합니다. 하지만 scrollview 내에서 래핑 된 LinearLayout을 만질 때 작동하지 않습니다 –