當前位置: 首頁>>代碼示例>>Java>>正文


Java RecyclerView.scheduleLayoutAnimation方法代碼示例

本文整理匯總了Java中android.support.v7.widget.RecyclerView.scheduleLayoutAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java RecyclerView.scheduleLayoutAnimation方法的具體用法?Java RecyclerView.scheduleLayoutAnimation怎麽用?Java RecyclerView.scheduleLayoutAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v7.widget.RecyclerView的用法示例。


在下文中一共展示了RecyclerView.scheduleLayoutAnimation方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    Bundle args = getArguments();
    String title = "Sample";
    int layout = R.layout.fragment_list_from_bottom;
    if (args != null) {
        title = args.getString(SampleActivity.TITLE_KEY);
        layout = args.getInt(SampleActivity.LAYOUT_KEY);
    }

    ((SampleActivity) getActivity()).getSupportActionBar().setTitle(title);

    View view = inflater.inflate(layout, container, false);
    RecyclerView recyclerView = (AnimatedRecyclerView) view.findViewById(R.id.recycler_view);
    recyclerView.setAdapter(adapter);
    adapter.notifyDataSetChanged();
    recyclerView.scheduleLayoutAnimation();

    return view;
}
 
開發者ID:MLSDev,項目名稱:AnimatedRecyclerView,代碼行數:22,代碼來源:SampleFragment.java

示例2: runLayoutAnimation

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
public static void runLayoutAnimation(final RecyclerView recyclerView) {
    final Context context = recyclerView.getContext();
    final LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(context, R.anim.layout_animation_fall_up);

    recyclerView.setLayoutAnimation(controller);
    recyclerView.getAdapter().notifyDataSetChanged();
    recyclerView.scheduleLayoutAnimation();
}
 
開發者ID:afiqiqmal,項目名稱:MVP-Android,代碼行數:9,代碼來源:RecyclerViewUtils.java

示例3: applyAnimation

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
public static void applyAnimation(RecyclerView recyclerView) {
    LayoutAnimationController controller = new LayoutAnimationController(getAnimationSetFromLeft());
    controller.setDelay(0.1f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);

    recyclerView.setLayoutAnimation(controller);
    recyclerView.getAdapter().notifyDataSetChanged();
    recyclerView.scheduleLayoutAnimation();
}
 
開發者ID:nuptboyzhb,項目名稱:RecyclerViewAnimation,代碼行數:10,代碼來源:MyLayoutAnimationHelper.java

示例4: runLayoutAnimation

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
private void runLayoutAnimation(final RecyclerView recyclerView) {
    final Context context = recyclerView.getContext();
    final LayoutAnimationController controller =
            AnimationUtils.loadLayoutAnimation(context, R.anim.rv_layout_animation);

    recyclerView.setLayoutAnimation(controller);
    recyclerView.getAdapter().notifyDataSetChanged();
    recyclerView.scheduleLayoutAnimation();
}
 
開發者ID:tpakis,項目名稱:Charities,代碼行數:10,代碼來源:CharitiesResultsActivity.java


注:本文中的android.support.v7.widget.RecyclerView.scheduleLayoutAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。