当前位置: 首页>>代码示例>>Java>>正文


Java DefaultItemAnimator类代码示例

本文整理汇总了Java中android.support.v7.widget.DefaultItemAnimator的典型用法代码示例。如果您正苦于以下问题:Java DefaultItemAnimator类的具体用法?Java DefaultItemAnimator怎么用?Java DefaultItemAnimator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultItemAnimator类属于android.support.v7.widget包,在下文中一共展示了DefaultItemAnimator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
public void run() {
    runOnUiThread(new Runnable() {
        @Override
        public void run() {
            try {
                List<Assignment> assignmentList = aassignmentService.getAssignmentListByClassId(classId, termId);
                AssignmentAdapterF assignmentAdapterF = new AssignmentAdapterF(AssignmentAddActivityF.this, assignmentList);

                LinearLayoutManager layoutManager = new LinearLayoutManager(AssignmentAddActivityF.this);
                layoutManager.setOrientation(LinearLayoutManager.VERTICAL);

                recyclerView.setAdapter(assignmentAdapterF);
                recyclerView.setLayoutManager(layoutManager);
                recyclerView.setItemAnimator(new DefaultItemAnimator());
            }catch (GradingFactorException e) {
                e.printStackTrace();
            }
        }
    });
}
 
开发者ID:inteliedoit,项目名称:thesis-project,代码行数:22,代码来源:AssignmentAddActivityF.java

示例2: loadItems

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
private void loadItems() {
    numberOfImages = 0;

    RecyclerView cronetView = (RecyclerView) view.findViewById(R.id.https_images_view);
    GridLayoutManager gridLayoutManager =
            new GridLayoutManager(getActivity(), 3);

    viewAdapter = new com.tencent.samples.quic_sample.ViewAdapter(getActivity());
    // In order to enable Netlog, a Cronet logging system, enable write permissions.
    // Find more info about Netlog here:
    // https://www.chromium.org/developers/design-documents/network-stack/netlog
    enableWritingPermissionForLogging();

    cronetView.setLayoutManager(gridLayoutManager);
    cronetView.setAdapter(viewAdapter);
    cronetView.setItemAnimator(new DefaultItemAnimator());
    onItemsLoadComplete();

}
 
开发者ID:tencentyun,项目名称:clb-quic-demo,代码行数:20,代码来源:HttpsFragment.java

示例3: onCreate

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_multiple_choice_mode_example);

    final PersonsViewModel viewModel = ViewModelProviders.of(this).get(PersonsViewModel.class);
    final Datasource<Person> datasource = viewModel.getDatasource();
    final CheckedPersonsAdapter adapter = new CheckedPersonsAdapter(datasource, true);

    mRecyclerView = (RecyclerView) findViewById(android.R.id.list);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setAdapter(adapter);

    mChoiceMode = new MultipleChoiceMode(savedInstanceState);
    mChoiceMode.setChoiceModeListener(this::onItemCheckedChanged);
    mChoiceModeHelper = new ChoiceModeHelper<>(adapter, mChoiceMode);
    mChoiceModeHelper.setRecyclerView(mRecyclerView);

    findViewById(R.id.action_clear_choices).setOnClickListener(v -> mChoiceMode.clearChoices());
    findViewById(R.id.action_get_checked_items).setOnClickListener(v -> showCheckedItems());
}
 
开发者ID:GlobusLTD,项目名称:recyclerview-android,代码行数:23,代码来源:MultipleChoiceModeExampleActivity.java

示例4: initRecyclerView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
private void initRecyclerView() {
    bindingView.xrvEveryday.setPullRefreshEnabled(false);
    bindingView.xrvEveryday.setLoadingMoreEnabled(false);
    if (mHeaderView == null) {
        mHeaderView = mHeaderBinding.getRoot();
        bindingView.xrvEveryday.addHeaderView(mHeaderView);
    }
    if (mFooterView == null) {
        mFooterBinding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.footer_item_everyday, null, false);
        mFooterView = mFooterBinding.getRoot();
        bindingView.xrvEveryday.addFootView(mFooterView, true);
        bindingView.xrvEveryday.noMoreLoading();
    }
    bindingView.xrvEveryday.setLayoutManager(new LinearLayoutManager(getContext()));
    // 需加,不然滑动不流畅
    bindingView.xrvEveryday.setNestedScrollingEnabled(false);
    bindingView.xrvEveryday.setHasFixedSize(false);
    bindingView.xrvEveryday.setItemAnimator(new DefaultItemAnimator());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:EverydayFragment.java

示例5: initView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
private void initView(Context context) {
    mContext = context;
    View view = LayoutInflater.from(context).inflate(com.wuxiaolong.pullloadmorerecyclerview.R.layout.pull_loadmore_layout, null);
    mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(com.wuxiaolong.pullloadmorerecyclerview.R.id.swipeRefreshLayout);
    mSwipeRefreshLayout.setColorSchemeResources(android.R.color.holo_green_dark, android.R.color.holo_blue_dark, android.R.color.holo_orange_dark);
    mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayoutOnRefresh(this));

    mRecyclerView = (RecyclerView) view.findViewById(com.wuxiaolong.pullloadmorerecyclerview.R.id.recycler_view);
    mRecyclerView.setVerticalScrollBarEnabled(true);

    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());


    mRecyclerView.setOnTouchListener(new onTouchRecyclerView());

    mFooterView = view.findViewById(R.id.footerView);

    loadMoreLayout = (LinearLayout) view.findViewById(R.id.loadMoreLayout);
    loadMoreText = (TextView) view.findViewById(R.id.loadMoreText);
    mprogressBar = (ProgressBar)view.findViewById(R.id.loadMoreProgressBar) ;
    mFooterView.setVisibility(View.GONE);

    this.addView(view);

}
 
开发者ID:dufangyu1990,项目名称:JKApp,代码行数:27,代码来源:PullLoadMoreRecyclerView.java

示例6: initRecyclerView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
private void initRecyclerView() {
    recycleView = (RecyclerView)findViewById(R.id.recyclerView);
    recycleView.setItemAnimator(new DefaultItemAnimator());

    //设置分割线
    SoSpaceItemDecoration decoration = new SoSpaceItemDecoration(1);
    recycleView.addItemDecoration(decoration);
    //设置布局样式
    recycleView.setLayoutManager(new StaggeredGridLayoutManager(2,
            StaggeredGridLayoutManager.VERTICAL));
    //设置适配器
    mDetailAdapter = new SoDetailAdapter(this,null);
    recycleView.setAdapter(mDetailAdapter);

    soDetailPresenter.getSoDetailDataFromInternet(_id);
}
 
开发者ID:lueans,项目名称:LueansRead,代码行数:17,代码来源:SoDetailActivity.java

示例7: setupView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
private void setupView() {
    mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
    mSearchEditText = (EditText) findViewById(R.id.et_search);

    // Setup Progress Dialog to show loading state
    mDialog = new ProgressDialog(MainActivity.this);
    mDialog.setIndeterminate(true);
    mDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mDialog.setTitle(getString(R.string.progress_title));
    mDialog.setMessage(getString(R.string.progress_body));
    mDialog.setCancelable(false);
    mDialog.setCanceledOnTouchOutside(false);

    mRecyclerView.setRecycledViewPool(new RecyclerView.RecycledViewPool());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(
            this, LinearLayoutManager.VERTICAL, false)
    );
    mRecyclerView.hasFixedSize();
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    DividerItemDecoration mDividerItemDecoration = new DividerItemDecoration(
            mRecyclerView.getContext(), LinearLayoutManager.VERTICAL
    );
    mRecyclerView.addItemDecoration(mDividerItemDecoration);
    mAdapter = new DataAdapter(getLayoutInflater());
    mRecyclerView.setAdapter(mAdapter);
}
 
开发者ID:shahbazahmed1269,项目名称:AndroidGithubIssues,代码行数:27,代码来源:MainActivity.java

示例8: onCreate

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_event_content);
    recyclerView= (RecyclerView) findViewById(R.id.recycler_view);
    list=new ArrayList<>();
    adapter=new EventAdapter(this,list);
    toolbar= (Toolbar) findViewById(R.id.Event_toolbar);
    toolbar.setNavigationIcon(R.drawable.backbutton);
    toolbar.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            finish();
        }
    });
    RecyclerView.LayoutManager layoutManager=new GridLayoutManager(this,2);  // 2 is the number of columns in grid view
    recyclerView.setLayoutManager(new GridLayoutManager(this,2));
    recyclerView.addItemDecoration(new GridSpacingItemDecoration(2,dpToPx(10),true));
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.setAdapter(adapter);
    initialize();

}
 
开发者ID:rishabh115,项目名称:Odyssey2017,代码行数:24,代码来源:EventActivity.java

示例9: onCreate

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_timetables);
    setupActionBar();

    recyclerView = (RecyclerView) findViewById(R.id.recycler_view);

    tAdapter = new TimetablesAdapter(timetableList, v -> {
        Timetable item = timetableList.get(recyclerView.getChildLayoutPosition(v));
        Intent i = new Intent(ManageTimetablesActivity.this, EditTimetableActivity.class);
        i.putExtra("url", item.getURL());
        i.putExtra("name", item.getName());
        startActivity(i);
        overridePendingTransition(0, 0);
    });
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
    recyclerView.setLayoutManager(mLayoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.setAdapter(tAdapter);
}
 
开发者ID:dhbw-timetable,项目名称:dhbw-timetable-android,代码行数:22,代码来源:ManageTimetablesActivity.java

示例10: onCreateView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
    @Nullable Bundle savedInstanceState) {
  View view = inflater.inflate(R.layout.quran_list, container, false);

  final Context context = getActivity();

  recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
  recyclerView.setLayoutManager(new LinearLayoutManager(context));
  recyclerView.setItemAnimator(new DefaultItemAnimator());

  bookmarksAdapter = new QuranListAdapter(context, recyclerView, new QuranRow[0], true);
  bookmarksAdapter.setQuranTouchListener(this);
  recyclerView.setAdapter(bookmarksAdapter);
  return view;
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:18,代码来源:BookmarksFragment.java

示例11: onCreateView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState){
    View v = inflater.inflate(R.layout.credentials_manager_fragment, container, false);
    mEmptyView = v.findViewById(R.id.empty_view);
    mEmptyTextView = (TextView)v.findViewById(R.id.empty_textview);
    mList = (RecyclerView)v.findViewById(R.id.recycler_view);
    mLayoutManager = new LinearLayoutManager(getActivity());
    mList.setLayoutManager(mLayoutManager);
    mList.setHasFixedSize(false);
    mList.setItemAnimator(new DefaultItemAnimator());
    mCredentials = NetworkCredentialsDatabase.getInstance().getAllPersistentCredentials();
    mAdapter = new CredentialsManagerAdapter(mCredentials,getActivity(), this);
    mList.setAdapter(mAdapter);
    refreshCredentialsList();
    return v;
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:17,代码来源:CredentialsManagerPreferencesFragment.java

示例12: onSuccessView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
public View onSuccessView() {

    View view=View.inflate(UIUtils.getContext(), R.layout.user_keep_one,null);
    recyclerView = (RecyclerView)view.findViewById(R.id.recycler_view);
    mLinearDelete = (LinearLayout) view.findViewById(R.id.keep_one_linear);
    mDeleteIcon = (ImageView) view.findViewById(R.id.keep_one_icon);
    mDeleteText = (TextView) view.findViewById(R.id.keep_one_delete);

    mLinearDelete.setOnClickListener(this);

    LinearLayoutManager manager=new LinearLayoutManager(UIUtils.getContext());
    recyclerView.setLayoutManager(manager);

    adapter = new UserKeepAdapter(mDatas,mDeleteIcon,mDeleteText);
    recyclerView.setAdapter(adapter);
    recyclerView.setItemAnimator(new DefaultItemAnimator());

    return view;
}
 
开发者ID:android-jian,项目名称:topnews,代码行数:21,代码来源:KeepOneFragment.java

示例13: initializeFormBuildHelper

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
/**
 * private method for initializing form build helper
 * @param context
 * @param recyclerView
 * @param listener
 */
private void initializeFormBuildHelper(Context context, RecyclerView recyclerView, OnFormElementValueChangedListener listener) {

    // initialize form adapter
    this.mFormAdapter = new FormAdapter(context, listener);

    // set up the recyclerview with adapter
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    linearLayoutManager.setStackFromEnd(false);

    recyclerView.setLayoutManager(linearLayoutManager);
    recyclerView.setAdapter(mFormAdapter);
    recyclerView.setItemAnimator(new DefaultItemAnimator());

}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:22,代码来源:FormBuilder.java

示例14: initData

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
protected void initData() {
    List<ItemModel> items = new ArrayList<>();
    fillData(items);

    adapter = new MainAdapter(items);
    adapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
    adapter.isFirstOnly(false);
    adapter.setOnLoadMoreListener(this);

    refreshLayout.setColorSchemeColors(Color.RED, Color.BLUE, Color.GREEN);
    refreshLayout.setOnRefreshListener(this);

    recyclerView.setLayoutManager(new LinearLayoutManager(context));
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.addItemDecoration(new DividerItemDecoration(context, LinearLayoutManager.VERTICAL));

    recyclerView.setAdapter(adapter);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:MainFragment.java

示例15: onCreateView

import android.support.v7.widget.DefaultItemAnimator; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    mEventViewAdapter = new EventViewAdapter(mEventList, mEventsFragment);

    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_event_view, container, false);
    RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.event_recyclerView);

    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.setAdapter(mEventViewAdapter);

    return view;
}
 
开发者ID:ArnauBlanch,项目名称:civify-app,代码行数:18,代码来源:EventViewFragment.java


注:本文中的android.support.v7.widget.DefaultItemAnimator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。