update 开屏过度动画接口开关

This commit is contained in:
zlzw 2023-04-20 15:10:57 +08:00
parent 5dcdd3fc5f
commit 79a709a76f
2 changed files with 17 additions and 4 deletions

View File

@ -276,13 +276,17 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
} }
if (mImageViewList != null && mImageViewList.size() > 0) { if (mImageViewList != null && mImageViewList.size() > 0) {
Log.i(TAG, "forwardMainActivity: " + mImageViewList.size()); Log.i(TAG, "forwardMainActivity: " + mImageViewList.size());
AdBean bean = mAdList.get(0);
if (bean != null && bean.getAnimation() == 1) {
intent.putExtra("ad_url", mAdList.get(0).getUrl()); intent.putExtra("ad_url", mAdList.get(0).getUrl());
Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(LauncherActivity.this, mImageViewList.get(0), "ad_img_0").toBundle(); Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(LauncherActivity.this, mImageViewList.get(0), "ad_img_0").toBundle();
//Bundle bundle = ActivityOptionsCompat.makeScaleUpAnimation(mImageViewList.get(0),100,100, DpUtil.dp2px(400),DpUtil.dp2px(200)).toBundle();
LauncherActivity.this.startActivity(intent, bundle); LauncherActivity.this.startActivity(intent, bundle);
} else { } else {
LauncherActivity.this.startActivity(intent); LauncherActivity.this.startActivity(intent);
} }
} else {
LauncherActivity.this.startActivity(intent);
}
finish(); finish();
} }

View File

@ -9,6 +9,7 @@ import com.alibaba.fastjson.annotation.JSONField;
public class AdBean { public class AdBean {
private String mUrl; private String mUrl;
private String mLink; private String mLink;
private int animation;//是否使用过度动画
@JSONField(name = "thumb") @JSONField(name = "thumb")
public String getUrl() { public String getUrl() {
@ -26,4 +27,12 @@ public class AdBean {
public void setLink(String link) { public void setLink(String link) {
mLink = link; mLink = link;
} }
@JSONField(name = "animation")
public int getAnimation() {
return animation;
}
@JSONField(name = "animation")
public void setAnimation(int animation) {
this.animation = animation;
}
} }