Instantly share code, notes, and snippets.

View coordinator.xml
<CoordinatorLayout>
<MyView app:layout_behavior="MyBehavior" />
<BottomSheet app:layout_behavior="BottomSheetBehavior"/>
<AppBarLayout app:layout_behavior="MyAppBarBehavior"/>
</CoordinatorLayout>
View block_comment.xml
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/avatarView"
android:layout_width="@dimen/size_comment_avatar"
android:layout_height="@dimen/size_comment_avatar"
View BasePresenter.kt
class BasePresenter {
private val detachDisposable = CompositeDisposable()
private val destroyDisposable = CompositeDisposable()
fun unsubscribeOnDetach(d: Disposable) {
detachDisposable.add(d)
}
fun unsubscribeOnDestroy(d: Disposable) {