마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

이클립스 안드로이드 match_parent가 안먹어요

0 추천

죄송해요 너무 간단한 일인데ㅜㅜ 이제 초창기라 어떻게 해야될지몰라서요

match_parent하면 가로로 꽉 차야하는데 안차더라구요ㅜㅜ

 


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:orientation="vertical" >
        
    
     <EditText
        android:id="@+id/Edit1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:hint="숫자1" />

  <EditText
        android:id="@+id/Edit2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:hint="숫자2" />  
    
  <Button
      android:id="@+id/Btn1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_margin="10dp"
      android:text="더하기" />
      
</LinearLayout>
  

 

익명사용자 님이 2017년 4월 14일 질문

1개의 답변

0 추천
 
채택된 답변

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

에서

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

로 변경해주세요

qweqweq (4,220 포인트) 님이 2017년 4월 14일 답변
...