當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。