2010-05-01 10 views

답변

29

TextView의 텍스트를 왼쪽 하단에 정렬하려면 android:gravity="bottom|left"을 사용하십시오. TextView를 컨테이너의 왼쪽 하단에 정렬하려면 android:layout_gravity="bottom|left"을 사용하십시오.

여기에 귀하의 진실한 의도를 잘못 전달한 것 같습니다. 어떤 텍스트를 왼쪽 하단에 정렬하고 싶습니까? 화면? 텍스트의 컨테이너?

귀하의 질문에 좀더 구체적으로 답해주십시오.

하단 화면의 왼쪽 :

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:gravity="bottom|left" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <TextView android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="text"/> 
</FrameLayout> 
+0

화면 왼쪽 하단 – ryan

+0

답변을 편집했습니다. – synic

+0

프레임 레이아웃을 사용하지 않을 것입니다. 대신 상대 레이아웃을 사용하십시오. – Janusz

1

나는 Relative layout를 추천 할 것입니다.

로보기는 다음과 같이 보일 것이다 :

<?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"> 

    <TextView 
     android:id="@+id/label" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Text aligned bottom left" 
     android:layout_alignParentLeft="true" 
     android:layout_alignParentBottom="true"/> 

</RelativeLayout> 
관련 문제