Java Code Examples for eu.davidea.flexibleadapter.FlexibleAdapter#isHandleDragEnabled()
The following examples show how to use
eu.davidea.flexibleadapter.FlexibleAdapter#isHandleDragEnabled() .
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: ExpandableLevel0Item.java From FlexibleAdapter with Apache License 2.0 | 6 votes |
public L0ViewHolder(View view, FlexibleAdapter adapter) { super(view, adapter, true);//True for sticky mTitle = view.findViewById(R.id.title); mSubtitle = view.findViewById(R.id.subtitle); this.mHandleView = view.findViewById(R.id.row_handle); if (adapter.isHandleDragEnabled() && DatabaseService.getInstance().getDatabaseType() == DatabaseType.EXPANDABLE_SECTIONS) { this.mHandleView.setVisibility(View.VISIBLE); setDragHandleView(mHandleView); } else { this.mHandleView.setVisibility(View.GONE); } // Support for StaggeredGridLayoutManager setFullSpan(true); }
Example 2
Source File: HeaderItem.java From FlexibleAdapter with Apache License 2.0 | 6 votes |
HeaderViewHolder(View view, FlexibleAdapter adapter) { super(view, adapter, true);//True for sticky mTitle = view.findViewById(R.id.title); mSubtitle = view.findViewById(R.id.subtitle); mTitle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("HeaderTitle", "Registered internal click on Header TitleTextView! " + mTitle.getText() + " position=" + getFlexibleAdapterPosition()); } }); this.mHandleView = view.findViewById(R.id.row_handle); if (adapter.isHandleDragEnabled()) { this.mHandleView.setVisibility(View.VISIBLE); setDragHandleView(mHandleView); } else { this.mHandleView.setVisibility(View.GONE); } // Support for StaggeredGridLayoutManager setFullSpan(true); }
Example 3
Source File: ExpandableHeaderItem.java From FlexibleAdapter with Apache License 2.0 | 5 votes |
ExpandableHeaderViewHolder(View view, FlexibleAdapter adapter) { super(view, adapter, true);//True for sticky mTitle = view.findViewById(R.id.title); mSubtitle = view.findViewById(R.id.subtitle); this.mHandleView = view.findViewById(R.id.row_handle); if (adapter.isHandleDragEnabled()) { this.mHandleView.setVisibility(View.VISIBLE); setDragHandleView(mHandleView); } else { this.mHandleView.setVisibility(View.GONE); } // Support for StaggeredGridLayoutManager setFullSpan(true); }
Example 4
Source File: SubItem.java From FlexibleAdapter with Apache License 2.0 | 5 votes |
public ChildViewHolder(View view, FlexibleAdapter adapter) { super(view, adapter); this.mTitle = view.findViewById(R.id.title); this.mHandleView = view.findViewById(R.id.row_handle); if (adapter.isHandleDragEnabled()) { this.mHandleView.setVisibility(View.VISIBLE); setDragHandleView(mHandleView); } else { this.mHandleView.setVisibility(View.GONE); } }