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

안드로이드 해상도별 레이아웃 질문입니다.

0 추천

안녕하세요 안드로이드 초보 개발자입니다.

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        >
     <RelativeLayout
         android:layout_width="0dip"
         android:layout_height="wrap_content"
         android:layout_weight="1"
         >
       <ImageButton
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/common_default_profile_img"
          />
       <ImageView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/shadow_white_thumbnail"
           />
      
       <ImageView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/stroke_thumbnail"
           />
     </RelativeLayout>
     <RelativeLayout
         android:layout_width="0dip"
         android:layout_height="match_parent"
         android:layout_weight="1"
         android:background="#fffcdc"
         >
       <LinearLayout
          android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
           >
        <LinearLayout
           android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="10dip"
           >
         <TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="15dip"
      android:textSize="15sp"
      android:textColor="#222222"
      android:text=""
            />   
        </LinearLayout>
        <LinearLayout
           android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="4dip"
            >
         <TextView
             android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="15dip"
      android:textSize="12sp"
      android:textColor="#222222"
      android:text=""
            />   
        </LinearLayout>
        <LinearLayout
           android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="11dip"
            >
         <TextView
             android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="15dip"
      android:textSize="10sp"
      android:textColor="#222222"
      android:text=""
            />   
        </LinearLayout>
       </LinearLayout>
     </RelativeLayout>
    
    
    </LinearLayout>

레이아웃을 이런식으로 구현했는데요

제가 궁금한것은 imagebutton 위에 감싸고 있는 Relativelayout 이나 LinearLayout width 값이나 height 값에

값을 200dp 이런식으로 픽스 시켜주면 다른 해상도 기기에서도 제대로 작동할까요?

테블릿이나 이런건 아니구요 그냥 일반 단말기를 기준으로 하고 있기는 한데요..

width 값 말고 heigth 값만이라도 값을 고정할수 있는지 궁금합니다. .

고수님들 도와주세요..ㅜㅜ

 

mamongs (4,050 포인트) 님이 2013년 7월 2일 질문

1개의 답변

0 추천
아마 작동할꺼 같긴한데 혹시 모르니

 

개발하실때 폰 설정에서 usb 디버깅 체크하시고 기기연결해서 테스트 해보세요. 에뮬레이터로 하지마시구요.

기기로 테스트하는게 더 빠르기도 하구요.

 

저는 화면 작은 기기랑 큰 기기 둘 다 테스트 해봤는데 잘 나오는거 같더라구요
브루스웨인 (8,580 포인트) 님이 2013년 7월 2일 답변
...