Java Code Examples for android.view.animation.AlphaAnimation

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 androidquery, under directory /src/com/androidquery/util/.

Source file: AQUtility.java

  22 
vote

private static void setAlpha(View view,float alphaValue){
  if (alphaValue == 1) {
    view.clearAnimation();
  }
 else {
    AlphaAnimation alpha=new AlphaAnimation(alphaValue,alphaValue);
    alpha.setDuration(0);
    alpha.setFillAfter(true);
    view.startAnimation(alpha);
  }
}
 

Example 2

From project Common-Sense-Net-2, under directory /RealFarm/src/com/commonsensenet/realfarm/view/.

Source file: AdviceAdapter.java

  22 
vote

public void setDatePassed(View ll,float anim){
  AlphaAnimation alpha=new AlphaAnimation(anim,anim);
  alpha.setDuration(0);
  alpha.setFillAfter(true);
  ll.startAnimation(alpha);
}
 

Example 3

From project cow, under directory /libs/ActionBarSherlock/plugins/compat-lib/src/android/support/v4/app/.

Source file: FragmentManager.java

  22 
vote

static Animation makeOpenCloseAnimation(Context context,float startScale,float endScale,float startAlpha,float endAlpha){
  AnimationSet set=new AnimationSet(false);
  ScaleAnimation scale=new ScaleAnimation(startScale,endScale,startScale,endScale,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
  scale.setInterpolator(DECELERATE_QUINT);
  scale.setDuration(ANIM_DUR);
  set.addAnimation(scale);
  AlphaAnimation alpha=new AlphaAnimation(startAlpha,endAlpha);
  alpha.setInterpolator(DECELERATE_CUBIC);
  alpha.setDuration(ANIM_DUR);
  set.addAnimation(alpha);
  return set;
}
 

Example 4

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

Source file: AnimationTricks.java

  22 
vote

public static Animation createFadeAnimation(boolean out,int duration,AnimationListener listener){
  AlphaAnimation anim=new AlphaAnimation((out ? 1.0f : 0.0f),(out ? 0.0f : 1.0f));
  anim.setDuration(duration);
  anim.setAnimationListener(listener);
  return anim;
}
 

Example 5

From project ElectricSleep, under directory /src/com/androsz/electricsleepbeta/widget/calendar/.

Source file: Utils.java

  22 
vote

public static final void applyAlphaAnimation(ViewFlipper v){
  final AlphaAnimation in=new AlphaAnimation(0.0f,1.0f);
  in.setStartOffset(0);
  in.setDuration(500);
  final AlphaAnimation out=new AlphaAnimation(1.0f,0.0f);
  out.setStartOffset(0);
  out.setDuration(500);
  v.setInAnimation(in);
  v.setOutAnimation(out);
}
 

Example 6

From project platform_frameworks_support, under directory /v4/java/android/support/v4/app/.

Source file: FragmentManager.java

  22 
vote

static Animation makeOpenCloseAnimation(Context context,float startScale,float endScale,float startAlpha,float endAlpha){
  AnimationSet set=new AnimationSet(false);
  ScaleAnimation scale=new ScaleAnimation(startScale,endScale,startScale,endScale,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
  scale.setInterpolator(DECELERATE_QUINT);
  scale.setDuration(ANIM_DUR);
  set.addAnimation(scale);
  AlphaAnimation alpha=new AlphaAnimation(startAlpha,endAlpha);
  alpha.setInterpolator(DECELERATE_CUBIC);
  alpha.setDuration(ANIM_DUR);
  set.addAnimation(alpha);
  return set;
}
 

Example 7

From project QuickSnap, under directory /Camera/src/com/lightbox/android/camera/ui/.

Source file: AbstractIndicator.java

  22 
vote

public void setOrientation(int orientation){
  if (orientation % 90 != 0)   throw new IllegalArgumentException();
  orientation=orientation % 360;
  if (orientation < 0)   orientation+=360;
  if (mOrientation == orientation)   return;
  mOrientation=orientation;
  if (getGLRootView() != null) {
    AlphaAnimation anim=new AlphaAnimation(0.2f,1);
    anim.setDuration(200);
    startAnimation(anim);
  }
}
 

Example 8

From project ratebeer-for-Android, under directory /JakeWharton-ActionBarSherlock/library/src/android/support/v4/app/.

Source file: FragmentManager.java

  22 
vote

static Animation makeOpenCloseAnimation(Context context,float startScale,float endScale,float startAlpha,float endAlpha){
  AnimationSet set=new AnimationSet(false);
  ScaleAnimation scale=new ScaleAnimation(startScale,endScale,startScale,endScale,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
  scale.setInterpolator(DECELERATE_QUINT);
  scale.setDuration(ANIM_DUR);
  set.addAnimation(scale);
  AlphaAnimation alpha=new AlphaAnimation(startAlpha,endAlpha);
  alpha.setInterpolator(DECELERATE_CUBIC);
  alpha.setDuration(ANIM_DUR);
  set.addAnimation(alpha);
  return set;
}
 

Example 9

From project ratebeerforandroid, under directory /JakeWharton-ActionBarSherlock/library/src/android/support/v4/app/.

Source file: FragmentManager.java

  22 
vote

static Animation makeOpenCloseAnimation(Context context,float startScale,float endScale,float startAlpha,float endAlpha){
  AnimationSet set=new AnimationSet(false);
  ScaleAnimation scale=new ScaleAnimation(startScale,endScale,startScale,endScale,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
  scale.setInterpolator(DECELERATE_QUINT);
  scale.setDuration(ANIM_DUR);
  set.addAnimation(scale);
  AlphaAnimation alpha=new AlphaAnimation(startAlpha,endAlpha);
  alpha.setInterpolator(DECELERATE_CUBIC);
  alpha.setDuration(ANIM_DUR);
  set.addAnimation(alpha);
  return set;
}
 

Example 10

From project Ushahidi_Android, under directory /Libraries/abs/src/android/support/v4/app/.

Source file: FragmentManager.java

  22 
vote

static Animation makeOpenCloseAnimation(Context context,float startScale,float endScale,float startAlpha,float endAlpha){
  AnimationSet set=new AnimationSet(false);
  ScaleAnimation scale=new ScaleAnimation(startScale,endScale,startScale,endScale,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
  scale.setInterpolator(DECELERATE_QUINT);
  scale.setDuration(ANIM_DUR);
  set.addAnimation(scale);
  AlphaAnimation alpha=new AlphaAnimation(startAlpha,endAlpha);
  alpha.setInterpolator(DECELERATE_CUBIC);
  alpha.setDuration(ANIM_DUR);
  set.addAnimation(alpha);
  return set;
}
 

Example 11

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

Source file: LockableActivity.java

  21 
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 12

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

Source file: VideoCamera.java

  21 
vote

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

Example 13

From project andstatus, under directory /src/org/andstatus/app/.

Source file: SplashMoreActivity.java

  21 
vote

@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.splash_more);
  mFlipper=((ViewFlipper)this.findViewById(R.id.splash_more_flipper));
  AlphaAnimation anim=(AlphaAnimation)AnimationUtils.loadAnimation(SplashMoreActivity.this,R.anim.fade_in);
  findViewById(R.id.splash_container).startAnimation(anim);
  final Button getstarted=(Button)findViewById(R.id.button_splash_get_started);
  getstarted.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      startActivity(new Intent(SplashMoreActivity.this,PreferencesActivity.class));
      finish();
    }
  }
);
  final Button learn_more=(Button)findViewById(R.id.button_splash_learn_more);
  learn_more.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      mFlipper.showNext();
    }
  }
);
}
 

Example 14

From project andtweet, under directory /src/com/xorcode/andtweet/.

Source file: SplashMoreActivity.java

  21 
vote

@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.splash_more);
  mFlipper=((ViewFlipper)this.findViewById(R.id.splash_more_flipper));
  AlphaAnimation anim=(AlphaAnimation)AnimationUtils.loadAnimation(SplashMoreActivity.this,R.anim.fade_in);
  findViewById(R.id.splash_container).startAnimation(anim);
  final Button getstarted=(Button)findViewById(R.id.button_splash_get_started);
  getstarted.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      startActivity(new Intent(SplashMoreActivity.this,PreferencesActivity.class));
      finish();
    }
  }
);
  final Button learn_more=(Button)findViewById(R.id.button_splash_learn_more);
  learn_more.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      mFlipper.showNext();
    }
  }
);
}
 

Example 15

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

Source file: GameSetup.java

  21 
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 16

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

Source file: ViewComments.java

  21 
vote

public void hideModerationBar(){
  AnimationSet set=new AnimationSet(true);
  Animation animation=new AlphaAnimation(1.0f,0.0f);
  animation.setDuration(500);
  set.addAnimation(animation);
  animation=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,1.0f);
  animation.setDuration(500);
  set.addAnimation(animation);
  RelativeLayout moderationBar=(RelativeLayout)getActivity().findViewById(R.id.moderationBar);
  moderationBar.clearAnimation();
  moderationBar.startAnimation(set);
  moderationBar.setVisibility(View.INVISIBLE);
}
 

Example 17

From project maven-android-plugin-samples, under directory /apidemos-android-10/application/src/main/java/com/example/android/apis/view/.

Source file: LayoutAnimation2.java

  21 
vote

@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,mStrings));
  AnimationSet set=new AnimationSet(true);
  Animation animation=new AlphaAnimation(0.0f,1.0f);
  animation.setDuration(50);
  set.addAnimation(animation);
  animation=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0.0f);
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller=new LayoutAnimationController(set,0.5f);
  ListView listView=getListView();
  listView.setLayoutAnimation(controller);
}
 

Example 18

From project MIT-Mobile-for-Android, under directory /src/edu/mit/mitmobile2/.

Source file: AnimationHelper.java

  21 
vote

public static Animation fadeIn(){
  Animation fadein=new AlphaAnimation(0.0f,+1.0f);
  fadein.setDuration(DURATION);
  fadein.setInterpolator(new DecelerateInterpolator());
  return fadein;
}
 

Example 19

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

Source file: Util.java

  21 
vote

public static void fadeIn(View view){
  if (view.getVisibility() == View.VISIBLE)   return;
  view.setVisibility(View.VISIBLE);
  Animation animation=new AlphaAnimation(0F,1F);
  animation.setDuration(400);
  view.startAnimation(animation);
}
 

Example 20

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

Source file: Util.java

  21 
vote

public static void fadeIn(View view){
  if (view.getVisibility() == View.VISIBLE)   return;
  view.setVisibility(View.VISIBLE);
  Animation animation=new AlphaAnimation(0F,1F);
  animation.setDuration(400);
  view.startAnimation(animation);
}
 

Example 21

From project packages_apps_Phone_1, under directory /src/com/android/phone/.

Source file: InCallTouchUi.java

  21 
vote

/** 
 * Apply an animation to hide the incoming call widget.
 */
private void hideIncomingCallWidget(){
  if (DBG)   log("hideIncomingCallWidget()...");
  if (mIncomingCallWidget.getVisibility() != View.VISIBLE || mIncomingCallWidget.getAnimation() != null) {
    return;
  }
  AlphaAnimation anim=new AlphaAnimation(1.0f,0.0f);
  anim.setDuration(IN_CALL_WIDGET_TRANSITION_TIME);
  anim.setAnimationListener(new AnimationListener(){
    public void onAnimationStart(    Animation animation){
    }
    public void onAnimationRepeat(    Animation animation){
    }
    public void onAnimationEnd(    Animation animation){
      mIncomingCallWidget.clearAnimation();
      mIncomingCallWidget.setVisibility(View.GONE);
    }
  }
);
  mIncomingCallWidget.startAnimation(anim);
}
 

Example 22

From project PinyinIME, under directory /src/com/android/inputmethod/pinyin/.

Source file: CandidatesContainer.java

  21 
vote

private Animation createAnimation(float xFrom,float xTo,float yFrom,float yTo,float alphaFrom,float alphaTo,long duration){
  AnimationSet animSet=new AnimationSet(getContext(),null);
  Animation trans=new TranslateAnimation(Animation.RELATIVE_TO_SELF,xFrom,Animation.RELATIVE_TO_SELF,xTo,Animation.RELATIVE_TO_SELF,yFrom,Animation.RELATIVE_TO_SELF,yTo);
  Animation alpha=new AlphaAnimation(alphaFrom,alphaTo);
  animSet.addAnimation(trans);
  animSet.addAnimation(alpha);
  animSet.setDuration(duration);
  return animSet;
}
 

Example 23

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

Source file: Util.java

  21 
vote

public static void fadeIn(View view,float startAlpha,float endAlpha,long duration){
  if (view.getVisibility() == View.VISIBLE)   return;
  view.setVisibility(View.VISIBLE);
  Animation animation=new AlphaAnimation(startAlpha,endAlpha);
  animation.setDuration(duration);
  view.startAnimation(animation);
}
 

Example 24

From project platform_packages_apps_CytownPhone, under directory /src/com/android/phone/.

Source file: InCallTouchUi.java

  21 
vote

/** 
 * Apply an animation to hide the incoming call widget.
 */
private void hideIncomingCallWidget(){
  if (mUseRotaryInCall || mUseRotaryRevInCall) {
    if (mIncomingRotarySelectorCallWidget.getVisibility() != View.VISIBLE || mIncomingRotarySelectorCallWidget.getAnimation() != null) {
      return;
    }
  }
 else {
    if (mIncomingSlidingTabCallWidget.getVisibility() != View.VISIBLE || mIncomingSlidingTabCallWidget.getAnimation() != null) {
      return;
    }
  }
  AlphaAnimation anim=new AlphaAnimation(1.0f,0.0f);
  anim.setDuration(IN_CALL_WIDGET_TRANSITION_TIME);
  anim.setAnimationListener(new AnimationListener(){
    public void onAnimationStart(    Animation animation){
    }
    public void onAnimationRepeat(    Animation animation){
    }
    public void onAnimationEnd(    Animation animation){
      if (mUseRotaryInCall || mUseRotaryRevInCall) {
        mIncomingRotarySelectorCallWidget.clearAnimation();
        mIncomingRotarySelectorCallWidget.setVisibility(View.GONE);
      }
 else {
        mIncomingSlidingTabCallWidget.clearAnimation();
        mIncomingSlidingTabCallWidget.setVisibility(View.GONE);
      }
    }
  }
);
  if (mUseRotaryInCall || mUseRotaryRevInCall) {
    mIncomingRotarySelectorCallWidget.startAnimation(anim);
  }
 else {
    mIncomingSlidingTabCallWidget.startAnimation(anim);
  }
}
 

Example 25

From project ToolkitForAndroid, under directory /src/main/java/com/apkits/android/system/.

Source file: SplashActivity.java

  21 
vote

@Override public void handleMessage(Message msg){
  if (msg.what == Signal.LOADING) {
    int resId=msg.arg1;
    int startAlpha=msg.arg2;
    AlphaAnimation animation=new AlphaAnimation(converToAlpha(startAlpha),1.0f);
    animation.setDuration(mDuration);
    mSplashStage.setImageResource(resId);
    mSplashStage.startAnimation(animation);
  }
 else {
    shouldSkipToNext();
    mBaseInfo.self.startActivity(new Intent(mBaseInfo.self,nextActivity()));
    mBaseInfo.self.finish();
  }
  super.handleMessage(msg);
}
 

Example 26

From project uberdust-android, under directory /src/eu/uberdust/mobileclient/.

Source file: AboutActivity.java

  21 
vote

public void onImage(View v){
  AnimationSet animationSet=new AnimationSet(true);
  RotateAnimation rotateAnimation=new RotateAnimation(0,360,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  rotateAnimation.setDuration(500);
  rotateAnimation.setRepeatCount(2);
  animationSet.addAnimation(rotateAnimation);
  TranslateAnimation translateAnimation=new TranslateAnimation(0,400,0,0);
  translateAnimation.setStartOffset(500);
  translateAnimation.setDuration(1000);
  animationSet.addAnimation(translateAnimation);
  AlphaAnimation alphaAnimation=new AlphaAnimation(1,0);
  alphaAnimation.setStartOffset(500);
  alphaAnimation.setDuration(1000);
  animationSet.addAnimation(alphaAnimation);
  v.startAnimation(animationSet);
}
 

Example 27

From project Wordpress-Android-App, under directory /src/org/wordpress/android/.

Source file: ViewComments.java

  21 
vote

public void hideModerationBar(){
  AnimationSet set=new AnimationSet(true);
  Animation animation=new AlphaAnimation(1.0f,0.0f);
  animation.setDuration(500);
  set.addAnimation(animation);
  animation=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,1.0f);
  animation.setDuration(500);
  set.addAnimation(animation);
  RelativeLayout moderationBar=(RelativeLayout)getActivity().findViewById(R.id.moderationBar);
  moderationBar.clearAnimation();
  moderationBar.startAnimation(set);
  moderationBar.setVisibility(View.INVISIBLE);
}
 

Example 28

From project zirco-browser, under directory /src/org/zirco/ui/activities/.

Source file: AdBlockerWhiteListActivity.java

  21 
vote

/** 
 * Set the view loading animation.
 */
private void setAnimation(){
  AnimationSet set=new AnimationSet(true);
  Animation animation=new AlphaAnimation(0.0f,1.0f);
  animation.setDuration(100);
  set.addAnimation(animation);
  animation=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0.0f);
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller=new LayoutAnimationController(set,0.5f);
  ListView listView=getListView();
  listView.setLayoutAnimation(controller);
}
 

Example 29

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 30

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 31

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 32

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 33

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 34

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

Source file: CardRunner.java

  20 
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 35

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

Source file: GatherFramesActivity.java

  20 
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 36

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 37

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

Source file: PlayQueue.java

  20 
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 38

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 39

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

Source file: ViewImageActivity.java

  20 
vote

@Override protected void onPostExecute(Integer result){
switch (result) {
case RESULT_SUCCESS:
    Bitmap bitmap=D.getBitmapFromFile(file);
  if (bitmap != null) {
    image.setImageBitmapReset(bitmap,true);
    image.setScaleType(ScaleType.MATRIX);
  }
 else   Toast.makeText(image.getContext(),R.string.view_image_download_failed,Toast.LENGTH_SHORT).show();
break;
case RESULT_FAILED:
Toast.makeText(image.getContext(),R.string.view_image_download_failed,Toast.LENGTH_SHORT).show();
break;
case RESULT_CANCELLED:
Toast.makeText(image.getContext(),R.string.view_image_user_canceled,Toast.LENGTH_SHORT).show();
break;
}
Animation anim=new AlphaAnimation(1.0f,0.0f);
anim.setDuration(500);
progress_indicator.startAnimation(anim);
progress_indicator.postDelayed(new Runnable(){
@Override public void run(){
progress_indicator.setVisibility(View.GONE);
}
}
,500);
activity.loader=null;
}
 

Example 40

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 41

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 42

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 43

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

Source file: ViewUtils.java

  20 
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 44

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 45

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 46

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 47

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 48

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 49

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 50

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 51

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 52

From project madvertise-android-sdk, under directory /madvertiseSDK/src/de/madvertise/android/sdk/.

Source file: MadvertiseView.java

  20 
vote

private Animation createAnimation(final boolean isOutAnimation){
  Animation animation=null;
  if (isOutAnimation) {
    if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_FADE)) {
      animation=new AlphaAnimation(1.0f,0.0f);
      animation.setDuration(700);
    }
 else     if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_LEFT_TO_RIGHT)) {
      animation=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);
      animation.setDuration(900);
      animation.setInterpolator(new AccelerateInterpolator());
    }
 else     if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_TOP_DOWN)) {
      animation=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,1.0f);
      animation.setDuration(900);
      animation.setInterpolator(new AccelerateInterpolator());
    }
  }
 else {
    if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_FADE)) {
      animation=new AlphaAnimation(0.0f,1.0f);
      animation.setDuration(1200);
    }
 else     if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_LEFT_TO_RIGHT)) {
      animation=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);
      animation.setDuration(900);
      animation.setInterpolator(new AccelerateInterpolator());
    }
 else     if (mAnimationType != null && mAnimationType.equals(MadvertiseUtil.ANIMATION_TYPE_TOP_DOWN)) {
      animation=new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,0.0f,Animation.RELATIVE_TO_PARENT,-1.0f,Animation.RELATIVE_TO_PARENT,0.0f);
      animation.setDuration(900);
      animation.setInterpolator(new AccelerateInterpolator());
    }
  }
  return animation;
}
 

Example 53

From project MensaUPB, under directory /libs/ActionbarSherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 54

From project mWater-Android-App, under directory /android/actionbarsherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 55

From project MyHeath-Android, under directory /actionbarlib/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 56

From project onebusaway-android, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 57

From project open311-android, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 58

From project Orweb, under directory /src/info/guardianproject/browser/.

Source file: BrowserWebView.java

  20 
vote

private synchronized void setBlockedCookiesViewShowing(boolean show){
  if (mBlockedCookiesView == null)   return;
  Animation a=null;
  if (show) {
    mBlockedCookiesViewShowing=true;
    mBlockedCookiesView.setVisibility(View.VISIBLE);
    a=new AlphaAnimation(0.0f,1.0f);
  }
 else {
    mBlockedCookiesViewShowing=false;
    a=new AlphaAnimation(1.0f,0.0f);
    a.setAnimationListener(this);
  }
  a.setDuration(ANIMATION_DURATION);
  mBlockedCookiesView.startAnimation(a);
}
 

Example 59

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

Source file: ViewImage.java

  20 
vote

private void hideOnScreenControls(){
  if (mShowActionIcons && mActionIconPanel.getVisibility() == View.VISIBLE) {
    Animation animation=new AlphaAnimation(1,0);
    animation.setDuration(500);
    mActionIconPanel.startAnimation(animation);
    mActionIconPanel.setVisibility(View.INVISIBLE);
  }
  if (mNextImageView.getVisibility() == View.VISIBLE) {
    Animation a=mHideNextImageViewAnimation;
    a.setDuration(500);
    mNextImageView.startAnimation(a);
    mNextImageView.setVisibility(View.INVISIBLE);
  }
  if (mPrevImageView.getVisibility() == View.VISIBLE) {
    Animation a=mHidePrevImageViewAnimation;
    a.setDuration(500);
    mPrevImageView.startAnimation(a);
    mPrevImageView.setVisibility(View.INVISIBLE);
  }
  mZoomButtonsController.setVisible(false);
}
 

Example 60

From project RA_Launcher, under directory /src/com/android/ra/launcher/.

Source file: DeleteZone.java

  20 
vote

private void createAnimations(){
  if (mInAnimation == null) {
    mInAnimation=new FastAnimationSet();
    final AnimationSet animationSet=mInAnimation;
    animationSet.setInterpolator(new AccelerateInterpolator());
    animationSet.addAnimation(new AlphaAnimation(0.0f,1.0f));
    if (mOrientation == ORIENTATION_HORIZONTAL) {
      animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,1.0f,Animation.RELATIVE_TO_SELF,0.0f));
    }
 else {
      animationSet.addAnimation(new TranslateAnimation(Animation.RELATIVE_TO_SELF,1.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f));
    }
    animationSet.setDuration(ANIMATION_DURATION);
  }
  if (mHandleInAnimation == null) {
    mHandleInAnimation=new AlphaAnimation(0.0f,1.0f);
    mHandleInAnimation.setDuration(ANIMATION_DURATION);
  }
  if (mOutAnimation == null) {
    mOutAnimation=new FastAnimationSet();
    final AnimationSet animationSet=mOutAnimation;
    animationSet.setInterpolator(new AccelerateInterpolator());
    animationSet.addAnimation(new AlphaAnimation(1.0f,0.0f));
    if (mOrientation == ORIENTATION_HORIZONTAL) {
      animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,1.0f));
    }
 else {
      animationSet.addAnimation(new FastTranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,1.0f,Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f));
    }
    animationSet.setDuration(ANIMATION_DURATION);
  }
  if (mHandleOutAnimation == null) {
    mHandleOutAnimation=new AlphaAnimation(1.0f,0.0f);
    mHandleOutAnimation.setFillAfter(true);
    mHandleOutAnimation.setDuration(ANIMATION_DURATION);
  }
}
 

Example 61

From project RebeLauncher, under directory /src/com/dirtypepper/rebelauncher/.

Source file: DeleteZone.java

  20 
vote

private void createAnimations(){
  if (mInAnimation == null) {
    mInAnimation=new FastAnimationSet();
    final AnimationSet animationSet=mInAnimation;
    animationSet.setInterpolator(new AccelerateInterpolator());
    animationSet.addAnimation(new AlphaAnimation(0.0f,1.0f));
    if (mPosition == POSITION_TOP) {
      animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0.0f));
    }
 else {
      animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,1.0f,Animation.RELATIVE_TO_SELF,0.0f));
    }
    animationSet.setDuration(ANIMATION_DURATION);
  }
  if (mOutAnimation == null) {
    mOutAnimation=new FastAnimationSet();
    final AnimationSet animationSet=mOutAnimation;
    animationSet.setInterpolator(new AccelerateInterpolator());
    animationSet.addAnimation(new AlphaAnimation(1.0f,0.0f));
    if (mPosition == POSITION_TOP) {
      animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,-1.0f));
    }
 else {
      animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE,0.0f,Animation.ABSOLUTE,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,1.0f));
    }
    animationSet.setDuration(ANIMATION_DURATION);
  }
}
 

Example 62

From project roman10-android-tutorial, under directory /pagedview/src/roman10/imageviewer/.

Source file: Viewer2.java

  20 
vote

public void run(){
  if (mEnableMenu == false) {
    if (menu_shown == 0) {
    }
 else {
      Animation hideBtnAnimation=new AlphaAnimation(1F,0F);
      hideBtnAnimation.setDuration(1000);
      footbar.startAnimation(hideBtnAnimation);
      footbar.setVisibility(View.GONE);
      menu_shown=0;
    }
    mMenuHandler.removeCallbacks(this);
    return;
  }
  if (mEnableMenu == true) {
    if (menu_shown == 1) {
      mEnableMenu=false;
    }
 else {
      footbar.setVisibility(View.VISIBLE);
      mEnableMenu=false;
      menu_shown=1;
    }
  }
  mMenuHandler.postDelayed(this,3000);
}
 

Example 63

From project Schedule, under directory /libs/android/sherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 64

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 65

From project SMSSync, under directory /abslib/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 66

From project Something-Awful-Android, under directory /libraries/Sherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 67

From project The-Reverse-Recipe-Book, under directory /actionbarsherlock4.0/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 68

From project Unibeer, under directory /libs/sherlock/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 69

From project Wifileaks, under directory /WifiLeaks/ABS/library/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 70

From project wsdot-android-app, under directory /src/gov/wa/wsdot/android/wsdot/.

Source file: MainMenu.java

  20 
vote

@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  analyticsTracker();
  setContentView(R.layout.main);
  prepareMenu();
  String[] keys=actions.keySet().toArray(new String[actions.keySet().size()]);
  setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,keys));
  AnimationSet set=new AnimationSet(true);
  Animation animation=new AlphaAnimation(0.0f,1.0f);
  animation.setDuration(50);
  set.addAnimation(animation);
  animation=new TranslateAnimation(Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0.0f);
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller=new LayoutAnimationController(set,0.5f);
  ListView listView=getListView();
  listView.setLayoutAnimation(controller);
}
 

Example 71

From project XTrade, under directory /sherlock-bar/src/com/actionbarsherlock/internal/widget/.

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}
 

Example 72

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

Source file: IcsProgressBar.java

  20 
vote

/** 
 * <p>Start the indeterminate progress animation.</p>
 */
void startAnimation(){
  if (getVisibility() != VISIBLE) {
    return;
  }
  if (mIndeterminateDrawable instanceof Animatable) {
    mShouldStartAnimationDrawable=true;
    mAnimation=null;
  }
 else {
    if (mInterpolator == null) {
      mInterpolator=new LinearInterpolator();
    }
    mTransformation=new Transformation();
    mAnimation=new AlphaAnimation(0.0f,1.0f);
    mAnimation.setRepeatMode(mBehavior);
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setDuration(mDuration);
    mAnimation.setInterpolator(mInterpolator);
    mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
  }
  postInvalidate();
}