2012-10-19 4 views
3

내 문제는 화면 하단에 흰색 선이 있습니다. 나는 그것이 왜 있는지 전혀 모른다. 그것은 다음과 같습니다배경 이미지가 부모를 제대로 채우지 못함

screen

이 레이아웃은 XML에 정의되어

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@android:color/black" 
android:orientation="vertical" > 

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/linearLayout1" 
    android:layout_width="250dp" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_centerInParent="true" 
    android:layout_gravity="bottom" 
    android:layout_marginBottom="30dp" 
    android:orientation="vertical" > 

    <!-- MAIN TITLE --> 


    <!-- LOGIN TITLE --> 

    <TextView 
     android:id="@+id/login_label" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/login" 
     android:textColor="@android:color/white" 
     android:textSize="18sp" /> 
    <!-- LOGIN TEXT --> 

    <EditText 
     android:id="@+id/login_text" 
     android:layout_width="250dp" 
     android:layout_height="wrap_content" 
     android:inputType="textNoSuggestions" 
     android:background="@android:color/white" 
     android:textSize="18dp" /> 
    <!-- PASSWORD TITLE --> 

    <TextView 
     android:id="@+id/password_label" 
     android:layout_width="250dp" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5sp" 
     android:text="@string/password" 
     android:textColor="@android:color/white" 
     android:textSize="18sp" /> 
    <!-- PASSWORD TEXT --> 


    <EditText 
     android:id="@+id/password_text" 
     android:layout_width="250dp" 
     android:layout_height="wrap_content" 
     android:layout_marginBottom="10dp" 
     android:inputType="textPassword" 
     android:background="@android:color/white" 
     android:textSize="18dp" /> 



    <!-- LOG IN BUTTON --> 

    <Button 
     android:id="@+id/login_button" 
     android:layout_width="120dp" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center" 
     android:background="#3DB0E1" 
     android:padding="12dp" 
     android:text="@string/login_button" 
     android:textColor="@android:color/white" /> 
</LinearLayout>  
</RelativeLayout> 

나는 또한 단지 내 응용 프로그램의 출시 후 발생하는 것을 발견했습니다. 내가 여기 다른 활동 bzy startActivity(intent)에서 온다면, 그 행은 사라진다. 도움이 될 것입니다.

+0

앱에 Holo-Light 테마가 설정되어 있습니까? Holo 테마로 시도해보십시오. 또한,'android : orientation = "vertical"'은 RelativeLayout에 유효하지 않다고 생각합니다. – Ridcully

+0

시간 내 주셔서 감사합니다. 나는 당신이 제안하고 안드로이드를 제거한 것처럼 평범한 홀로 시도 : orientation = "수직"이전 시도에서 남았습니다. 그러나 여전히 그 줄은 그대로 남아 있습니다. – slezadav

+1

레이아웃에 다른 것이 있습니까? 나는 일식 레이아웃 편집기에서 게시 된 레이아웃을 시도했는데 적어도 볼 수있는 흰색 라인은 없다. 프로그래밍 방식으로 내용을 추가하거나 수정합니까? – Ridcully

답변

0

이 사라집니다를 작동하는지 알려줘 외부 대부분의 상대 레이아웃

를 제거합니다.

Intent intent; 
intent = getIntent(); 
if (intent.getBooleanExtra("FIRST", true)) { 
    LoginActivity.this.finish(); 
    intent = new Intent().setClass(LoginActivity.this, LoginActivity.class); 
    intent.putExtra("FIRST", false); 
    startActivity(intent); 
} 
+0

좋아요! 그것은 깨끗하지는 않지만 마침내 작동하는 해결책입니다. 나는 왜 선이 존재했는지 의문을 품는다, 나는 그것이 신비의 종류라고 생각한다. – slezadav

0

가장 외적인 레이아웃은 필요하지 않습니다. 왜 그걸 가지고 있니?

내 솔루션이 될 것이다에 : 당신의 가장 바깥 상대 레이아웃

변화 android:id="@+id/linearLayout1"에서

android:layout_marginBottom="30dp" 

android:paddingBottom="30dp" 

OR : 그래서 당신이 할 필요가 기본적으로 다시 작성되고, 당신이 그것을 다시 한 번 (버그 게시)가 실제로

+0

나는 alredy가 여백을 변경하여 패딩을 시도했다. 그건 아무런 효과가 없었어. 현재로서는 LinearLayout을 제거하고 그 중 하나가 불필요하므로 RelativeLayout 만 유지했습니다. 그것은 여전히 ​​동일합니다. – slezadav

관련 문제