안드로이드 개발 질문/답변
(글 수 45,052)
아래와 같이 EditText와 Button 을 3:1 비율로 보이게 했습니다.
잘 동작합니다.
근데, EditText 에 글자를 넣으니까 EditText 가 자꾸 커지고, Button은 작아지네요 ㅡㅜ
디바이스( 스마트폰, 탭...)에 관련없이 항상 3:1 비율로 EditText와 Button을 그리고 싶은데 어떻게 하면 되는지요?
그럼 고수님들의 답변 기다립니다. 꾸벅
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
</LinearLayout>




layout_width 를 주시던지..
ems를 사용해보세요.