Android Transition框架和来自网络的数据

Ras*_*mus 5 android android-animation android-transitions

我一直在尝试使用android转换框架,但遇到了一些问题.我有一个ImageView,它从屏幕中心移动到左上角.一切正常,但是一旦新场景进入,从服务器加载的图像就会从imageview中消失.据我所知,这是一种过渡的观点,内容也会丢失.但我该如何处理这个问题.代码如下: -

<!-scene1.xml-->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/container"
android:layout_height="match_parent">
<ImageView
    android:layout_width="150dp"
    android:layout_height="215dp"
    android:layout_centerInParent="true"
    android:id="@+id/theimage"
    />
 </RelativeLayout>

<!--scene2.xml-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/container"
android:layout_height="match_parent">
<ImageView
    android:layout_width="150dp"
    android:layout_height="215dp"
    android:layout_alignParentTop="true"
    android:id="@+id/theimage"
    />
 </RelativeLayout>

<!--theFragment-->
 @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View theViewGroup=inflater.inflate(R.layout.scene1, container, false);
    //both scene1 and scene 2 contain an imageview
    //the imageview of scene1 is populated by an image downloaded by picasso

    RelativeLayout thecont= (RelativeLayout) movieDetailView.findViewById(R.id.moviedesccontainer);

    mScene=Scene.getSceneForLayout(thecont,R.layout.scene2,getActivity());
    someButton.onClickListener(new OnClickListener(){
          public void onClick(){
            //when scene2 comes is the imageview has moved to the desired place but there is no image in there.How do we get the image which we downloaded earlier
           TransitionManager.go(mScene);
          };
    });
    return movieDetailView;
}
Run Code Online (Sandbox Code Playgroud)