java类android.view.animation.LayoutAnimationController的实例源码

MainActivity.java 文件源码 项目:Synapse 阅读 24 收藏 0 点赞 0 评论 0
private void solveData() {
    mButler.clear();

    final boolean ready = isDataSetReady();

    if (ready) {
        final LayoutAnimationController controller =
                AnimationUtils.loadLayoutAnimation(this, R.anim.layout_animation_from_bottom);

        mRecyclerView.setLayoutAnimation(controller);
        mRecyclerView.scheduleLayoutAnimation();

        dataSetReady();
    } else {
        dataSetUnready();
    }
}
ProjectListFragment.java 文件源码 项目:phonk 阅读 26 收藏 0 点赞 0 评论 0
public void loadFolder(String folder) {
    clear();

    mProjectFolder = folder;

    mListProjects = PhonkScriptHelper.listProjects(mProjectFolder, mOrderByName);
    mProjectAdapter.setArray(mListProjects);
    mGrid.setAdapter(mProjectAdapter);
    // mGrid.clearAnimation();
    // mGrid.startAnimation(mAnim);

    notifyAddedProject();

    final Context context = mGrid.getContext();
    final LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(context, R.anim.fav_grid_anim);

    mGrid.setLayoutAnimation(controller);
    mGrid.getAdapter().notifyDataSetChanged();
    mGrid.scheduleLayoutAnimation();

    MLog.d(TAG, "loading " + mProjectFolder);
}
StaggeredGridActivity.java 文件源码 项目:RecyclerViewAnimation 阅读 22 收藏 0 点赞 0 评论 0
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main_grid);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    mRecyclerView = (StaggeredGridRecyclerView) findViewById(R.id.recycler_view);
    mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
    mStaggeredGridAdapter = new StaggeredGridAdapter();
    mStaggeredGridAdapter.setDataSet(mockData());
    mRecyclerView.setAdapter(mStaggeredGridAdapter);
    LayoutAnimationController controller = MyLayoutAnimationHelper.makeLayoutAnimationController();
    ViewGroup viewGroup = (ViewGroup) findViewById(R.id.root_view);
    viewGroup.setLayoutAnimation(controller);
    viewGroup.scheduleLayoutAnimation();
}
MyRank.java 文件源码 项目:Shared-Route 阅读 32 收藏 0 点赞 0 评论 0
@Override
protected void onPostExecute(Void aVoid) {
    super.onPostExecute(aVoid);
    if (itemList.size() == 0) Toast.makeText(MyRank.this, "发生未知错误",Toast.LENGTH_SHORT).show();
    RecyclerView rankList = findViewById(R.id.rank_list);
    ReleaseRankItemAdapter adapter = new ReleaseRankItemAdapter(itemList);
    GridLayoutManager layoutManager = new GridLayoutManager(MyRank.this, 1);
    rankList.setLayoutManager(layoutManager);
    rankList.setAdapter(adapter);

    TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
            0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
    animation.setInterpolator(new DecelerateInterpolator());
    animation.setDuration(550);

    lac = new LayoutAnimationController(animation, 0.12f);
    lac.setInterpolator(new DecelerateInterpolator());
    rankList.setLayoutAnimation(lac);

    RecyclerView ranklist1 = findViewById(R.id.rank_list1);
    ReleaseRankItemAdapter adapter1 = new ReleaseRankItemAdapter(itemListOthers);
    GridLayoutManager layoutManager1 = new GridLayoutManager(MyRank.this,1);
    ranklist1.setLayoutManager(layoutManager1);
    ranklist1.setAdapter(adapter1);
    ranklist1.setLayoutAnimation(lac);
}
MyArticleTypeFragment.java 文件源码 项目:LLApp 阅读 22 收藏 0 点赞 0 评论 0
@Override
protected void onInitView() {
    mSwipeRefreshLayout.setColorSchemeResources(
            R.color.username1,
            R.color.username2,
            R.color.username3,
            R.color.username4,
            R.color.username5,
            R.color.username6);
    mSwipeRefreshLayout.setOnRefreshListener(this);

    mAdapter = new CategoryAdapter(getContext(),R.layout.category_item,mDatas);

    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRecyclerView.addItemDecoration(new RecycleViewDivider(getActivity(), LinearLayoutManager.HORIZONTAL));
    mRecyclerView.setAdapter(mAdapter);
    mRecyclerView.setOnLoadMoreListener(this);
    mRecyclerView.setEmpty();
    LayoutAnimationController lac = new LayoutAnimationController(AnimationUtils.loadAnimation(getContext(),R.anim.fade_in));
    lac.setOrder(LayoutAnimationController.ORDER_NORMAL);
    mRecyclerView.setLayoutAnimation(lac);
    mRecyclerView.startLayoutAnimation();

    getData(true);

}
AppLockFragment2.java 文件源码 项目:Mobile-guards 阅读 27 收藏 0 点赞 0 评论 0
/**
 * ListView节点出现动画
 *
 * @return
 */
protected LayoutAnimationController getAnimationController() {
    int duration = 300;
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(duration);
    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(duration);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
AppLockFragment1.java 文件源码 项目:Mobile-guards 阅读 22 收藏 0 点赞 0 评论 0
/**
 * ListView节点出现动画
 *
 * @return
 */
protected LayoutAnimationController getAnimationController() {
    int duration = 300;
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(duration);
    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(duration);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
BlacklistByBatchesActivity.java 文件源码 项目:Mobile-guards 阅读 26 收藏 0 点赞 0 评论 0
/**
 * ListView节点出现动画
 *
 * @return
 */
protected LayoutAnimationController getAnimationController() {
    int duration = 300;
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(duration);
    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(duration);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
MenuAnimationUtils.java 文件源码 项目:AndroidTVWidget 阅读 29 收藏 0 点赞 0 评论 0
/**
   * 加载动画.
   */
  @SuppressWarnings("ResourceType")
  public static LayoutAnimationController loadAnimation(Context context) {
/*
 * 创建动画的集合
 */
      AnimationSet set = new AnimationSet(false);
      Animation animation;
/*
 * 创建旋转动画
 */
      animation = new RotateAnimation(180, 10);
      animation.setDuration(1000);
      set.addAnimation(animation);

      LayoutAnimationController controller = new LayoutAnimationController(set, 1);
      controller.setInterpolator(context, android.R.anim.accelerate_interpolator);
      controller.setAnimation(set);
      return controller;
  }
MenuAnimationUtils.java 文件源码 项目:AndroidTVWidget 阅读 30 收藏 0 点赞 0 评论 0
/**
 * 加载动画2.
 */
public static LayoutAnimationController loadAnimation2() {
    int duration = 300;
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(duration);
    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(duration);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
ReportFragment.java 文件源码 项目:flowzr-android-black 阅读 38 收藏 0 点赞 0 评论 0
private void applyAnimationToListView() {
    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);
}
WeaveBookmarksListActivity.java 文件源码 项目:gaeproxy 阅读 27 收藏 0 点赞 0 评论 0
/**
 * Set the list loading animation.
 */
private void setAnimation() {
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(75);
    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(50);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(
            set, 0.5f);

    mListView.setLayoutAnimation(controller);
}
BookmarksListActivity.java 文件源码 项目:gaeproxy 阅读 25 收藏 0 点赞 0 评论 0
/**
 * Set the list 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);

    mList.setLayoutAnimation(controller);
}
AdBlockerWhiteListActivity.java 文件源码 项目:gaeproxy 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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);
}
MobileViewListActivity.java 文件源码 项目:gaeproxy 阅读 25 收藏 0 点赞 0 评论 0
/**
 * 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);
}
MenuAnimationUtils.java 文件源码 项目:Android-tv-widget 阅读 32 收藏 0 点赞 0 评论 0
/**
   * 加载动画.
   */
  @SuppressWarnings("ResourceType")
  public static LayoutAnimationController loadAnimation(Context context) {
/*
 * 创建动画的集合
 */
      AnimationSet set = new AnimationSet(false);
      Animation animation;
/*
 * 创建旋转动画
 */
      animation = new RotateAnimation(180, 10);
      animation.setDuration(1000);
      set.addAnimation(animation);

      LayoutAnimationController controller = new LayoutAnimationController(set, 1);
      controller.setInterpolator(context, android.R.anim.accelerate_interpolator);
      controller.setAnimation(set);
      return controller;
  }
MenuAnimationUtils.java 文件源码 项目:Android-tv-widget 阅读 30 收藏 0 点赞 0 评论 0
/**
 * 加载动画2.
 */
public static LayoutAnimationController loadAnimation2() {
    int duration = 300;
    AnimationSet set = new AnimationSet(true);

    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(duration);
    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(duration);
    set.addAnimation(animation);

    LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
XMLInflaterRegistry.java 文件源码 项目:itsnat_droid 阅读 33 收藏 0 点赞 0 评论 0
public LayoutAnimationController getLayoutAnimation(ResourceDesc resourceDesc, XMLInflaterContext xmlInflaterContext)
{
    if (resourceDesc instanceof ResourceDescDynamic)
    {
        ResourceDescDynamic resourceDescDyn = (ResourceDescDynamic)resourceDesc;
        if (resourceDescDyn.getValuesResourceName() != null)
        {
            ElementValuesResources elementResources = getElementValuesResources(resourceDescDyn, xmlInflaterContext);
            return elementResources.getLayoutAnimation(resourceDescDyn.getValuesResourceName(), xmlInflaterContext);
        }
        else
        {
            return getLayoutAnimationDynamicFromXML(resourceDescDyn,xmlInflaterContext);
        }
    }
    else if (resourceDesc instanceof ResourceDescCompiled)
    {
        Context ctx = xmlInflaterContext.getContext();
        String resourceDescValue = resourceDesc.getResourceDescValue();
        return getLayoutAnimationCompiled(resourceDescValue, ctx);
    }
    else throw MiscUtil.internalError();
}
XMLInflaterRegistry.java 文件源码 项目:itsnat_droid 阅读 38 收藏 0 点赞 0 评论 0
private LayoutAnimationController getLayoutAnimationDynamicFromXML(ResourceDescDynamic resourceDescDyn, XMLInflaterContext xmlInflaterContext)
{
    if (resourceDescDyn.getValuesResourceName() != null) throw MiscUtil.internalError();

    Context ctx = xmlInflaterContext.getContext();

    int bitmapDensityReference = xmlInflaterContext.getBitmapDensityReference();

    AttrResourceInflaterListener attrResourceInflaterListener = xmlInflaterContext.getAttrResourceInflaterListener();

    // Esperamos un LayoutAnimationController
    PageImpl page = xmlInflaterContext.getPageImpl(); // Puede ser null

    if (resourceDescDyn instanceof ResourceDescRemote && page == null) throw MiscUtil.internalError(); // Si es remote hay page por medio

    ParsedResourceXMLDOM resource = (ParsedResourceXMLDOM) resourceDescDyn.getParsedResource();
    if (resource == null)
        throw new ItsNatDroidException("Resource is still not loaded, if remote resource maybe you should use an attribute with namespace " + NamespaceUtil.XMLNS_ITSNATDROID_RESOURCE + " for manual load declaration");
    XMLDOMLayoutAnimation xmlDOMLayoutAnimation = (XMLDOMLayoutAnimation) resource.getXMLDOM();
    InflatedXMLLayoutAnimation inflatedLayoutAnimation = InflatedXMLLayoutAnimation.createInflatedLayoutAnimation(itsNatDroid, xmlDOMLayoutAnimation, ctx, page);

    XMLInflaterLayoutAnimation xmlInflaterLayoutAnimation = XMLInflaterLayoutAnimation.createXMLInflaterLayoutAnimation(inflatedLayoutAnimation, bitmapDensityReference, attrResourceInflaterListener);
    return xmlInflaterLayoutAnimation.inflateLayoutAnimation();
}
ValidatorFragment.java 文件源码 项目:rootvalidator 阅读 27 收藏 0 点赞 0 评论 0
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    AnimationSet set = new AnimationSet(true);
    Animation fadeIn = new AlphaAnimation(0.0f, 1.0f);
    fadeIn.setDuration(350);
    set.addAnimation(fadeIn);
    Animation dropDown = new TranslateAnimation(
            Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f,
            Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f
    );
    dropDown.setDuration(400);
    set.addAnimation(dropDown);
    LayoutAnimationController controller = new LayoutAnimationController(set, 0.2f);
    mRecyclerView.setLayoutAnimation(controller);

    mFab.attachToRecyclerView(mRecyclerView);
    mFab.setVisibility(View.INVISIBLE);
    mEmptyStartView.setVisibility(View.GONE);
    mEmptyWorkingView.setVisibility(View.GONE);
    mListContainer.addView(mEmptyStartView);
    mListContainer.addView(mEmptyWorkingView);
    mRecyclerView.setEmptyView(mEmptyStartView);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
}
LayoutAnimation2.java 文件源码 项目:ApkLauncher 阅读 23 收藏 0 点赞 0 评论 0
@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);
}
LayoutAnimation2.java 文件源码 项目:ApiDemos 阅读 28 收藏 0 点赞 0 评论 0
@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);
}
WeaveBookmarksListActivity.java 文件源码 项目:zirco-browser 阅读 25 收藏 0 点赞 0 评论 0
/**
* Set the list loading animation.
*/
  private void setAnimation() {
    AnimationSet set = new AnimationSet(true);

      Animation animation = new AlphaAnimation(0.0f, 1.0f);
      animation.setDuration(75);
      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(50);
      set.addAnimation(animation);

      LayoutAnimationController controller =
              new LayoutAnimationController(set, 0.5f);

      mListView.setLayoutAnimation(controller);
  }
BookmarksListActivity.java 文件源码 项目:zirco-browser 阅读 24 收藏 0 点赞 0 评论 0
/**
* Set the list 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);

      mList.setLayoutAnimation(controller);
  }
AdBlockerWhiteListActivity.java 文件源码 项目:zirco-browser 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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);
   }
MobileViewListActivity.java 文件源码 项目:zirco-browser 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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);
   }
PropertyAnimationActivity.java 文件源码 项目:AndroidOpenSource 阅读 26 收藏 0 点赞 0 评论 0
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.property_animation_layout);
    propertyNormalTextView.setOnClickListener(this);
    {
        propertyFlakes.setOnClickListener(this);
        layoutAnimBtn.setOnClickListener(this);
        secretTextView.setOnClickListener(this);
        clickImageView.setOnClickListener(this);
        autoScrollView.setOnClickListener(this);
    }

    Animation animation = AnimationUtils.loadAnimation(this, R.anim.shake);
    LayoutAnimationController mAnimationControll = new LayoutAnimationController(
            animation);
    container.setLayoutAnimation(mAnimationControll);
}
WeaveBookmarksListActivity.java 文件源码 项目:ZircoBrowser 阅读 22 收藏 0 点赞 0 评论 0
/**
* Set the list loading animation.
*/
  private void setAnimation() {
    AnimationSet set = new AnimationSet(true);

      Animation animation = new AlphaAnimation(0.0f, 1.0f);
      animation.setDuration(75);
      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(50);
      set.addAnimation(animation);

      LayoutAnimationController controller =
              new LayoutAnimationController(set, 0.5f);

      mListView.setLayoutAnimation(controller);
  }
BookmarksListActivity.java 文件源码 项目:ZircoBrowser 阅读 29 收藏 0 点赞 0 评论 0
/**
* Set the list 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);

      mList.setLayoutAnimation(controller);
  }
AdBlockerWhiteListActivity.java 文件源码 项目:ZircoBrowser 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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);
   }


问题


面经


文章

微信
公众号

扫码关注公众号