2012-03-30 4 views
0

내 레이아웃이 정의 된 사용자 정의 DialogPreference가 있습니다.사용자 정의 DialogPreference에서 안드로이드 - 이상한 레이아웃 디스플레이

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

android:paddingTop="5dp" 
android:paddingLeft="10dp" 
android:paddingRight="10dp" > 

<TextView 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/enter_password_label" 
    android:textAppearance="?android:attr/textAppearanceLarge" /> 

<EditText 
    android:id="@+id/editText1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:inputType="textPassword"> 

    <requestFocus /> 
</EditText> 

<TextView 
    android:id="@+id/textView2" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/confirm_password_label" 
    android:textAppearance="?android:attr/textAppearanceMedium" 
    /> 

<EditText 
    android:id="@+id/editText2" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:inputType="textPassword" 
    /> 

을 모두 TextViews이없는 표시된 대화 상자에서 :

enter image description here

TextViews의 이유가되지 어떤 표시되어 다음과 같이 레이아웃 파일은?

+0

당신이를 변경하는 시도 해 봤나 텍스트의 색 – Bhavin

답변

0

이 문제의 원인 중 하나는 제조업체의 테마 사용자 지정 때문입니다. 다른 이유는 선택한 텍스트 모양이 배경과 동일한 색상을 가질 수 있기 때문입니다. 이를 방지하려면, 당신은 단순히 예를 들어, 텍스트 뷰에 색상을 설정할 수 있습니다 :

<TextView 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/enter_password_label" 
    android:textAppearance="?android:attr/textAppearanceLarge" 

    android:textColor="#000000" /> 

* 또한 android:text 화면에 표시 할 텍스트를 가지고 있는지 확인

관련 문제