简体   繁体   中英

Flipping to next screen shows black color in background

In vertical flip effect,when flip to next screen the background shows black color it happens only in GT_N7100 mobile...How to fix this problem???can anyone please help me...

<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" />

If you are performing any heavy task on main thread in onCreate() method, that might block the onCreate() UI; to avoid this issue you can run a separate thread for this task.

   @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();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM