2012-01-22 3 views
0

다른 휴대 전화/태블릿 화면으로 할 일을 정말로 이해할 수 없습니다. 조회 Google의 넥서스 화면이 완벽하게 (800x480) 보이지만 특히 태블릿에서는 끔찍한 것처럼 보입니다. 왼쪽 모서리 1/4 크기. 모든 나머지 화면은 단지 쓰레기입니다.android 내 콘텐츠로 화면을 채울 수 없습니다.

내 XML에서 내가하는 일은 다음과 같습니다.

<LinearLayout> 
<RelativeLayout fill_parent> 
<LinearLayout height="fill_parent" width="387dp"> 
RIGHT SCREEN 
</LinearLayout> 

<LinearLayout height="fill_parent" marginLeft="387dp" width="147dp"> 
LEFT SCREEN 
</LinearLayout> 
</RelativeLayout> 
</LinearLayout> 

enter image description here

+0

[확인] (http://stackoverflow.com/questions/6316540/how-to-make-layout-with-view-fill-the-remaining-space) [This (http://stackoverflow.com)/questions/5880513/how-to-make-a-linearlayout-filling-remaining-in-a-relativelayout) [링크] (http://stackoverflow.com/questions/3676095/relativelayout-height-to-fill -remaining-space) – Synxmax

답변

1

당신은 매니페스트 파일의 초대형 스크린에 대한 지원을 포함한다. xlarge 스크린을위한 별도의 레이아웃을 디자인 할 수도 있습니다. 이 article

+0

그래서 각 화면 resoulution에 대한 XML 파일을 디자인해야합니까? – Mert

+0

layout-xlarge라는 리소스 폴더 안에 폴더를 만들고 태블릿과 일치하도록보기의 크기를 조정합니다. 화면 크기에 영향을받지 않는 상대적인보기 크기 (wrap_content 및 fill_parent)로 작업 할 수도 있습니다. –

+0

내가 창 크기를 확인하고 어떤 레이아웃을 사용해야하는지 결정해야합니다. 그렇지 않으면 타블렛이나이 전화기를 얻는 방법이 있습니다 (저는 창 크기가 더 좋다고 생각합니다) – Mert

1

당신은 할 수 확인 :

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <LinearLayout 
     android:id="@+id/left" 
     android:layout_weight="1" 
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     > 
    </LinearLayout> 
    <LinearLayout 
     android:id="@+id/right" 
     android:layout_weight="2" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 
    </LinearLayout> 
</LinearLayout> 

당신은 또한 RelativeLayout의를 사용할 수 있습니다.

관련 문제