2013-08-07 36 views
0

在垂直翻轉效果,當翻轉到下一個畫面背景顯示黑色它發生只在GT_N7100移動...如何解決這個問題???誰能幫我黑色。 ..翻轉到下一個屏幕顯示在背景

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@android:color/white" 
android:orientation="vertical" 

>

<ImageView 
    android:id="@+id/bar" 
    android:layout_width="480dp" 
    android:layout_height="1dp" 
    android:layout_marginTop="36dp" 
    android:scaleType="fitXY" 
    android:src="@drawable/line" /> 

<TextView 
    android:id="@+id/title" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/bar" 
    android:layout_margin="5dp" 
    android:textAppearance="@android:style/TextAppearance.Medium" 
    android:textColor="@android:color/black" 
    android:textSize="20sp" 
    android:textStyle="bold" 
    /> 

<ImageView 
    android:id="@+id/photo" 
    android:layout_width="fill_parent" 
    android:layout_height="330dp" 
    android:layout_below="@+id/title" 
    android:layout_gravity="center_horizontal" 
    android:layout_margin="5dp" 
    android:layout_marginTop="5dp" 

    android:scaleType="centerCrop" /> 
+0

你得到的日誌貓任何錯誤?爲什麼你沒有與我們分享你的代碼?我們沒有ESP,以確定你在哪裏卡住了... –

+0

嗨它沒有顯示在logcat的其他任何錯誤比GT_N7100移動它工作正常... – sandy

回答

0

如果您在onCreate()方法執行在主線程上的任何任務重,可能會阻止onCreate() UI;爲了避免這個問題,你可以爲這個任務運行一個單獨的線程。

@Override 
protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_splace_layout); 
    mContext = this; 
    Thread th = new Thread(new Runnable() { 
     @Override 
     public void run() { 
      // TODO Auto-generated method stub 
      try { 
       mTask(); 
      } catch (Exception e) { 
       // TODO: handle exception 
      } 
     } 
    }); 
    th.start(); 
} 
+0

我使用單獨的線程除了這個移動所有移動工作正常... – sandy

相關問題