title: Android lollipop shared elements transition blink / flash
body: <p>I see strange thing in my shared element transition on Lollipop. Shared elements are flickering just before they are starting to animate (please see video <a href="https://www.youtube.com/watch?v=DCoyyC_S-9A">https://www.youtube.com/watch?v=DCoyyC_S-9A</a>)</p>
  
  <p>I've no idea why it is happening. However when I add <code>&lt;item name="android:windowSharedElementsUseOverlay"&gt;false&lt;/item&gt;</code> to my theme I don't see flickering but the transition is not looking good (they look like only half of it is animating second half of animation 'hidden').</p>
  
  <p>Other transition settings:</p>
  
  <pre><code>&lt;item name="android:windowActivityTransitions"&gt;true&lt;/item&gt;
  &lt;item name="android:windowContentTransitions"&gt;true&lt;/item&gt;
  &lt;item name="android:windowAllowEnterTransitionOverlap"&gt;true&lt;/item&gt;
  &lt;item name="android:windowAllowReturnTransitionOverlap"&gt;true&lt;/item&gt;
  &lt;item name="android:windowSharedElementEnterTransition"&gt;@android:transition/move&lt;/item&gt;
  &lt;item name="android:windowSharedElementExitTransition"&gt;@android:transition/move&lt;/item&gt;
  </code></pre>
  
  <p>I am starting activity using ActivityCompat &amp; ActivityOptionsCompat:</p>
  
  <pre><code>ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(ActivityMain.this,
                          new Pair&lt;View, String&gt;(playButton, getString(R.string.translation_control_button)),
                          new Pair&lt;View, String&gt;(findViewById(R.id.playerImage), getString(R.string.translation_artwork)));
  
  ActivityCompat.startActivity(this, pendingIntent, options.toBundle());
  </code></pre>
  
  <p>1st activity:</p>
  
  <p>
  </p>
  
  <pre><code>    &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:id="@+id/main_container"&gt;
  
          &lt;include layout="@layout/toolbar"/&gt;
  
          &lt;FrameLayout
              android:id="@+id/activity_main_fragment_container"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"&gt;&lt;/FrameLayout&gt;
  
          &lt;TableLayout
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent"
              android:layout_height="45dp"
              android:padding="7dp"
              android:stretchColumns="*"
              android:id="@+id/player_toolboxTable"
              android:background="?colorPrimary"&gt;
  
              &lt;TableRow
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:id="@+id/player_toolbox"&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:clickable="true"
                      android:id="@+id/player_fav"
                      android:src="@drawable/rating_not_important"
                      android:onClick="playerFav"
                      android:background="@drawable/button_selector_semi_white"
                      /&gt;
  
                  &lt;ImageView
                      android:src="@drawable/av_pause_over_video"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:clickable="true"
                      android:id="@+id/player_play"
                      android:onClick="playerPlay"
                      android:background="@drawable/button_selector_semi_white"
                      android:transitionName="@string/translation_control_button"
                      /&gt;
  
                  &lt;ImageView
                      android:src="@drawable/social_share"
                      android:layout_width="wrap_content"
                      android:clickable="true"
                      android:id="@+id/player_share"
                      android:background="@drawable/button_selector_semi_white"
                      android:layout_height="wrap_content"
                      android:onClick="playerShare"
                      /&gt;
  
                  &lt;ImageView
                      android:src="@drawable/content_save"
                      android:layout_width="wrap_content"
                      android:clickable="true"
                      android:id="@+id/player_record"
                      android:background="@drawable/button_selector_semi_white"
                      android:layout_height="wrap_content"
                      android:onClick="playerRecord"
                      /&gt;
              &lt;/TableRow&gt;
          &lt;/TableLayout&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/com.heinrichreimersoftware.materialdrawer.DrawerFrameLayout&gt;
  </code></pre>
  
  <p>Second activity:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                tools:context=".activities.CommunityActivity"&gt;
  
      &lt;include layout="@layout/toolbar"/&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1"
          android:paddingLeft="@dimen/activity_horizontal_margin"
          android:paddingRight="@dimen/activity_horizontal_margin"
          android:paddingTop="@dimen/activity_vertical_margin"
          android:paddingBottom="@dimen/activity_vertical_margin"
          android:orientation="vertical"&gt;
  
          &lt;Button
              android:id="@+id/community_google_plus_group"
              android:text="@string/community_google_plus"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:drawableLeft="@drawable/ic_action_gplus"
              android:gravity="left|center_vertical"
              style="@style/MaterialButton"
              /&gt;
  
          &lt;Button
              android:id="@+id/community_google_fb"
              android:text="@string/community_facebook"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:drawableLeft="@drawable/ic_action_facebook"
              android:gravity="left|center_vertical"
              style="@style/MaterialButton"
              /&gt;
  
          &lt;Button
              android:id="@+id/community_mail"
              android:text="@string/community_mail"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:drawableLeft="@drawable/ic_action_gmail"
              android:gravity="left|center_vertical"
              style="@style/MaterialButton"
              /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;include layout="@layout/include_mini_player"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>include_mini_player.xml</p>
  
  <pre><code>&lt;fragment
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/mini_player_fragment"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:name=".fragments.MiniPlayerFragment"
      android:layout_width="fill_parent"
      android:layout_height="72dp"
      tools:layout="@layout/fragment_mini_player"/&gt;
  </code></pre>
  
  <p>fragment_mini_player:</p>
  
  <pre><code>&lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"
      android:background="?colorPrimary"
  
      &gt;
  
      &lt;ImageView
          android:id="@+id/player_artwork"
          android:layout_width="52dp"
          android:scaleType="centerCrop"
          android:layout_height="52dp"
          android:src="@drawable/music_icon"
          android:layout_margin="5dp"
          android:layout_gravity="center_vertical"
          android:transitionName="@string/translation_artwork"
          /&gt;
  
      &lt;LinearLayout
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:orientation="vertical"
          android:layout_marginLeft="5dp"
          android:layout_gravity="center_vertical"&gt;
  
          &lt;TextView
              android:textColor="@android:color/white"
              android:text=" "
              android:textSize="8pt"
              android:id="@+id/player_song_title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              /&gt;
  
          &lt;TextView
              android:textColor="@android:color/white"
              android:text=" "
              android:textSize="7pt"
              android:id="@+id/player_song_artist"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              /&gt;
      &lt;/LinearLayout&gt;
  
  
      &lt;ImageView
          android:id="@+id/player_play_button"
          android:layout_gravity="center_vertical"
          android:layout_width="42dp"
          android:layout_height="42dp"
          android:layout_marginRight="5dp"
          android:src="@drawable/av_pause_over_video"
          android:background="@drawable/button_selector_semi_white"
          android:transitionName="@string/translation_control_button"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Do you have any ideas why it is happening? </p>