Skip to content

Instantly share code, notes, and snippets.

View asbadve's full-sized avatar

Ajinkya asbadve

  • Pune,India
View GitHub Profile
@asbadve
asbadve / ControllableAppBarLayout.java
Created February 5, 2017 07:42
get notified when Appbarlayout is expand and hide with scrolling offset and states.
package com.ajinkyabadve.mywatchlist.util.listeners;
/**
* Copyright 2016 Ajinkya Badve
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
@asbadve
asbadve / gist:b3445231a5a46bfb5bb2e3ed8b29ef29
Created February 8, 2017 07:56
Stackover flow question
moviesAPI.searchQuery(newQuery)
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.debounce(new Func1<Search, Observable<Search>>() {
@Override
public Observable<Search> call(Search search) {
if (search.getSearchResults().size() == 0) {
return Observable.empty();
} else {
return Observable.<Search>empty().delay(5, TimeUnit.SECONDS);
@asbadve
asbadve / AndroidManifest.xml
Created May 31, 2017 10:07 — forked from bjoernQ/AndroidManifest.xml
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity