2013-07-15 2 views
4

Я кодирую приложение для устройств Android, и у меня есть проблема, когда он работает на телефоне nexus 4. Он хорошо работает на Galaxy S3/Note 2 и на некоторых других устройствах.ошибка отображения на nexus 4

Я создаю AVD с параметром nexus 4, но он работает на нем.

Проблема заключается в отображении моего основного вида деятельности. Это как мозаичная картина.

В logcat ничего нет, и я не знаю, как исправить это.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
tools:context=".MainActivity" > 

<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" > 


    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" > 

     <TextView 
      android:id="@+id/textView1" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="@string/Titre_fav" 
      android:textAppearance="?android:attr/textAppearanceLarge" /> 

     <ImageView 
      android:id="@+id/imageView1" 
      android:contentDescription="@string/image_desc_star_logo" 
      android:layout_width="25dp" 
      android:layout_height="25dp" 
      android:src="@drawable/ic_fav" /> 

    </LinearLayout> 
    <ScrollView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 
     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/fav_scroll"> 
     </LinearLayout> 
    </ScrollView> 

</LinearLayout> 
<RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_marginBottom="50dp" > 
     <TextView 
      android:id="@+id/console" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="" /> 
</RelativeLayout> 
<RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" > 
     <Button 
      android:id="@+id/nav_to_foud" 
      style="?android:attr/buttonStyleSmall" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentRight="true" 
      android:text="@string/nav_to_found_text" /> 

     <Button 
      android:id="@+id/nav_to_settings" 
      style="?android:attr/buttonStyleSmall" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="@string/nav_to_settings_text" /> 
    </RelativeLayout> 
</RelativeLayout> 

Как исправить?

Я не могу опубликовать свой скриншот, потому что у меня нет 10 репутации.


Edit: я могу знать после screnshot, спасибо :)

Что это может выглядеть следующим образом: correct screen

Что посмотрим: enter image description here

+0

вот +1 .. Опубликовать снимок ... :) .. и Добро пожаловать в StackOverflow. – Madushan

+0

Опубликовать снимок. +1 от меня! –

+0

Фото опубликовано :) – Tsuna77

ответ

0

Я нашел решение моей проблема, я не знаю, будет ли это работать для вас. Но попробуйте добавить фон в ваш XML-файл. Вроде: android:background="#000000" в макете верхнего уровня.

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