Android: remove space / black bar between activity transition

I have two activities, Activity1 and Activity2 . I want Activity2 to slide from the bottom of Activity1 while Activity1 is popping.

However, there is a black gap between the actions (see figure below).

gap between the activities

Below is my code for transitions.

slide_in_bottom.xml

<?xml version="1.0" encoding="utf-8"?>
<set
  xmlns:android="http://schemas.android.com/apk/res/android">
    <translate android:interpolator="@android:anim/accelerate_interpolator"
        android:duration="10000"
        android:fillAfter="true"
        android:fromYDelta="100.0%p" />
</set>

      

slide_out_top.xml

<?xml version="1.0" encoding="utf-8"?>
<set
  xmlns:android="http://schemas.android.com/apk/res/android">
    <translate android:interpolator="@android:anim/accelerate_interpolator"
        android:duration="10000"
        android:fillAfter="true"
        android:fromYDelta="100.0%p" />
</set>

      

So my question is, how do I get rid of this white space / black space? I checked the sources here on StackOverflow and I have a semi-transparent theme not working for me.

Thank!

+3


source to share


1 answer


ColorDrawable colorDrawable = new ColorDrawable( Color.TRANSPARENT );
getWindow().setBackgroundDrawable( colorDrawable );

      

Or, if you have a specific background,



getWindow().setBackgroundDrawable( getResources().getDrawable( R.drawable.bg ));

      

Source: fooobar.com/questions/408001 / ...

+1


source







All Articles