Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.BasisHtml5Activity H5页面加载基础类; 2.BasisProgressDialogUtils 和 BasisPBL…
…oadingUtils 连续加载多个时无法完全消失问题优化
- Loading branch information
Showing
12 changed files
with
633 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/gingold/basisdependency/Base/BaseHtml5Activity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.gingold.basisdependency.Base; | ||
|
||
import com.gingold.basisdependency.R; | ||
import com.gingold.basislibrary.Base.BasisHtml5Activity; | ||
|
||
/** | ||
* | ||
*/ | ||
|
||
public abstract class BaseHtml5Activity extends BasisHtml5Activity { | ||
|
||
public void initTitle(String title, String right) { | ||
super.initTitle(title, right, R.id.iv_base_back, R.id.tv_base_title, R.id.tv_base_right); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 153 additions & 0 deletions
153
app/src/main/java/com/gingold/basisdependency/activity/AnimationActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
package com.gingold.basisdependency.activity; | ||
|
||
import android.view.View; | ||
import android.view.animation.AlphaAnimation; | ||
import android.view.animation.Animation; | ||
import android.view.animation.AnimationSet; | ||
import android.view.animation.RotateAnimation; | ||
import android.view.animation.ScaleAnimation; | ||
import android.view.animation.TranslateAnimation; | ||
|
||
import com.gingold.basisdependency.Base.BaseActivity; | ||
import com.gingold.basisdependency.R; | ||
|
||
/** | ||
* 动画测试 | ||
*/ | ||
|
||
public class AnimationActivity extends BaseActivity { | ||
@Override | ||
public void setupViewLayout() { | ||
setContentView(R.layout.activity_animation); | ||
} | ||
|
||
@Override | ||
public void initView() { | ||
|
||
} | ||
|
||
@Override | ||
public void listener() { | ||
|
||
} | ||
|
||
@Override | ||
public void logicDispose() { | ||
|
||
} | ||
|
||
@Override | ||
public void onClick(View v) { | ||
|
||
} | ||
|
||
/** | ||
* 透明度渐变的动画 | ||
* | ||
* @param view | ||
*/ | ||
public void alpha(View view) { | ||
AlphaAnimation aa = new AlphaAnimation(0.0f, 1.0f); | ||
// 动画播放的时间长度 | ||
aa.setDuration(2000); | ||
// 设置重复播放的次数 | ||
aa.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
aa.setRepeatMode(Animation.REVERSE); | ||
// 让iv播放aa动画 | ||
view.startAnimation(aa); | ||
} | ||
|
||
/** | ||
* 平移动画 | ||
* | ||
* @param view | ||
*/ | ||
public void trans(View view) { | ||
TranslateAnimation ta = new TranslateAnimation( | ||
Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1f, | ||
Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1f); | ||
// 动画播放的时间长度 | ||
ta.setDuration(2000); | ||
// 设置重复播放的次数 | ||
ta.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
ta.setRepeatMode(Animation.REVERSE); | ||
// 让iv播放aa动画 | ||
view.startAnimation(ta); | ||
} | ||
|
||
/** | ||
* 缩放动画 | ||
*/ | ||
public void scale(View view) { | ||
ScaleAnimation sa = new ScaleAnimation(0.2f, 2.0f, 0.2f, 2.0f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, | ||
0.5f); | ||
// 动画播放的时间长度 | ||
sa.setDuration(2000); | ||
// 设置重复播放的次数 | ||
sa.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
sa.setRepeatMode(Animation.REVERSE); | ||
// 让iv播放aa动画 | ||
view.startAnimation(sa); | ||
} | ||
|
||
/** | ||
* 旋转动画 | ||
*/ | ||
public void rotate(View view) { | ||
RotateAnimation ra = new RotateAnimation(0, 360, | ||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, | ||
0.5f); | ||
// 动画播放的时间长度 | ||
ra.setDuration(2000); | ||
// 设置重复播放的次数 | ||
ra.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
ra.setRepeatMode(Animation.REVERSE); | ||
// 让iv播放aa动画 | ||
view.startAnimation(ra); | ||
} | ||
|
||
/** | ||
* 动画合集 集合 | ||
*/ | ||
public void set(View view) { | ||
AnimationSet set = new AnimationSet(false); | ||
RotateAnimation ra = new RotateAnimation(0, 360, | ||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, | ||
0.5f); | ||
// 动画播放的时间长度 | ||
ra.setDuration(2000); | ||
// 设置重复播放的次数 | ||
ra.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
ra.setRepeatMode(Animation.REVERSE); | ||
ScaleAnimation sa = new ScaleAnimation(0.2f, 2.0f, 0.2f, 2.0f, | ||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, | ||
0.5f); | ||
// 动画播放的时间长度 | ||
sa.setDuration(2000); | ||
// 设置重复播放的次数 | ||
sa.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
sa.setRepeatMode(Animation.REVERSE); | ||
// 让iv播放aa动画 | ||
TranslateAnimation ta = new TranslateAnimation( | ||
Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1f, | ||
Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1f); | ||
// 动画播放的时间长度 | ||
ta.setDuration(2000); | ||
// 设置重复播放的次数 | ||
ta.setRepeatCount(Animation.INFINITE); | ||
// 设置重复播放的模式 | ||
ta.setRepeatMode(Animation.REVERSE); | ||
set.addAnimation(ta); | ||
set.addAnimation(sa); | ||
set.addAnimation(ra); | ||
view.startAnimation(set); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.