2011-12-29 2 views
0

다음은 내가 작업해온 맞춤 알림 대화 상자의 레이아웃입니다. 그것은 아래에 체크 박스 단지 텍스트 뷰를이다 : 레이아웃 요소가 표시되지 않습니다 (다른 요소로 덮여 있음)

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 

<ScrollView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" > 

    <TextView 
     android:id="@+id/help_dialog_text" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="20dp" /> 
</ScrollView> 

<CheckBox 
    android:id="@+id/display_help_dialogs_checkbox" 
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent" 
    android:text="@string/display_help_dialogs" /> 

텍스트 뷰의 TEXTSIZE가 충분히 큰

(즉이있는 ScrollView 실제로 "넣어 사용하는"경우) 어디에서도 볼 수없는 수 확인란입니다. 도움을

감사합니다, 미첼

+0

위의 코드 전체를 다른 scrollview로 둘러 쌉니다. – Urban

+0

@ Urban : 흠 ... 나는 scrollview가 그 안에 포함 된 다른 scrollview를 처리하는 방법이 궁금합니다. – DeeV

+0

아 맞아 .. 흠 ... 생각 해보니, 지금은 호기심이있어. – Urban

답변

2

나는 당신의 ScrollView 레이아웃의 경계 외부 Checkbox을 추진하고있다 생각합니다. 이런 식으로 뭔가를 시도 :

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" > 

    <TextView 
     android:id="@+id/help_dialog_text" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="20dp" /> 

    <CheckBox 
     android:id="@+id/display_help_dialogs_checkbox" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@string/display_help_dialogs" /> 
    </LinearLayout> 
</ScrollView> 

당신은이 경우에있는 ScrollView의 크기를 지정해야하지만 발생해야하는 것은 LinearLayoutScrollView에 지정된 영역보다 더 큰 될 것입니다 수 있습니다. 그런 다음 ScrollView은 사용자가 레이아웃을 아래로 스크롤하여 나머지를 볼 수있게합니다.

+0

Perfect. 처음에는 TextView와 CheckBox를 ScrollView에 넣으려고했지만 ScrollView는 하나의 자식 만 가질 수있었습니다 ... 그래서 포기하고이 질문을 게시했습니다. 물론 솔루션은 매우 간단합니다! – MitchellSalad

관련 문제