activitygroup 切换动画效果如何实现
程序员文章站
2023-12-05 17:12:22
**一下提供伪代码,仅说明自己的理解,思路**/ /*************************************************/ /*假设*/ aa...
**一下提供伪代码,仅说明自己的理解,思路**/
/*************************************************/
/*假设*/
aactivity,bactivity,cactivity,dactivity 都extends activitygroup.
a1activity,b1activity,c1activity,d1activity 都extends activity.
a2activity,b2activity,c2activity,d2activity 都extends activity
/*一,aactivity继承了activity,调用startactivity()的时候会在tab内部contentview显示a1activity*/
aactivity.this.startactivity(a1activity.class)
bactivity.this.startactivity(b1activity.class)
cactivity.this.startactivity(c1activity.class)
dactivity.this.startactivity(d1activity.class)
/*二,a1activity没有继承activitygroup,所以调用startactivity()的时候和普通的调用没有区别,a2会填满窗口*/
a1activity.this.startactivity(a2activity.class)
b1activity.this.startactivity(b2activity.class)
c1activity.this.startactivity(c2activity.class)
d1activity.this.startactivity(d2activity.class)
/*三,a1activity.this.getparent()获得的是aactivity, 其实就是activitygroup; 虽然a1activity没有继承activitygroup,但是a2activity实际是由a1activity的父类aactivity启动的,所以a2activity的启动效果和一差不多*/
a1activity.this.getparent().startactivity(a2activity.class)
b1activity.this.getparent().startactivity(b2activity.class)
c1activity.this.getparent().startactivity(c2activity.class)
d1activity.this.getparent().startactivity(d2activity.class)
/*************************************************/
/*假设*/
aactivity,bactivity,cactivity,dactivity 都extends activitygroup.
a1activity,b1activity,c1activity,d1activity 都extends activity.
a2activity,b2activity,c2activity,d2activity 都extends activity
/*一,aactivity继承了activity,调用startactivity()的时候会在tab内部contentview显示a1activity*/
aactivity.this.startactivity(a1activity.class)
bactivity.this.startactivity(b1activity.class)
cactivity.this.startactivity(c1activity.class)
dactivity.this.startactivity(d1activity.class)
/*二,a1activity没有继承activitygroup,所以调用startactivity()的时候和普通的调用没有区别,a2会填满窗口*/
a1activity.this.startactivity(a2activity.class)
b1activity.this.startactivity(b2activity.class)
c1activity.this.startactivity(c2activity.class)
d1activity.this.startactivity(d2activity.class)
/*三,a1activity.this.getparent()获得的是aactivity, 其实就是activitygroup; 虽然a1activity没有继承activitygroup,但是a2activity实际是由a1activity的父类aactivity启动的,所以a2activity的启动效果和一差不多*/
a1activity.this.getparent().startactivity(a2activity.class)
b1activity.this.getparent().startactivity(b2activity.class)
c1activity.this.getparent().startactivity(c2activity.class)
d1activity.this.getparent().startactivity(d2activity.class)
上一篇: Photoshop快速打造作逼真的热气球
下一篇: 纯jsp打造无限层次的树代码