2014-10-01 2 views
3

Как вы можете понять из названия, у меня есть некоторые проблемы с масштабированием с тем, что я создаю на данный момент. На моем GalaxyS5 все работает отлично, однако, когда я пытаюсь запустить его на планшете Samsung с большим экраном, я получаю некоторые проблемы.Проблемы с масштабированием (Layout) для Android

Потому что я не могу размещать фотографии, здесь есть ссылка, которая обеспечивает визуальное описание моей проблемы: https://www.sendspace.com/file/83j0tp

Update: Так как у меня есть 10reputation сообщения, я могу добавить фотографии.

Samsung S5

Государство 1

enter image description here

Государственный 2

enter image description here

SamsungTab (Tablet)

государственных 1

enter image description here

Государственных 2

enter image description here

Это мой XML-код:

Я надеюсь, что вы, ребята, можете помочь мне.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" android:layout_width="match_parent" 
android:layout_height="match_parent"> 


<LinearLayout 
    android:layout_alignParentBottom="true" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/linearLayout5" 
    android:layout_alignTop="@+id/linearLayout6"> 

    <ImageView 
     android:id="@+id/loginImage" 
     android:layout_width="fill_parent" 
     android:layout_height="match_parent" /> 
    <ImageView 
     android:id="@+id/loginImage2" 
     android:layout_width="fill_parent" 
     android:layout_height="match_parent" /> 

    <TextView 
     android:layout_width="372dp" 
     android:layout_height="match_parent" 
     android:layout_alignLeft="@+id/loginImage" 
     android:layout_alignTop="@+id/loginImage" 
     android:layout_alignRight="@+id/loginImage" 
     android:layout_alignBottom="@+id/loginImage" 
     android:gravity="center|right" 
     android:id="@+id/textLoginmail" /> 
</LinearLayout> 

<LinearLayout 
    android:layout_alignParentBottom="true" 
    android:layout_width="fill_parent" 
    android:layout_height="49.5dp" 
    android:layout_marginTop="45dp" 
    android:id="@+id/linearLayout6" 
    android:weightSum="1" 
    android:layout_alignParentEnd="false"> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent" 
     android:text="Registreer" 
     android:gravity="center|right" 
     android:textColor="#FFFFFF" 
     android:id="@+id/textRegistreer" 
     android:layout_weight="0.72" /> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent" 
     android:id="@+id/textLogin" 
     android:layout_weight="0.44" 
     android:text="Login" 
     android:textColor="#FFFFFF" 
     android:gravity="center"/> 

    <Button 
     android:layout_width="81dp" 
     android:layout_height="wrap_content" 
     android:background="@android:color/transparent" 
     android:id="@+id/closeButton" /> 

</LinearLayout> 

<FrameLayout 
    android:layout_above="@id/linearLayout5" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginBottom="25dp" 
    android:id="@+id/framelayout_facebook"> 

    <ImageView 
     android:id="@+id/facebookImage" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 

    <com.facebook.widget.LoginButton 
     android:id="@+id/fb_login_button" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:drawableLeft="@drawable/ic_action_labels" 
     android:drawableRight="@drawable/ic_action_next_item" 
     android:layout_marginLeft="20dp" 
     android:layout_marginRight="20dp"/> 
    <LinearLayout 
     android:clickable="true" 
     android:focusable="true" 
     android:focusableInTouchMode="true" 
     android:orientation="horizontal" 
     android:id="@+id/overlay_for_terms" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:weightSum="1"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:gravity="center" 
      android:textColor="#FFFFFF" 
      android:id="@+id/textFacebook" 
      android:layout_weight="0.90" /> 
    </LinearLayout> 
</FrameLayout> 

+0

следовать Самсунг s5 и вкладка имеет diffrent размера экрана http://developer.android.com/training/multiscreen/screensizes.html –

+0

s5 принимать файлы из 'hdpi' папка .. проверить уры вкладки папку может занять от 'xhdpi' или' xxhdpi' – prabhakaran

+0

Фотографии взяты с сервера. Вы проверили файл отправителя? Я не думаю, что это проблема hdpi или mdpi, я думаю, что мой код неверен. – Zakdroid

ответ

Смежные вопросы