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
public class Test { | |
private Timer timer; | |
private LoadTimerTask task; | |
//выполняется после ввода нового символа в поиске | |
void onSearch(String text) { | |
//отменяем предыдущую задачу таймера | |
if (timer != null) { | |
timer.cancel(); |
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 android.support.v4.view.ViewCompat; | |
import android.support.v4.view.ViewPropertyAnimatorCompat; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import com.mikepenz.itemanimators.DefaultAnimator; | |
public class ItemAnimator extends DefaultAnimator<ItemAnimator> { | |
public boolean useAnimation = 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 android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.provider.Settings; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.Snackbar; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.app.AppCompatActivity; |
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
public class LocalRxBus { | |
private static LocalRxBus instance; | |
private PublishSubject<Object> subject = PublishSubject.create(); | |
public static LocalRxBus instance() { | |
if (instance == null) { | |
instance = new LocalRxBus(); | |
} | |
return instance; |