本文整理汇总了Java中android.widget.LinearLayout.startAnimation方法的典型用法代码示例。如果您正苦于以下问题:Java LinearLayout.startAnimation方法的具体用法?Java LinearLayout.startAnimation怎么用?Java LinearLayout.startAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.startAnimation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDisPlay
import android.widget.LinearLayout; //导入方法依赖的package包/类
private void initDisPlay() {
tvSkip = findViewById(R.id.tv_skip);
tvSkip.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
skip();
}
});
View contentView = findViewById(R.id.content_view);
if (DisplayUtil.hasVirtualNavigationBar(this)) {
contentView.setPadding(0, 0, 0, DisplayUtil.getNavigationBarHeight(this));
}
TextView tvVersionName = findViewById(R.id.tv_version_name);
tvVersionName.setText(BuildConfig.VERSION_NAME);
LinearLayout llWelcome = (LinearLayout) findViewById(R.id.ll_welcome);
TextView tvDate = findViewById(R.id.tv_date);
SimpleDateFormat format2 = new SimpleDateFormat("yyyy年MM月dd日,EEEE");
tvDate.setText(format2.format(new Date()));
Animation animation = AnimationUtils.loadAnimation(this, R.anim.alpha_in);
llWelcome.startAnimation(animation);
}
示例2: onLoadSuccess
import android.widget.LinearLayout; //导入方法依赖的package包/类
public void onLoadSuccess(Fragment fragment,ShowRefreshViewListener showRefreshViewListener){
if (hashMap_fragment_loadView.containsKey(fragment)){
if (!hashMap_fragment_isSuccess.get(fragment)){
hashMap_fragment_isSuccess.remove(fragment);
hashMap_fragment_isSuccess.put(fragment,true);
View loadView=hashMap_fragment_loadView.get(fragment);
LinearLayout loadretry_parent=(LinearLayout)loadView.findViewById(R.id.loadretry_parent);
AlphaAnimation alphaAnimation = new AlphaAnimation(1,0);
alphaAnimation.setDuration(loadRetryRefreshConfig.getEndAnimTime());
loadretry_parent.startAnimation(alphaAnimation);
loadretry_parent.setVisibility(View.GONE);
}else{
showRefreshViewListener.colseRefreshView();
}
}
}
示例3: StartAnimations
import android.widget.LinearLayout; //导入方法依赖的package包/类
private void StartAnimations() {
Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
anim.reset();
LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
l.clearAnimation();
l.startAnimation(anim);
anim = AnimationUtils.loadAnimation(this, R.anim.translate);
anim.reset();
ImageView iv = (ImageView) findViewById(R.id.bard_splash);
iv.clearAnimation();
iv.startAnimation(anim);
splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
// Splash screen pause time
while (waited < 3500) {
sleep(100);
waited += 100;
}
Intent intent = new Intent(SplashActivity.this,
MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
SplashActivity.this.finish();
} catch (InterruptedException e) {
// do nothing
} finally {
SplashActivity.this.finish();
}
}
};
splashTread.start();
}
示例4: initializeComponent
import android.widget.LinearLayout; //导入方法依赖的package包/类
private void initializeComponent(View view) {
RelativeLayout rlParent = view.findViewById(library.imagepicker.R.id.dialog_image_picker_rl_parent);
TextView tvGallery = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_gallery);
TextView tvCamera = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_camera);
TextView tvCancel = view.findViewById(library.imagepicker.R.id.dialog_image_picker_tv_cancel);
LinearLayout llAnimateLayout = view.findViewById(library.imagepicker.R.id.dialog_image_picker_ll_dialog);
Animation animation = AnimationUtils.loadAnimation(getActivity(), library.imagepicker.R.anim.bottom_up);
llAnimateLayout.startAnimation(animation);
llAnimateLayout.setVisibility(View.VISIBLE);
rlParent.setOnClickListener(this);
tvGallery.setOnClickListener(this);
tvCamera.setOnClickListener(this);
tvCancel.setOnClickListener(this);
}
示例5: StartAnimations
import android.widget.LinearLayout; //导入方法依赖的package包/类
private void StartAnimations() {
Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
anim.reset();
LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
l.clearAnimation();
l.startAnimation(anim);
anim = AnimationUtils.loadAnimation(this, R.anim.rotate);
anim.reset();
ImageView iv = (ImageView) findViewById(R.id.splash);
iv.clearAnimation();
iv.startAnimation(anim);
splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while (waited < 3500) {
sleep(100);
waited += 100;
}
Intent intent = new Intent(Splashscreen.this,
MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
Splashscreen.this.finish();
} catch (InterruptedException e) {
} finally {
Splashscreen.this.finish();
}
}
};
splashTread.start();
}