android.widget.TextView.clearAnimation()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中android.widget.TextView.clearAnimation()方法的一些代码示例,展示了TextView.clearAnimation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.clearAnimation()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:clearAnimation

TextView.clearAnimation介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

private void RunAnimation() 
{
  Animation a = AnimationUtils.loadAnimation(this, R.anim.scale);
  a.reset();
  TextView tv = (TextView) findViewById(R.id.firstTextView);
  tv.clearAnimation();
  tv.startAnimation(a);
}

代码示例来源:origin: stackoverflow.com

protected void removeBlinkingText(TextView textView) {
    textView.clearAnimation();
}

代码示例来源:origin: WiInputMethod/VE

/**
 * 隐藏光线弹片
 */
public void invisibleLightView() {
  for (int i = 0; i < mLightNum; ++i) {
    mLightView[i].clearAnimation();
    mOutLightView[i].clearAnimation();
    mLightView[i].setVisibility(View.GONE);
    mOutLightView[i].setVisibility(View.GONE);
  }
}

代码示例来源:origin: viclee2014/BarrageView

@Override
public void onAnimationEnd(Animation animation) {
  item.textView.clearAnimation();
  BarrageView.this.removeView(item.textView);
}

代码示例来源:origin: PeterCxy/Shelter

void select() {
  mSelectedIndices.add(mIndex);
  mSelectOrder.clearAnimation();
  mSelectOrder.startAnimation(AnimationUtils.loadAnimation(mView.getContext(), R.anim.scale_appear));
  showSelectOrder();
}

代码示例来源:origin: FauDroids/Bored-Rudolf

@Override
  public void run() {
    scoreView.setText(String.valueOf(score));
    scoreAnimation.reset();
    scoreView.clearAnimation();
    scoreView.startAnimation(scoreAnimation);
  }
});

代码示例来源:origin: stackoverflow.com

for(int k =0; k < 5; k++){
  handler.postDelayed(new Runnable() {
     public void run() {
       //write your code here...
       TextView tv = new TextView(TestViewActivity.this);  
       tv.setText("Text");
       tv.setTextSize(42);
       tv.setPadding(10, 0, 10, 0);
       tv.setVisibility(View.INVISIBLE);
       tv.clearAnimation();   
       tv.startAnimation(a1);
       lhsv.addView(tv, temp);
       temp++;
     }
   }, 2000 + 2000 * k);
 }

代码示例来源:origin: stackoverflow.com

for(int k =0; k < 5; k++){
  //write your code here...
            final TextView tv = new TextView(TestViewActivity.this);  
            tv.setText("Text");
            tv.setTextSize(42);
            tv.setPadding(10, 0, 10, 0);
            tv.setVisibility(View.INVISIBLE);
            tv.clearAnimation();   
            tv.startAnimation(a1);
            lhsv.addView(tv, temp);
            temp++;
       new Handler().postDelayed(new Runnable() {
          public void run() {

          }
        }, 2000);
}

代码示例来源:origin: lime-ime/limeime

private void startKeyPreviewFadeInAnimation()
{
  mKeyPreviewFadeInAnimator.reset();
  mPreviewText.clearAnimation();
  mPreviewText.startAnimation(mKeyPreviewFadeInAnimator);
}
private void startKeyPreviewFadeOutAnimation()

代码示例来源:origin: stackoverflow.com

private void RunAnimation() 
{
 Animation a = AnimationUtils.loadAnimation(this, R.anim.scale);
 a.reset();
 TextView tv = (TextView) findViewById(R.id.firstTextView);
 tv.clearAnimation();
 tv.startAnimation(a);
}

代码示例来源:origin: lime-ime/limeime

private void startKeyPreviewFadeOutAnimation()
{
  mKeyPreviewFadeOutAnimator.reset();
  mPreviewText.clearAnimation();
  mPreviewText.startAnimation(mKeyPreviewFadeOutAnimator);
}

代码示例来源:origin: stackoverflow.com

Animation a = AnimationUtils.loadAnimation(this, R.anim.alpha);
a.reset();
TextView tv = (TextView) findViewById(R.id.firstTextView);
tv.clearAnimation();
tv.startAnimation(a);

代码示例来源:origin: stackoverflow.com

private void StartAnimations() {
 Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
 anim.reset();
 TextView l=(TextView) findViewById(R.id.your_textview_id);
 l.clearAnimation();
 l.startAnimation(anim);
 }

代码示例来源:origin: PeterCxy/Shelter

void deselect() {
  mSelectedIndices.remove((Integer) mIndex);
  mSelectOrder.clearAnimation();
  setUnselectedBackground();
  Animation anim = AnimationUtils.loadAnimation(mView.getContext(), R.anim.scale_hide);
  anim.setAnimationListener(new Animation.AnimationListener() {
    @Override
    public void onAnimationStart(Animation animation) {
    }
    @Override
    public void onAnimationEnd(Animation animation) {
      if (mActionModeCancelHandler != null && mSelectedIndices.size() == 0) {
        // If there is no selection left, tell parent to cancel the action mode.
        mActionModeCancelHandler.cancelActionMode();
      }
      // The selection index of items other than this one
      // can be changed because of the removal of the current one
      // Thus, we just notify that the data set has been changed,
      // to force redraw all of them.
      notifyDataSetChanged();
    }
    @Override
    public void onAnimationRepeat(Animation animation) {
    }
  });
  mSelectOrder.startAnimation(anim);
}

代码示例来源:origin: vad-zuev/ImageDownloader

@Override
  public void onReceive(Context context, Intent intent) {
    /* our download */
    if (DL_ID == intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1L)) {
      tvStatus.clearAnimation();
      /* get the path of the downloaded file */
      DownloadManager.Query query = new DownloadManager.Query();
      query.setFilterById(DL_ID);
      Cursor cursor = dm.query(query);
      if (!cursor.moveToFirst()) {
        tvStatus.setText("Download error: cursor is empty");
        return;
      }
      if (cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))
          != DownloadManager.STATUS_SUCCESSFUL) {
        tvStatus.setText("Download failed: no success status");
        return;
      }
      String path = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
      tvStatus.setText("File download complete. Location: \n" + path);
    }
  }
};

代码示例来源:origin: drakeet/Floo

@Override
  public void onPageCommitVisible(WebView view, String url) {
    super.onPageCommitVisible(view, url);
    loading.clearAnimation();
    loading.setVisibility(View.GONE);
    view.setVisibility(View.VISIBLE);
    Animation animation = new AlphaAnimation(0.1f, 1.0f);
    animation.setDuration(800);
    view.setAnimation(animation);
    setTitle(view.getTitle());
  }
}

代码示例来源:origin: SecUSo/privacy-friendly-todo-list

initialAlert.clearAnimation();
} else {
  secondAlert.setVisibility(View.GONE);
  secondAlert.clearAnimation();

代码示例来源:origin: WiInputMethod/VE

/**
 * 给page1写的滚动函数,分为两步,第一步使控件移出,第二步由handler调用使下一页控件飞入
 *
 * @param flag X的变化值,负代表向左滑动正向右滑动
 * @param step
 */
private void scrollPage1(float flag, int step) {
  FlyAnimationFactory mFlyAnimationFactory = FlyAnimationFactory.getInstance();
  if (flag < 0) {
    if (step == 1) {
      Message msg = new Message();
      msg.arg1 = PAGE1_SCROLL_ANIMATION;
      msg.arg2 = (int) flag;
      handler.sendMessageDelayed(msg, 400);
      page1AppIcon.clearAnimation();
      page1AppIcon.startAnimation(mFlyAnimationFactory.getFlyAnimation(0f, -mScreenWidth, 0, 400, FlyAnimationFactory.FLYOUT_ANIMATION));
      page1AppTitle.clearAnimation();
      page1AppTitle.startAnimation(mFlyAnimationFactory.getFlyAnimation(0f, -mScreenWidth, 0, 300, FlyAnimationFactory.FLYOUT_ANIMATION));
      page1AppSummary.clearAnimation();
      page1AppSummary.startAnimation(mFlyAnimationFactory.getFlyAnimation(0f, -mScreenWidth, 0, 300, FlyAnimationFactory.FLYOUT_ANIMATION));
    } else {
      updateWindow();
      currentPage = 6;
    }
  }
}

代码示例来源:origin: WiInputMethod/VE

private void pageOtherToOneAnim() {
  AnimationSet as = new AnimationSet(false);
  ScaleAnimation sAnimation = new ScaleAnimation(0.0f, 1f, 0.0f, 1f,
      ScaleAnimation.RELATIVE_TO_SELF, 0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f);
  sAnimation.setDuration(700);
  sAnimation.setFillAfter(true);
  sAnimation.setInterpolator(new OvershootInterpolator());
  as.addAnimation(sAnimation);
  AlphaAnimation aAnimation = new AlphaAnimation(0f, 0.9f);
  aAnimation.setDuration(700);
  aAnimation.setFillAfter(true);
  page6FirstImageView.getBackground().setAlpha(229);
  as.addAnimation(aAnimation);
  page6FirstImageView.startAnimation(as);
  AlphaAnimation aAnimation2 = new AlphaAnimation(0f, 1f);
  aAnimation2.setDuration(700);
  page6Number.setText("1");
  page6Number.getBackground().setAlpha(255);
  page6Number.startAnimation(aAnimation2);
  page6Summary.setText(getString(R.string.guide_page6_text1));
  page6Summary.clearAnimation();
  page6Summary.startAnimation(aAnimation);
}

代码示例来源:origin: WiInputMethod/VE

private void pageOtherToTwoAnim() {
  if (currentPrepareStage != 1) {
    page6FirstImageView.getBackground().setAlpha(229);
    page6Summary.getBackground().setAlpha(255);
  }
  ScaleAnimation sAnimation = new ScaleAnimation(0.0f, 1f, 0.0f, 1f,
      ScaleAnimation.RELATIVE_TO_SELF, 0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f);
  sAnimation.setDuration(700);
  sAnimation.setStartOffset(200);
  sAnimation.setFillAfter(true);
  sAnimation.setInterpolator(new OvershootInterpolator());
  AlphaAnimation aAnimation = new AlphaAnimation(0f, 0.6f);
  aAnimation.setDuration(700);
  aAnimation.setStartOffset(200);
  aAnimation.setFillAfter(true);
  page6SecondImageView.getBackground().setAlpha(153);
  page6SecondImageView.startAnimation(aAnimation);
  page6SecondImageView.startAnimation(sAnimation);
  AlphaAnimation aAnimation2 = new AlphaAnimation(0f, 1f);
  aAnimation2.setDuration(700);
  aAnimation2.setStartOffset(200);
  page6Number.setText("2");
  page6Number.getBackground().setAlpha(255);
  page6Number.clearAnimation();
  page6Number.startAnimation(aAnimation2);
  page6Summary.clearAnimation();
  page6Summary.startAnimation(aAnimation2);
  page6Summary.setText(getString(R.string.guide_page6_text2));
}

相关文章

TextView类方法