2011-02-14 6 views

답변

0

목록보기와 스크롤보기의 조합은 좋은 옵션이 아닙니다. 스크롤보기에서 목록보기를 배치 할 경우 목록보기가 스크롤되지 않습니다. 공식적으로 보이는 구글 안드로이드 프로그래머가 나쁜 사용자 경험이 될 것이라고 말했다. 이미있는 ScrollView에 연관된 한

1

ListView에, 당신은이

1

당신의 자신의 질문을 바로 가지고 생각하지 않는다 달성하기 위해 MergeAdapter을 사용할 수 있습니다! 그는 "확장 가능"목록보기에 대해 묻습니다. 어쨌든 나는 또한 같은 의심을 품고있는 것처럼 보입니다.

나는 아직도 대답이 아니오라고 생각합니다.

사용자 정의보기를 사용하여 동일한 효과를 줄 수있는 이미 존재하는 레이아웃 요소로 확대 할 수 있습니다. 그리고 그 해결책이 더 좋을 것이라고 생각합니다.

1

ExpandableListView에는 자체 목록보기가 있습니다. 다른 목록 뷰를 통합 할 필요가 없습니다. 목록이 길면 수직 스크롤이 자동으로 연결됩니다.

0

물론 VERTICAL scrollview가 포함 된 확장형 목록 뷰의 조합은 좋은 옵션이 아니지만 HorizontalScrollView 내에서 사용하면 인상적입니다. 내 프로그램에서이 방법을 사용합니다. 사용자는 긴 문자열을 가로로 스크롤 할 수 있습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<RelativeLayout 
    android:id="@+id/RelativeView01" 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    > 
    <Button 
      android:id="@+id/btnSaveSelection" 
      android:layout_alignParentLeft="true" 
      android:layout_width="100dip" 
      android:layout_height="50dip" 
      android:layout_alignParentBottom="true" 
      android:text="@string/SaveSelection" 
      android:focusable="true" 
      android:background="@drawable/android_button" 
      android:onClick="myClickHandler14" /> 
     ......... 
<HorizontalScrollView 
    android:id="@+id/HorizontalScrollView01" 
    android:layout_height="wrap_content" 
    android:layout_width="fill_parent" 
    android:scrollbars="horizontal|vertical" 
    android:layout_above="@id/button_add_group" 
    android:layout_alignParentTop="true"> 
    <LinearLayout android:id="@+id/LinearLayout02" 
     android:layout_width="wrap_content" 
     android:orientation="vertical" 
     android:layout_height="wrap_content"> 
     <ExpandableListView android:id="@+id/android:list" 
       android:layout_width="750px" 
       android:layout_height="wrap_content" 
       android:groupIndicator="@android:color/transparent" /> 
      <TextView android:id="@+id/android:empty" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:background="#000000" 
       android:text="@string/no_data"/> 
    </LinearLayout> 
</HorizontalScrollView> 
</RelativeLayout> 
관련 문제