我正在寻找采用Glide库代替Universal Image Loader,但我遇到了关于共享元素转换的问题.
在我简单的Sandbox中,我使用UIL创建了以下转换:https://dl.dropboxusercontent.com/u/97787025/device-2015-06-18-113333.mp4
非常简单,它工作正常.但是当我使用Glide时,它看起来并不那么好:https://dl.dropboxusercontent.com/u/97787025/device-2015-06-18-114508.mp4
这是我正在使用的代码
第一项活动:
public class MainActivity extends BaseActivity {
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.main);
final ImageView iv = (ImageView) findViewById(R.id.main_image);
displayImageGlide(BaseActivity.IMAGE_URL, iv, true);
Button button = (Button) findViewById(R.id.main_button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), DifferentActivity.class);
startActivity(intent, iv);
}
});
}
}
Run Code Online (Sandbox Code Playgroud)
第二个:
public class DifferentActivity extends BaseActivity {
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle); …Run Code Online (Sandbox Code Playgroud)