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

layout 설계 문제입니다.

0 추천
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/nomal_login_bg"
    android:gravity="top"
    tools:context=".NomalLoginActivity" >

    <Button
        android:id="@+id/login_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/checkBox1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="25dp"
        android:background="@drawable/login_button"
        android:padding="0dp"
        android:text="@string/login_button"
        android:onClick="onClick"
        />

    <EditText
        android:id="@+id/ID"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/PW"
        android:layout_alignRight="@+id/login_button"
        android:layout_marginBottom="49dp"
        android:background="@drawable/edit"
        android:ems="10"
        android:inputType="phone"
        android:textColorLink="@android:color/black" >

        <requestFocus />
    </EditText>

    <EditText
        android:id="@+id/PW"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/checkBox1"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="238dp"
        android:background="@drawable/edit"
        android:ems="10"
        android:inputType="textPassword"
        android:textColorLink="@android:color/black" />

    <CheckBox
        android:id="@+id/checkBox1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/ID"
        android:layout_alignTop="@+id/PW"
        android:layout_marginTop="78dp"
        android:background="@drawable/chk"
        android:button="@drawable/check_box_sel" />

</RelativeLayout>

 

 

레이아웃을 설계하는데 기기마다 다 다르네요....

여러 책을 읽어 봤지만 도무지 감이 안 잡힙니다.

감을 잡을 만한 자료좀 추천해주세요! ㅠㅠ

익명사용자 님이 2014년 10월 7일 질문

1개의 답변

0 추천
배경을 저리 이미지로 처리해서 하시면 안될듯 합니다.

 

최상위는 Frame 레이아웃으로 배경색을 핑크색으로 하시고

안에는 Linear 레이아웃으로 vertical 로 놓으신 다음에 연필이미지와 흰색배경(이 역시 LinearLayout로 vertical)

흰색배경 레이아웃에 ID, PW, Check, Button 배치하시면 될 듯 합니다.
바램 (19,650 포인트) 님이 2014년 10월 7일 답변
그러면... 단색이 아닌 배경이미지는 어떻게 하나요???
단색이 아닌 배경은 가급적 쓰지 마세요.
괜히 요즘 플랫 디자인이 대세가 된게 아닙니다.
...