Java Code Examples for android.view.animation.Animation

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 2

From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 3

From project ActionBarSherlock, under directory /library/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 4

From project Amantech, under directory /Android/action_bar_sherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 5

From project andlytics, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 6

From project android-pulltorefresh, under directory /library/src/com/handmark/pulltorefresh/library/internal/.

Source file: IndicatorLayout.java

  32 
vote

public final boolean isVisible(){
  Animation currentAnim=getAnimation();
  if (null != currentAnim) {
    return mInAnim == currentAnim;
  }
  return getVisibility() == View.VISIBLE;
}
 

Example 7

From project android-xbmcremote, under directory /src/org/xbmc/android/remote/presentation/activity/.

Source file: RemoteActivity.java

  32 
vote

public static Animation inFromRightAnimation(){
  Animation inFromRight=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  inFromRight.setDuration(350);
  inFromRight.setInterpolator(new AccelerateInterpolator());
  return inFromRight;
}
 

Example 8

From project androidZenWriter, under directory /library/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 9

From project android_7, under directory /src/org/immopoly/android/helper/.

Source file: Settings.java

  32 
vote

public static ImageListDownloader getExposeImageDownloader(Context ctx){
  if (exposeImageDownloader == null) {
    Bitmap loadingBmp=((BitmapDrawable)ctx.getResources().getDrawable(R.drawable.loading)).getBitmap();
    Bitmap fallbackBmp=((BitmapDrawable)ctx.getResources().getDrawable(R.drawable.portfolio_fallback)).getBitmap();
    Animation loadingAni=AnimationUtils.loadAnimation(ctx,R.anim.loading_animation);
    exposeImageDownloader=new ImageListDownloader(loadingBmp,loadingAni,fallbackBmp);
  }
  return exposeImageDownloader;
}
 

Example 10

From project android_packages_apps_Gallery, under directory /src/com/android/camera/.

Source file: VideoCamera.java

  32 
vote

private static void fadeIn(View view){
  view.setVisibility(View.VISIBLE);
  Animation animation=new AlphaAnimation(0F,1F);
  animation.setDuration(500);
  view.startAnimation(animation);
}
 

Example 11

From project apps-for-android, under directory /Photostream/src/com/google/android/photostream/.

Source file: LoginActivity.java

  32 
vote

private void hideProgress(){
  if (mProgress.getVisibility() != View.GONE) {
    final Animation fadeOut=AnimationUtils.loadAnimation(this,R.anim.fade_out);
    mProgress.setVisibility(View.GONE);
    mProgress.startAnimation(fadeOut);
  }
}
 

Example 12

From project Backyard-Brains-Android-App, under directory /src/com/backyardbrains/view/.

Source file: UIFactory.java

  32 
vote

@Override public void run(){
  Animation a=null;
  if (this.recording == false) {
    a=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,-1,Animation.RELATIVE_TO_SELF,0);
  }
 else {
    a=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,-1);
  }
  a.setDuration(250);
  a.setInterpolator(AnimationUtils.loadInterpolator(this.activity,android.R.anim.anticipate_overshoot_interpolator));
  View stopRecView=activity.findViewById(R.id.TapToStopRecordingTextView);
  stopRecView.startAnimation(a);
}
 

Example 13

From project beintoo-android-sdk, under directory /BeintooSDK/src/com/beintoo/beintoosdkutility/.

Source file: BeintooAnimations.java

  32 
vote

public static Animation inFromRightAnimation(int duration){
  Animation inFromRight=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  inFromRight.setDuration(duration);
  inFromRight.setInterpolator(new AccelerateInterpolator());
  return inFromRight;
}
 

Example 14

From project buzzwords, under directory /src/com/buzzwords/.

Source file: GameSetup.java

  32 
vote

/** 
 * Creates the animation that fades in the helper text
 * @return the animation that fades in the helper text
 */
private Animation fadeInHelpText(long delay){
  if (BuzzWordsApplication.DEBUG) {
    Log.d(TAG,"FadeInHelpText()");
  }
  Animation fade=new AlphaAnimation(0.0f,1.0f);
  fade.setStartOffset(delay);
  fade.setDuration(2000);
  return fade;
}
 

Example 15

From project CalendarView_1, under directory /src/org/kazzz/util/.

Source file: AnimationHelper.java

  32 
vote

/** 
 * ??????????????????????€??°???????????????????
 * @return Animation ???????€??°?????????????
 */
public static Animation inFromRightAnimation(){
  Animation inFromRight=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  inFromRight.setDuration(350);
  inFromRight.setInterpolator(new AccelerateInterpolator());
  return inFromRight;
}
 

Example 16

From project CityBikes, under directory /src/net/homelinux/penecoptero/android/citybikes/app/.

Source file: InfoLayer.java

  32 
vote

private Animation inFromRightAnimation(){
  Animation inFromRight=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  inFromRight.setDuration(250);
  inFromRight.setInterpolator(new AccelerateInterpolator());
  return inFromRight;
}
 

Example 17

From project Common-Sense-Net-2, under directory /AndroidBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 18

From project cow, under directory /libs/ActionBarSherlock/library/src/com/actionbarsherlock/.

Source file: ActionBarSherlock.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 19

From project cw-omnibus, under directory /external/ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 20

From project DeskSMS, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 21

From project dmix, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 22

From project dreamDroid, under directory /libraries/ABS/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 23

From project evodroid, under directory /src/com/sonorth/evodroid/util/.

Source file: AppTitleBar.java

  32 
vote

public void hideDashboardOverlay(){
  ImageButton showDashboardButton=(ImageButton)findViewById(R.id.home_small);
  showDashboardButton.setImageDrawable(getResources().getDrawable(R.drawable.icon_titlebar_home));
  Animation fadeOutAnimation=AnimationUtils.loadAnimation(context,R.anim.dashboard_hide);
  dashboard.startAnimation(fadeOutAnimation);
  dashboard.setVisibility(View.GONE);
  isShowingDashboard=false;
}
 

Example 24

From project examples_2, under directory /SearchView/actionbarsherlock-lib/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 25

From project fanfoudroid, under directory /src/com/ch_linghu/fanfoudroid/ui/base/.

Source file: WithHeaderActivity.java

  32 
vote

protected void addWriteButton(){
  writeButton=(ImageButton)findViewById(R.id.writeMessage);
  writeButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      Animation anim=AnimationUtils.loadAnimation(v.getContext(),R.anim.scale_lite);
      v.startAnimation(anim);
      Intent intent=new Intent();
      intent.setClass(v.getContext(),WriteActivity.class);
      v.getContext().startActivity(intent);
    }
  }
);
}
 

Example 26

From project farebot, under directory /libs/ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 27

From project finch, under directory /libs/JakeWharton-ActionBarSherlock-2eabf25/library/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 28

From project FlipDroid, under directory /app/src/com/goal98/flipdroid2/activity/.

Source file: ContentLoadedActivity.java

  32 
vote

private void addFavoriteTagAnim(View view,RelativeLayout body,int belowViewId){
  ImageView favoriteImageView=new ImageView(view.getContext());
  RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
  layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
  layoutParams.addRule(RelativeLayout.BELOW,belowViewId);
  favoriteImageView.setLayoutParams(layoutParams);
  favoriteImageView.setImageResource(R.drawable.tag_favorite);
  body.addView(favoriteImageView);
  Animation animation=AnimationUtils.loadAnimation(view.getContext(),R.anim.favoriteanim);
  favoriteImageView.startAnimation(animation);
}
 

Example 29

From project framework_base_policy, under directory /src/com/android/internal/policy/impl/.

Source file: PhoneWindow.java

  32 
vote

private void hideProgressBars(ProgressBar horizontalProgressBar,ProgressBar spinnyProgressBar){
  final int features=getLocalFeatures();
  Animation anim=AnimationUtils.loadAnimation(getContext(),com.android.internal.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 30

From project friendica-for-android, under directory /libpulltorefresh/src/com/handmark/pulltorefresh/library/internal/.

Source file: IndicatorLayout.java

  32 
vote

public final boolean isVisible(){
  Animation currentAnim=getAnimation();
  if (null != currentAnim) {
    return mInAnim == currentAnim;
  }
  return getVisibility() == View.VISIBLE;
}
 

Example 31

From project GnucashMobile, under directory /com_actionbarsherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 32

From project Google-Tasks-Client, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 33

From project HeLauncher, under directory /src/com/handlerexploit/launcher_reloaded/.

Source file: Search.java

  32 
vote

/** 
 * Modify clearAnimation() to invalidate the parent. This works around an issue where the region where the end of the animation placed the view was not redrawn after clearing the animation.
 */
@Override public void clearAnimation(){
  Animation animation=getAnimation();
  if (animation != null) {
    super.clearAnimation();
    if (animation.hasEnded() && animation.getFillAfter() && animation.willChangeBounds()) {
      ((View)getParent()).invalidate();
    }
 else {
      invalidate();
    }
  }
}
 

Example 34

From project hiofenigma-android, under directory /opendice/src/edu/killerud/diceroll/.

Source file: Main.java

  32 
vote

private void rollTheDice(){
  for (int i=0; i < mDice.size(); i++) {
    ((TextView)mAppWindow.getChildAt(i)).setText("" + mDice.get(i).roll());
    Animation wobble=AnimationUtils.loadAnimation(getApplicationContext(),R.animator.wobble);
    ((TextView)mAppWindow.getChildAt(i)).setAnimation(wobble);
    ((TextView)mAppWindow.getChildAt(i)).startAnimation(wobble);
  }
}
 

Example 35

From project HSR-Timetable, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 36

From project iosched_3, under directory /libprojects/abs/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 37

From project IRC-Client, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/.

Source file: ActionBarSherlockCompat.java

  32 
vote

private void hideProgressBars(IcsProgressBar horizontalProgressBar,IcsProgressBar spinnyProgressBar){
  final int features=mFeatures;
  Animation anim=AnimationUtils.loadAnimation(mActivity,android.R.anim.fade_out);
  anim.setDuration(1000);
  if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0 && spinnyProgressBar.getVisibility() == View.VISIBLE) {
    spinnyProgressBar.startAnimation(anim);
    spinnyProgressBar.setVisibility(View.INVISIBLE);
  }
  if ((features & (1 << Window.FEATURE_PROGRESS)) != 0 && horizontalProgressBar.getVisibility() == View.VISIBLE) {
    horizontalProgressBar.startAnimation(anim);
    horizontalProgressBar.setVisibility(View.INVISIBLE);
  }
}
 

Example 38

From project Juggernaut_SystemUI, under directory /src/com/android/systemui/statusbar/.

Source file: StatusBarService.java

  32 
vote

private Animation loadAnim(int id,Animation.AnimationListener listener){
  Animation anim=AnimationUtils.loadAnimation(StatusBarService.this,id);
  if (listener != null) {
    anim.setAnimationListener(listener);
  }
  return anim;
}
 

Example 39

From project lastfm-android, under directory /app/src/fm/last/android/widget/.

Source file: TagButton.java

  32 
vote

/** 
 * Generates translate animation on position change, must be executed from parent within onLayout method
 * @param durationMillis
 * @return
 */
public Animation createTranslateAnimation(long durationMillis){
  if (old_x == getLeft() && old_y == getTop()) {
    return null;
  }
  int dx=getLeft() - old_x;
  int dy=getTop() - old_y;
  Animation a=new TranslateAnimation(-dx,0,-dy,0);
  a.setFillAfter(true);
  a.setDuration(durationMillis);
  old_x=getLeft();
  old_y=getTop();
  return a;
}
 

Example 40

From project android-flash-cards, under directory /src/org/thomasamsler/android/flashcards/fragment/.

Source file: AddCardFragment.java

  31 
vote

private void flipCard(final View v){
  final Animation flip1=AnimationUtils.loadAnimation(v.getContext(),R.anim.flip1);
  final Animation flip2=AnimationUtils.loadAnimation(v.getContext(),R.anim.flip2);
  flip1.setAnimationListener(new AnimationListener(){
    public void onAnimationStart(    Animation animation){
    }
    public void onAnimationRepeat(    Animation animation){
    }
    public void onAnimationEnd(    Animation animation){
      mWordToggle^=true;
      if (mWordToggle) {
        mFrontPageWord=mEditText.getText().toString().trim();
        if (null == mBackPageWord || "".equals(mBackPageWord)) {
          mEditText.setText("");
        }
 else {
          mEditText.setText(mBackPageWord);
        }
        mTextViewTitle.setText(R.string.add_card_back_title);
      }
 else {
        mBackPageWord=mEditText.getText().toString().trim();
        if (null == mFrontPageWord || "".equals(mFrontPageWord)) {
          mEditText.setText("");
        }
 else {
          mEditText.setText(mFrontPageWord);
        }
        mTextViewTitle.setText(R.string.add_card_front_title);
      }
      v.startAnimation(flip2);
    }
  }
);
  v.startAnimation(flip1);
}
 

Example 41

From project Android-GifStitch, under directory /src/com/phunkosis/gifstitch/.

Source file: GatherFramesActivity.java

  31 
vote

private void fireFlash(){
  if (this.mFlashFrame.getVisibility() != ViewGroup.VISIBLE) {
    Animation flashAnimation=new AlphaAnimation(0.8f,0.0f);
    flashAnimation.setDuration(400);
    flashAnimation.setAnimationListener(new AnimationListener(){
      @Override public void onAnimationStart(      Animation animation){
        mFlashFrame.setVisibility(ViewGroup.VISIBLE);
      }
      @Override public void onAnimationRepeat(      Animation animation){
      }
      @Override public void onAnimationEnd(      Animation animation){
        mFlashFrame.setVisibility(ViewGroup.GONE);
      }
    }
);
    this.mFlashFrame.startAnimation(flashAnimation);
  }
}
 

Example 42

From project androidquery, under directory /src/com/androidquery/callback/.

Source file: BitmapAjaxCallback.java

  31 
vote

private static void setBmAnimate(ImageView iv,Bitmap bm,Bitmap preset,int fallback,int animation,float ratio,float anchor,int source){
  bm=filter(iv,bm,fallback);
  if (bm == null) {
    iv.setImageBitmap(null);
    return;
  }
  Drawable d=makeDrawable(iv,bm,ratio,anchor);
  Animation anim=null;
  if (fadeIn(animation,source)) {
    if (preset == null) {
      anim=new AlphaAnimation(0,1);
      anim.setInterpolator(new DecelerateInterpolator());
      anim.setDuration(FADE_DUR);
    }
 else {
      Drawable pd=makeDrawable(iv,preset,ratio,anchor);
      Drawable[] ds=new Drawable[]{pd,d};
      TransitionDrawable td=new TransitionDrawable(ds);
      td.setCrossFadeEnabled(true);
      td.startTransition(FADE_DUR);
      d=td;
    }
  }
 else   if (animation > 0) {
    anim=AnimationUtils.loadAnimation(iv.getContext(),animation);
  }
  iv.setImageDrawable(d);
  if (anim != null) {
    anim.setStartTime(AnimationUtils.currentAnimationTimeMillis());
    iv.startAnimation(anim);
  }
 else {
    iv.setAnimation(null);
  }
}
 

Example 43

From project android_8, under directory /src/com/defuzeme/playqueue/.

Source file: PlayQueue.java

  31 
vote

public void setFollowingTrackInfos(){
  if (DefuzeMe._queueTracks.size() > 0) {
    final View followingSound=findViewById(id.followingSound);
    if (followingSound != null) {
      final TextView followingTitle=(TextView)findViewById(id.followingSoundTitle);
      final TextView followingTime=(TextView)findViewById(id.followingSoundTime);
      followingTitle.setText(DefuzeMe._queueTracks.get(1).data.content.title + " - " + DefuzeMe._queueTracks.get(1).data.content.artist);
      followingTime.setText(PlayQueue.Tools.secondsToTimeString(DefuzeMe._queueTracks.get(1).data.content.duration));
      final AnimationSet set=new AnimationSet(true);
      final Animation animation=new AlphaAnimation(0.0f,1.0f);
      animation.setDuration(1400);
      set.addAnimation(animation);
      followingSound.startAnimation(set);
      followingSound.setVisibility(View.VISIBLE);
      followingTitle.startAnimation(set);
      followingTitle.setVisibility(View.VISIBLE);
      followingTime.startAnimation(set);
      followingTime.setVisibility(View.VISIBLE);
    }
  }
}
 

Example 44

From project Binaural-Beats, under directory /src/com/ihunda/android/binauralbeat/.

Source file: BBeat.java

  31 
vote

public Animation runGoneAnimationOnView(View target){
  Animation animation=AnimationUtils.loadAnimation(this,android.R.anim.slide_out_right);
  animation.setDuration(ANIM_TIME_MS);
  final View mTarget=target;
  animation.setAnimationListener(new AnimationListener(){
    public void onAnimationEnd(    Animation animation){
      mTarget.setVisibility(View.GONE);
    }
    public void onAnimationRepeat(    Animation animation){
    }
    public void onAnimationStart(    Animation animation){
    }
  }
);
  target.startAnimation(animation);
  return animation;
}
 

Example 45

From project BookingRoom, under directory /src/org/androidaalto/bookingroom/view/.

Source file: WeekView.java

  31 
vote

private void restartView(){
  Animation myFadeInAnimation=AnimationUtils.loadAnimation(mContext,R.anim.fadein);
  startAnimation(myFadeInAnimation);
  mSelectedMeetings.clear();
  mComputeSelectedMeeting=true;
  remeasure(getWidth(),getHeight());
  mSelectedMeetingInfo=null;
  mSelectedMeetingGeometry=null;
  mRedrawScreen=true;
  if (mTitleTextView != null) {
    mTitleTextView.setText("Week " + mBaseDate.getWeekNumber() + " - "+ mBaseDate.format("%m %Y"));
  }
  recalc();
  reloadMeetings();
  invalidate();
}
 

Example 46

From project Catroid-maven-playground, under directory /src/main/java/at/tugraz/ist/catroid/ui/dragndrop/.

Source file: DragAndDropListView.java

  31 
vote

public boolean onLongClick(View view){
  int itemPosition=-1;
  int[] location=new int[2];
  if (newView) {
    itemPosition=this.position;
    (getChildAt(getChildCount() - 1)).getLocationOnScreen(location);
    touchPointY=location[1] + (getChildAt(getChildCount() - 1)).getHeight();
    newView=false;
  }
 else {
    itemPosition=pointToPosition(view.getLeft(),view.getTop());
    int visiblePosition=itemPosition - getFirstVisiblePosition();
    (getChildAt(visiblePosition)).getLocationOnScreen(location);
    touchPointY=location[1] + (getChildAt(visiblePosition)).getHeight() / 2;
  }
  boolean drawingCacheEnabled=view.isDrawingCacheEnabled();
  view.setDrawingCacheEnabled(true);
  view.measure(MeasureSpec.makeMeasureSpec(Values.SCREEN_WIDTH,MeasureSpec.EXACTLY),MeasureSpec.makeMeasureSpec(Utils.getPhysicalPixels(400,getContext()),MeasureSpec.AT_MOST));
  view.layout(0,0,Values.SCREEN_WIDTH,view.getMeasuredHeight());
  view.buildDrawingCache(true);
  if (view.getDrawingCache() == null) {
    return false;
  }
  Bitmap bitmap=Bitmap.createBitmap(view.getDrawingCache());
  view.setDrawingCacheEnabled(drawingCacheEnabled);
  startDragging(bitmap,touchPointY);
  dragAndDropListener.drag(itemPosition,itemPosition);
  trashView.setVisibility(View.VISIBLE);
  Animation animation=AnimationUtils.loadAnimation(getContext(),R.anim.trash_in);
  trashView.startAnimation(animation);
  previousItemPosition=itemPosition;
  return true;
}
 

Example 47

From project CineShowTime-Android, under directory /Libraries/CineShowTime/src/com/binomed/showtime/android/screen/main/.

Source file: SplashScreen.java

  31 
vote

@Override protected void onResume(){
  super.onResume();
  try {
    Animation fadeIn=AnimationUtils.loadAnimation(this,R.anim.appear);
    Animation fadeOut=AnimationUtils.loadAnimation(SplashScreen.this,R.anim.disappear);
    splashImage.startAnimation(fadeOut);
    splashImage2.startAnimation(fadeIn);
    mHandler.postDelayed(mFadeOutRunnable,SPLASH_SCREEN_FIRST_DURATION);
  }
 catch (  Exception e) {
  }
 finally {
    mHandler.postDelayed(mPendingLauncherRunnable,SPLASH_SCREEN_DURATION);
  }
}
 

Example 48

From project creamed_glacier_app_settings, under directory /src/com/android/settings/.

Source file: AccessibilityTutorialActivity.java

  31 
vote

@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Animation inAnimation=AnimationUtils.loadAnimation(this,android.R.anim.slide_in_left);
  inAnimation.setAnimationListener(mInAnimationListener);
  final Animation outAnimation=AnimationUtils.loadAnimation(this,android.R.anim.slide_in_left);
  mViewAnimator=new ViewAnimator(this);
  mViewAnimator.setInAnimation(inAnimation);
  mViewAnimator.setOutAnimation(outAnimation);
  mViewAnimator.addView(new TouchTutorialModule1(this,this));
  mViewAnimator.addView(new TouchTutorialModule2(this,this));
  setContentView(mViewAnimator);
  mAccessibilityManager=(AccessibilityManager)getSystemService(ACCESSIBILITY_SERVICE);
  if (savedInstanceState != null) {
    show(savedInstanceState.getInt(KEY_ACTIVE_MODULE,DEFAULT_MODULE));
  }
 else {
    show(DEFAULT_MODULE);
  }
}
 

Example 49

From project Cura, under directory /src/com/cura/.

Source file: CustomArrayAdapter.java

  31 
vote

@Override public View getView(final int position,View convertView,ViewGroup parent){
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View rowView=inflater.inflate(R.layout.accountslist,parent,false);
  TextView userAndDomain=(TextView)rowView.findViewById(R.id.label);
  TextView port=(TextView)rowView.findViewById(R.id.label2);
  userAndDomain.setText(user[position].getUsername() + "@" + user[position].getDomain());
  port.setText("Connects through port " + user[position].getPort());
  if (userAndDomain.getText().length() > 24) {
    int lengthDif=userAndDomain.getText().length() - 24;
    Animation mAnimation=new TranslateAnimation(0f,-(17f * lengthDif),0.0f,0.0f);
    mAnimation.setDuration(1000 * lengthDif);
    mAnimation.setRepeatCount(1);
    mAnimation.setRepeatMode(Animation.REVERSE);
    userAndDomain.setAnimation(mAnimation);
  }
  return rowView;
}
 

Example 50

From project danbooru-gallery-android, under directory /src/tw/idv/palatis/danboorugallery/utils/.

Source file: ImageLoader.java

  31 
vote

@Override public void run(){
  if (image.getTag() == null)   return;
  String url=(String)image.getTag();
  if (url.equals(image_url)) {
    image.setImageBitmap(bitmap);
    image.setScaleType(scale_type);
    if (do_animation) {
      Animation anim=image.getAnimation();
      if (anim != null) {
        if (anim.hasEnded()) {
          anim.reset();
          image.startAnimation(anim);
        }
      }
 else       image.startAnimation(AnimationUtils.loadAnimation(image.getContext(),android.R.anim.fade_in));
    }
    image.setTag(null);
  }
}
 

Example 51

From project DigitbooksExamples, under directory /DigitbooksExamples/src/fr/digitbooks/android/examples/chapitre05/.

Source file: CatchMeActivity.java

  31 
vote

@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.imageview);
  final ImageView image=(ImageView)findViewById(R.id.image);
  image.setImageResource(R.drawable.ic_launcher);
  image.setOnClickListener(new OnClickListener(){
    public void onClick(    View arg0){
      Toast.makeText(CatchMeActivity.this,"Touch",Toast.LENGTH_SHORT).show();
    }
  }
);
  Animation animation=(Animation)AnimationUtils.loadAnimation(this,R.anim.catchme);
  animation.setAnimationListener(new AnimationListener(){
    public void onAnimationEnd(    Animation animation){
      image.startAnimation(animation);
    }
    public void onAnimationRepeat(    Animation animation){
    }
    public void onAnimationStart(    Animation animation){
    }
  }
);
  image.startAnimation(animation);
}
 

Example 52

From project droid-comic-viewer, under directory /src/net/robotmedia/acv/ui/widget/.

Source file: ComicFrame.java

  31 
vote

public void showContent(ACVComic acv,int screenIndex,int frameIndex,boolean forward,LayoutMeasures imageMeasures){
  this.removeContent();
  final List<ACVContent> contents=acv.getContents(screenIndex,frameIndex);
  final String baseURL=acv.getContentBaseURL();
  final Context context=getContext();
  for (  final ACVContent content : contents) {
    final Rect rect=content.createRect(imageMeasures.width,imageMeasures.height);
    final WebView w=new WebView(context);
    final int x=rect.left - imageMeasures.scrollX + imageMeasures.left;
    final int y=rect.top - imageMeasures.scrollY + imageMeasures.top;
    w.setLayoutParams(new AbsoluteLayout.LayoutParams(rect.width(),rect.height(),x,y));
    w.setVerticalScrollBarEnabled(false);
    w.setHorizontalScrollBarEnabled(false);
    w.setBackgroundColor(Color.TRANSPARENT);
    w.setClickable(false);
    w.setLongClickable(false);
    final String html=acv.getContentFromSource(content);
    w.loadDataWithBaseURL(baseURL,html,"text/html","UTF-8",null);
    mContentContainer.addView(w);
    mContentViews.add(w);
    w.setWebViewClient(new WebViewClient(){
      @Override public void onPageFinished(      WebView view,      String url){
        final long transitionDuration=content.getTransitionDuration();
        if (transitionDuration > 0) {
          final Animation animation=AnimationUtils.loadAnimation(context,android.R.anim.fade_in);
          animation.setDuration(transitionDuration);
          view.startAnimation(animation);
        }
      }
      @Override public boolean shouldOverrideUrlLoading(      WebView view,      String url){
        IntentUtils.view(context,url);
        return true;
      }
    }
);
  }
}
 

Example 53

From project droidparts, under directory /extra/src/org/droidparts/util/ui/.

Source file: ViewUtils.java

  31 
vote

public static void crossFade(final View visibleViewFrom,final View invisibleViewTo,int durationMillis,final Runnable onAnimationEnd){
  Animation animFrom=new AlphaAnimation(1,0);
  Animation animTo=new AlphaAnimation(0,1);
  animFrom.setDuration(durationMillis);
  animTo.setDuration(durationMillis);
  animTo.setAnimationListener(new AnimationListenerAdapter(){
    @Override public void onAnimationEnd(    Animation animation){
      setInvisible(visibleViewFrom,true);
      setInvisible(invisibleViewTo,false);
      if (onAnimationEnd != null) {
        onAnimationEnd.run();
      }
    }
  }
);
  visibleViewFrom.startAnimation(animFrom);
  invisibleViewTo.startAnimation(animTo);
}
 

Example 54

From project Locast-Android, under directory /src/android/support/v4_map/app/.

Source file: FragmentManager.java

  31 
vote

Animation loadAnimator(Fragment fragment,int transit,boolean enter,int transitionStyle){
  final Animation animObj=fragment.onCreateAnimator(transit,enter,fragment.mNextAnim);
  if (animObj != null) {
    return animObj;
  }
  if (fragment.mNextAnim != 0) {
    final Animation anim=AnimationUtils.loadAnimation(mActivity,fragment.mNextAnim);
    if (anim != null) {
      return anim;
    }
  }
  if (transit == 0) {
    return null;
  }
  final int styleIndex=transitToStyleIndex(transit,enter);
  if (styleIndex < 0) {
    return null;
  }
  if (transitionStyle == 0 && mActivity.getWindow() != null) {
    transitionStyle=mActivity.getWindow().getAttributes().windowAnimations;
  }
  if (transitionStyle == 0) {
    return null;
  }
  return null;
}
 

Example 55

From project AirCastingAndroidClient, under directory /src/main/java/pl/llp/aircasting/activity/.

Source file: ButtonsActivity.java

  29 
vote

@Override public void onAnimationEnd(Animation animation){
  if (buttons.getVisibility() == View.VISIBLE) {
    buttons.setVisibility(View.GONE);
  }
 else {
    buttons.setVisibility(View.VISIBLE);
  }
}
 

Example 56

From project android-bankdroid, under directory /src/com/liato/bankdroid/.

Source file: LockableActivity.java

  29 
vote

protected void hideProgressBar(){
  AlphaAnimation animation=new AlphaAnimation(1,0);
  animation.setDuration(350);
  animation.setAnimationListener(new AnimationListener(){
    @Override public void onAnimationEnd(    Animation animation){
      mProgressBar.setVisibility(View.GONE);
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
    @Override public void onAnimationStart(    Animation animation){
    }
  }
);
  mProgressBar.startAnimation(animation);
}
 

Example 57

From project Android-Flashcards, under directory /src/com/secretsockssoftware/androidflashcards/.

Source file: CardRunner.java

  29 
vote

private void createAnimations(){
  AccelerateInterpolator ai=new AccelerateInterpolator();
  ifr=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  ifr.setDuration(300);
  ifr.setInterpolator(ai);
  otl=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,-1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  otl.setDuration(300);
  otl.setInterpolator(ai);
  ifl=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,-1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  ifl.setDuration(300);
  ifl.setInterpolator(ai);
  otr=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,+1.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f);
  otr.setDuration(300);
  otr.setInterpolator(ai);
  alphain=new AlphaAnimation(0.0f,1.0f);
  alphain.setDuration(250);
  alphaout=new AlphaAnimation(1.0f,0.0f);
  alphaout.setDuration(250);
}
 

Example 58

From project android_packages_apps_QiblaCompass, under directory /src/com/farsitel/qiblacompass/activities/.

Source file: QiblaActivity.java

  29 
vote

public void onAnimationEnd(Animation animation){
  if (ConcurrencyUtil.getNumAimationsOnRun() <= 0) {
    Log.d(NAMAZ_LOG_TAG,"An animation ended but no animation was on run!!!!!!!!!");
  }
 else {
    ConcurrencyUtil.decrementAnimation();
  }
  schedule();
}
 

Example 59

From project android_packages_apps_Superuser, under directory /src/com/noshufou/android/su/widget/.

Source file: SlidingPanel.java

  29 
vote

@Override public void onAnimationEnd(Animation animation){
  mAnimating=false;
  final View content=mContent;
  content.offsetLeftAndRight(mFillOffset);
  final Button button=(Button)mButton;
  if (mExpanded) {
    button.setText(">");
  }
 else {
    button.setText("<");
  }
}
 

Example 60

From project AnySoftKeyboard, under directory /src/com/anysoftkeyboard/.

Source file: LayoutSwitchAnimationListener.java

  29 
vote

private Animation getStartAnimation(AnimationType type){
switch (type) {
case SwipeLeft:
    return mSwipeLeftAnimation;
case SwipeRight:
  return mSwipeRightAnimation;
case InPlaceSwitch:
default :
return mSwitchAnimation;
}
}
 

Example 61

From project BF3-Battlelog, under directory /src/com/ninetwozero/battlelog/activity/forum/.

Source file: ForumFragment.java

  29 
vote

@Override protected void onPreExecute(){
  if (context != null) {
    rotateAnimation=new RotateAnimation(0,359,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
    rotateAnimation.setDuration(1600);
    rotateAnimation.setRepeatCount(RotateAnimation.INFINITE);
    mWrapLoader.setVisibility(View.VISIBLE);
    mWrapLoader.findViewById(R.id.image_loader).setAnimation(rotateAnimation);
    rotateAnimation.start();
  }
}
 

Example 62

From project blokish, under directory /src/org/scoutant/blokish/.

Source file: BusyIndicator.java

  29 
vote

public BusyIndicator(Context ctx,View view){
  this.view=view;
  view.setVisibility(View.INVISIBLE);
  uiHandler=new Handler();
  this.drawable=ctx.getResources().getDrawable(R.drawable.spinner_blue_76);
  animation=new RotateAnimation(0,360,RotateAnimation.RELATIVE_TO_SELF,0.5f,RotateAnimation.RELATIVE_TO_SELF,0.5f);
  animation.setRepeatCount(Animation.INFINITE);
  final int cycles=12;
  animation.setInterpolator(new Interpolator(){
    public float getInterpolation(    float input){
      return ((int)(input * cycles)) / (float)cycles;
    }
  }
);
  animation.setDuration(1800);
  animation.setStartTime(RotateAnimation.START_ON_FIRST_FRAME);
  animation.setStartOffset(0);
}
 

Example 63

From project cornerstone, under directory /frameworks/base/services/java/com/android/server/wm/.

Source file: AppWindowToken.java

  29 
vote

public void setAnimation(Animation anim){
  if (WindowManagerService.localLOGV)   Slog.v(WindowManagerService.TAG,"Setting animation in " + this + ": "+ anim);
  animation=anim;
  animating=false;
  anim.restrictDuration(WindowManagerService.MAX_ANIMATION_DURATION);
  anim.scaleCurrentDuration(service.mTransitionAnimationScale);
  int zorder=anim.getZAdjustment();
  int adj=0;
  if (zorder == Animation.ZORDER_TOP) {
    adj=WindowManagerService.TYPE_LAYER_OFFSET;
  }
 else   if (zorder == Animation.ZORDER_BOTTOM) {
    adj=-WindowManagerService.TYPE_LAYER_OFFSET;
  }
  if (animLayerAdjustment != adj) {
    animLayerAdjustment=adj;
    updateLayers();
  }
}
 

Example 64

From project droidkit, under directory /src/org/droidkit/util/tricks/.

Source file: AnimationTricks.java

  29 
vote

public static Animation createHeightChangeAnimation(int oldHeight,int newHeight,int duration,AnimationListener listener){
  float targetScale=(float)newHeight / (float)oldHeight;
  ScaleAnimation anim=new ScaleAnimation(1,1,1.0f,targetScale);
  anim.setDuration(duration);
  anim.setAnimationListener(listener);
  return anim;
}
 

Example 65

From project external-replicaisland, under directory /src/com/replica/replicaisland/.

Source file: DifficultyMenuActivity.java

  29 
vote

public void onAnimationEnd(Animation animation){
  mBabyButton.setVisibility(View.INVISIBLE);
  mBabyButton.clearAnimation();
  mKidsButton.setVisibility(View.INVISIBLE);
  mKidsButton.clearAnimation();
  mAdultsButton.setVisibility(View.INVISIBLE);
  mAdultsButton.clearAnimation();
  startActivity(mIntent);
  finish();
  if (UIConstants.mOverridePendingTransition != null) {
    try {
      UIConstants.mOverridePendingTransition.invoke(DifficultyMenuActivity.this,R.anim.activity_fade_in,R.anim.activity_fade_out);
    }
 catch (    InvocationTargetException ite) {
      DebugLog.d("Activity Transition","Invocation Target Exception");
    }
catch (    IllegalAccessException ie) {
      DebugLog.d("Activity Transition","Illegal Access Exception");
    }
  }
}
 

Example 66

From project jamendo-android, under directory /src/com/teleca/jamendo/activity/.

Source file: SplashscreenActivity.java

  29 
vote

@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.splashscreen);
  findViewById(R.id.splashlayout);
  endAnimation=AnimationUtils.loadAnimation(this,R.anim.fade_out);
  endAnimation.setFillAfter(true);
  endAnimationHandler=new Handler();
  endAnimationRunnable=new Runnable(){
    @Override public void run(){
      findViewById(R.id.splashlayout).startAnimation(endAnimation);
    }
  }
;
  endAnimation.setAnimationListener(new AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
    @Override public void onAnimationEnd(    Animation animation){
      HomeActivity.launch(SplashscreenActivity.this);
      SplashscreenActivity.this.finish();
    }
  }
);
  showTutorial();
}
 

Example 67

From project kevoree-library, under directory /android/org.kevoree.library.android.osmdroid/src/main/java/org/osmdroid/views/.

Source file: MapView.java

  29 
vote

protected MapView(final Context context,final int tileSizePixels,final ResourceProxy resourceProxy,MapTileProviderBase tileProvider,final Handler tileRequestCompleteHandler,final AttributeSet attrs){
  super(context,attrs);
  mResourceProxy=resourceProxy;
  this.mController=new MapController(this);
  this.mScroller=new Scroller(context);
  TileSystem.setTileSize(tileSizePixels);
  if (tileProvider == null) {
    final ITileSource tileSource=getTileSourceFromAttributes(attrs);
    tileProvider=new MapTileProviderBasic(context,tileSource);
  }
  mTileRequestCompleteHandler=tileRequestCompleteHandler == null ? new SimpleInvalidationHandler(this) : tileRequestCompleteHandler;
  mTileProvider=tileProvider;
  mTileProvider.setTileRequestCompleteHandler(mTileRequestCompleteHandler);
  this.mMapOverlay=new TilesOverlay(mTileProvider,mResourceProxy);
  mOverlayManager=new OverlayManager(mMapOverlay);
  this.mZoomController=new ZoomButtonsController(this);
  this.mZoomController.setOnZoomListener(new MapViewZoomListener());
  mZoomInAnimation=new ScaleAnimation(1,2,1,2,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  mZoomOutAnimation=new ScaleAnimation(1,0.5f,1,0.5f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  mZoomInAnimation.setDuration(ANIMATION_DURATION_SHORT);
  mZoomOutAnimation.setDuration(ANIMATION_DURATION_SHORT);
  mGestureDetector=new GestureDetector(context,new MapViewGestureDetectorListener());
  mGestureDetector.setOnDoubleTapListener(new MapViewDoubleClickListener());
}