Skip to content

Instantly share code, notes, and snippets.

View Savrov's full-sized avatar

Pavel Savrov

  • Qinshift
  • Prague
View GitHub Profile
@Savrov
Savrov / EnumAnnotation.kt
Created May 14, 2019 10:25
Enum with annotation
@IntDef(ZERO)
@Retention(AnnotationRetention.SOURCE)
annotation class ViewHolderType {
companion object {
const val ZERO = 0
}
}
@Savrov
Savrov / RotateOrientationEventListener.java
Created December 4, 2018 08:41 — forked from tuanchauict/RotateOrientationEventListener.java
Handle screen rotation without onConfigurationChanged
package com.notabasement.common.photopicker.events;
import android.content.Context;
/**
* Created by tuanchauict on 3/16/16.
*/
public abstract class RotateOrientationEventListener extends SimpleOrientationEventListener {
public RotateOrientationEventListener(Context context) {
super(context);
@Savrov
Savrov / CollapsingHeaderView.kt
Created May 4, 2018 14:20
CollapsingHeaderView
package com.savrov.collapsingheaderview
import android.annotation.SuppressLint
import android.content.Context
import android.support.design.widget.AppBarLayout
import android.support.design.widget.CollapsingToolbarLayout
import android.support.design.widget.CoordinatorLayout
import android.support.v4.app.Fragment
import android.support.v7.widget.RecyclerView
import android.util.AttributeSet