javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.recyclerview.widget.RecyclerView | |
class SampleActivity: Activity(), OnItemActionListener { | |
private val adapter by lazy { ViewTypeAdapter<ViewType<*>>(list = list, onItemActionListener = this) } | |
//Prepare the list somehow, whether in ViewModel or presenter and then set it to adapter using setList | |
private val list: List<ViewType<*>> by lazy { | |
arrayListOf<>(HeaderViewType("Header"), | |
RowViewType("content"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.constraintlayout.widget.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".ui.StartFragment"> | |
<!--If somehow this could walk through its children and collect their ids to make a logical grouping | |
without adding the ref ids like we do with Group and delegate to parent ConstraintLayout for | |
drawing the children | |
--> | |
<androidx.constraintlayout.widget.LogicalGroup |