안드로이드 개발 질문/답변
(글 수 45,052)
돌아가는데요 맨 밑에 있는 edittext 이놈이 문제인데요.. 갤탭이랑 겔럭시 s가 화면 크기때문에..
두개다 구동시키려고 하는데요.. Padding을 주려니.. 두개다 구동을 못시키고..
패딩을 안주니.. edittext 크기는 작아지고 .. 어떻게 해야 좋을까요 ㅠㅠ 좀 도와주세요
어이없는 부분에 막혀서 난감하네요.. 후.. 어떡해 하면 좋죠??
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout01"
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="top|left" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:layout_gravity="top">
<ImageView android:id="@+id/ImageView02" android:src="@drawable/background"
android:layout_alignParentTop="true" android:background="@color/blank"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="fitXY"/>
<ScrollView android:layout_alignParentTop="true"
android:id="@+id/ScrollView01" android:layout_toRightOf="@+id/Button01"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:id="@+id/RelativeLayout03"
android:layout_height="fill_parent" android:layout_width="fill_parent"
>
<RelativeLayout android:layout_height="wrap_content" android:layout_alignParentTop="true"
android:id="@+id/RelativeLayout05" android:layout_width="fill_parent">
<ImageButton android:id="@+id/Button04"
android:layout_below="@+id/Button02" android:textSize="16sp"
android:text="받는이 " android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/button_receiver"
android:layout_width="wrap_content"></ImageButton>
<EditText android:id="@+id/EditText05"
android:layout_toRightOf="@+id/Button04" android:singleLine="true"
android:gravity="left|center_vertical" android:height="40px"
android:textColor="#FF000000" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_centerVertical="true"
android:layout_marginLeft="2dp" android:layout_marginRight="2dp" android:editable="true" android:inputType="textEmailAddress"></EditText>
</RelativeLayout>
<RelativeLayout android:layout_height="fill_parent"
android:id="@+id/RelativeLayout06" android:layout_below="@+id/RelativeLayout05"
android:layout_width="fill_parent">
<ImageButton android:id="@+id/Button03"
android:layout_below="@+id/Button04" android:textSize="16sp"
android:text="참조 " android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/button_cc"
android:layout_width="wrap_content"></ImageButton>
<EditText android:id="@+id/EditText03"
android:layout_toRightOf="@+id/Button03" android:singleLine="true"
android:gravity="left|center_vertical" android:height="40px"
android:textColor="#FF000000" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_centerVertical="true"
android:layout_marginLeft="2dp" android:layout_marginRight="2dp" android:editable="true" android:inputType="textEmailAddress"></EditText>
</RelativeLayout>
<RelativeLayout android:layout_height="fill_parent"
android:id="@+id/RelativeLayout02" android:layout_width="fill_parent"
android:layout_below="@+id/RelativeLayout06">
<ImageButton android:id="@+id/Button01"
android:textSize="16sp" android:text="제목 " android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/button_title"
android:layout_width="wrap_content"></ImageButton>
<EditText android:id="@+id/EditText01"
android:layout_toRightOf="@+id/Button01" android:gravity="left|center_vertical"
android:textColor="#FF000000" android:singleLine="true"
android:layout_width="fill_parent" android:layout_centerVertical="true"
android:layout_marginLeft="2dp" android:layout_marginRight="2dp"
android:layout_height="wrap_content" />
</RelativeLayout>
<EditText android:id="@+id/EditText04" android:gravity="bottom|left"
android:layout_width="fill_parent" android:paddingTop="10dp"
android:layout_below="@+id/RelativeLayout02" android:layout_height="fill_parent"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</ScrollView></RelativeLayout>
2011.01.21 10:28:21
weight속성은 뭐죠?ㅠㅠ 첨보는데 .. RealtiveLayout 은 안되는건가요??ㅠㅠ 읔...
아 이거 난감하네 다뜯어고치기도 모하고..ㅠㅠ 답변감사합니다 ^^:
2011.01.21 10:35:27
weight="1"을 주시면 width를 꽉채우게 됩니다. 제가 가믈가믈해서 그렇지
Relative에서 한번해보세요 안되면 Linear로 바꿔서 해보시구요 ㅠㅠ
2011.01.21 11:19:31
RelativeLayout03 요 id부분만 Linear로 바꾸면 되니 그렇게 오래걸리진않을듯한데요 ㅎ
그리고 내부 Relative는 below다 없애시구요 ㅎ
2011.01.21 12:11:25
읔.. ㅠㅠ 리니어로해도..안되네요.. 일단 ScrollView 이놈 자체를 없애면 RelativeLayout03영역이 fill 로 꽉 채워지긴하는데..
스크롤을 넣으면 ㅠㅠ 완젼 영역이 싱글라인으로 변하더라구요.. 아 도대체 왜 이러지.. edtitext는 ㅠㅠ fill 로 했는데 휴..
weight도 안먹구요 ㅠㅠ 답답하네요 따른데다 weight="0" 넣어주고 edittext만 weight="1"넣어줬는데두..이러네여 아..완전 난감하네여