As the title says, my Mobile shows a Black screen between an android transition. Here's my java main activity code:
public class Main extends AppCompatActivity {
int h=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
public void a ( View view){
startActivity(new Intent(getApplicationContext(), MainWithButtons.class));
overridePendingTransition(R.anim.left_in, R.anim.left_out);
}
}
Here the java second activity:
public class MainWithButtons extends AppCompatActivity{
@Override
protected void onCreate( Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_with_buttons);
}
}
left_in.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate
android:duration="400"
android:fromXDelta="0"
android:toXDelta="100%p"/>
</set>
left_in.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate
android:duration="400"
android:fromXDelta="-100%p"
android:toXDelta="0"/>
</set>
When i comment the overridePendingTransition method i can open the second activity, so the onClick is not the problem.