Java Code Examples for com.marshalchen.ultimaterecyclerview.UltimateRecyclerView#setSaveEnabled()
The following examples show how to use
com.marshalchen.ultimaterecyclerview.UltimateRecyclerView#setSaveEnabled() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MaterialListSection.java From KickAssSlidingMenu with Apache License 2.0 | 6 votes |
@SuppressLint("WrongViewCast") @Override public View init(View view) { indicator = (ImageView) view.findViewById(R.id.indicatorIcon); text = (CustomTextView) view.findViewById(R.id.section_text); notificationtext = (CustomTextView) view.findViewById(R.id.section_notification); listview = (UltimateRecyclerView) view.findViewById(R.id.ultimate_recycler_view); // listview.disableLoadmore(); listview.setSaveEnabled(false); CustomLinearLayoutManager mlayout = new CustomLinearLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false); listview.setLayoutManager(mlayout); listview.setHasFixedSize(false); listview.setAdapter(renderer); mContainer = view; submenu_item_height = view.getContext().getResources().getDimensionPixelSize(R.dimen.sectionNormalHeight); animate_indicator = true; final Resources resources = view.getContext().getResources(); int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android"); if (resourceId > 0) { bottomNavigationHeight = resources.getDimensionPixelSize(resourceId); } return view; }
Example 2
Source File: catelogLinear.java From KickAssSlidingMenu with Apache License 2.0 | 5 votes |
protected void renderviewlayout(View view) throws Exception { listview_layout = (UltimateRecyclerView) view.findViewById(getUltimate_recycler_viewResId()); listview_layout.setHasFixedSize(true); listview_layout.setSaveEnabled(true); listview_layout.setAdapter(madapter = getAdatperWithdata()); if (mLayoutManager == null) { mLayoutManager = new ScrollSmoothLineaerLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false, getSmoothDuration()); } listview_layout.setLayoutManager(mLayoutManager); getProgressbar(view, R.id.urv_main_progress_bar); setUltimateRecyclerViewExtra(listview_layout, madapter); }
Example 3
Source File: catelogLinear.java From KickAssSlidingMenu with Apache License 2.0 | 5 votes |
protected void renderviewlayout(View view) throws Exception { listview_layout = (UltimateRecyclerView) view.findViewById(getUltimate_recycler_viewResId()); listview_layout.setHasFixedSize(true); listview_layout.setSaveEnabled(true); if (mLayoutManager == null) { mLayoutManager = new ScrollSmoothLineaerLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false, getSmoothDuration()); } listview_layout.setLayoutManager(mLayoutManager); listview_layout.setAdapter(madapter = getAdatperWithdata()); setUltimateRecyclerViewExtra(listview_layout, madapter); }
Example 4
Source File: catelogLinear.java From UltimateRecyclerView with Apache License 2.0 | 5 votes |
protected void renderviewlayout(View view) throws Exception { listview_layout = (UltimateRecyclerView) view.findViewById(getUltimate_recycler_viewResId()); listview_layout.setHasFixedSize(true); listview_layout.setSaveEnabled(true); if (mLayoutManager == null) { mLayoutManager = new ScrollSmoothLineaerLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false, getSmoothDuration()); } listview_layout.setLayoutManager(mLayoutManager); listview_layout.setAdapter(madapter = getAdatperWithdata()); getProgressbar(view); setUltimateRecyclerViewExtra(listview_layout, madapter); }
Example 5
Source File: catelogLinear.java From UltimateRecyclerView with Apache License 2.0 | 5 votes |
protected void renderviewlayout(View view) throws Exception { listview_layout = (UltimateRecyclerView) view.findViewById(getUltimate_recycler_viewResId()); listview_layout.setHasFixedSize(true); listview_layout.setSaveEnabled(true); if (mLayoutManager == null) { mLayoutManager = new ScrollSmoothLineaerLayoutManager(view.getContext(), LinearLayoutManager.VERTICAL, false, getSmoothDuration()); } listview_layout.setLayoutManager(mLayoutManager); listview_layout.setAdapter(madapter = getAdatperWithdata()); getProgressbar(view); setUltimateRecyclerViewExtra(listview_layout, madapter); }
Example 6
Source File: GridLayoutRVTest.java From UltimateRecyclerView with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(getMainLayout()); mToolbar = (Toolbar) findViewById(R.id.tool_bar); setSupportActionBar(mToolbar); getSupportActionBar().setDisplayShowTitleEnabled(true); listuv = (UltimateRecyclerView) findViewById(R.id.ultimate_recycler_view); mGridAdapter = new GridJRAdapter(getJRList()); mGridAdapter.setSpanColumns(columns); mGridLayoutManager = new BasicGridLayoutManager(this, columns, mGridAdapter); listuv.setLayoutManager(mGridLayoutManager); listuv.setHasFixedSize(true); listuv.setSaveEnabled(true); listuv.setClipToPadding(false); // mGridAdapter.setCustomLoadMoreView(LayoutInflater.from(this).inflate(R.layout.custom_bottom_progressbar, null)); listuv.setNormalHeader(setupHeaderView()); final Handler f = new Handler(); listuv.setOnLoadMoreListener(new UltimateRecyclerView.OnLoadMoreListener() { @Override public void loadMore(int itemsCount, int maxLastVisiblePosition) { // Log.d(TAG, itemsCount + " :: " + itemsCount); f.postDelayed(new Runnable() { @Override public void run() { mGridAdapter.insert(SampleDataboxset.genJRList(5)); afterAdd(); } }, 2000); } }); // listuv.enableLoadmore(); // listuv.disableLoadmore(); listuv.setLoadMoreView(R.layout.custom_bottom_progressbar); listuv.setAdapter(mGridAdapter); listuv.setItemAnimator(new DefaultItemAnimator()); harness_control(); }