안드로이드 개발 질문/답변
(글 수 45,052)
아래에서 XXToolbar를 맨 하단에 붙힐려고 합니다.
그런데 자꾸만 EditText 아래에 바짝 붙어 있네요
layout_marginBottom 을 0dip로 줘도 안되고 , layout_gravity 를 bottom으로 줘도 똑같습니다.
그리고 layout_marginTop 으로 조절하면 해상도 높이가 다를경우 문제가 될것 같기도 하구영 ㅠㅠ
방법이 없을까요. 도와주세요.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/back"
android:orientation="vertical">
<Button
android:id="@+id/btn_decode"
android:text="분석"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/editview_code_input"
android:hint="ex)http://www.naver.com"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoText="false"
android:gravity="fill_horizontal"
/>
<com.lni.QRContents.XXToolbar
android:id="@+id/XXToolbar"
android:layout_marginLeft = "0dip"
android:layout_marginBottom = "0dip"
android:layout_gravity="center_horizontal|bottom"
android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
/>
</LinearLayout>
그런데 자꾸만 EditText 아래에 바짝 붙어 있네요
layout_marginBottom 을 0dip로 줘도 안되고 , layout_gravity 를 bottom으로 줘도 똑같습니다.
그리고 layout_marginTop 으로 조절하면 해상도 높이가 다를경우 문제가 될것 같기도 하구영 ㅠㅠ
방법이 없을까요. 도와주세요.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/back"
android:orientation="vertical">
<Button
android:id="@+id/btn_decode"
android:text="분석"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/editview_code_input"
android:hint="ex)http://www.naver.com"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoText="false"
android:gravity="fill_horizontal"
/>
<com.lni.QRContents.XXToolbar
android:id="@+id/XXToolbar"
android:layout_marginLeft = "0dip"
android:layout_marginBottom = "0dip"
android:layout_gravity="center_horizontal|bottom"
android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
/>
</LinearLayout>
2010.07.22 01:34:32
아래에 고정시키려고 하시는건가요?? 저도 오래전에 써봐서 정확하게 기억은 나지 않지만 -??dip 를써보세요
layout_marginTop="-50dip"를 쓰면 화면 크기에 상관없지 전체에서 50을뺸 나머지를 마진주겠다 일꺼에요
만일 높이가 800이라면 marginTop을 -50dip하고 height을 50dip하면 750부터 하단고정이 될꺼에요..
(너무 오래전에 해봐서 설명이 100%정확하지는 않지만 하단고정은 -dip쓰면 할수있습니다.)
질문에 의도가 그게 아니였다면.. 도움이 못되서 죄송합니다^^;



