2016-07-01 2 views
-7

enter image description here활동 하단에있는 사각형

Android Studio를 사용해 보려합니다. "로그인"텍스트로 어떻게 하단 사각형을 만들 수 있습니까? 그리고 탭에 대해 어리석은 질문. 내가 marginTop 속성으로 이동한다는 것은 맞습니까?

+0

당신은'TextView' 요소 – Aspicas

+0

사용에 재산 Left''중력을 이용하여'textview'와'LinearLayout'를 만들 수 있습니다 '안드로이드 님의'layout_alignParentBottom = "true"로 하단의 레이아웃을 유지 –

+0

고마워! 하지만 정확히 사각형을 그리는거야? 드로어 블? –

답변

1

사용 Layout 것을 :

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:orientation="vertical" android:layout_width="match_parent" 
       android:layout_height="match_parent"> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="0.90"> 

    </LinearLayout> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="0.10" 
     android:background="#ffFF9800" 
     android:layout_gravity="center_vertical"> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:layout_gravity="right" 
      android:layout_marginRight="20dp"> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="LOG IN >" 
       android:id="@+id/textView76" 
       android:textSize="20sp" 
       android:textColor="#fff" 
       android:layout_gravity="center_vertical"/> 
     </LinearLayout> 
    </LinearLayout> 


</LinearLayout> 
+0

감사합니다 많이 @Aspicas! 하단에 있지만 문제가있는 것 같습니다 https://pp.vk.me/c636924/v636924257/1398e/K2_XcDPPPeQ.jpg. 아니면 우리가 원하는 것인가? 죄송합니다 : ( –

+0

@ VladislavDmitriev 죄송합니다 ... 무슨 문제가 있습니까? 색상? 문제가 보이지 않습니다. – Aspicas

+0

죄송합니다. 내 잘못이었습니다. 이제 완벽한 작업입니다. –

관련 문제