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
package net.aquadc.flawless.service | |
import android.app.Service | |
import android.content.Context | |
import android.content.Intent | |
import android.content.ServiceConnection | |
import android.os.Binder | |
import android.os.IBinder | |
/** |
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.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import java.util.concurrent.Executor; | |
public class Handlecutor extends Handler implements Executor { | |
public Handlecutor(@NonNull Looper looper) { |
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
package net.aquadc.util; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* For lists with O(n) random-deletion time (array-based lists, like {@link ArrayList}), | |
* it's faster to mark items as removed and them sweep them all together. |
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
package whatever | |
import com.google.gson.Gson | |
import com.google.gson.JsonElement | |
import com.google.gson.JsonObject | |
import com.google.gson.reflect.TypeToken | |
import okhttp3.RequestBody | |
import okhttp3.ResponseBody | |
import retrofit2.Converter | |
import retrofit2.Retrofit |
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
package net.aquadc.commonandroid.lists; | |
import android.graphics.Rect; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
public class FirstLastItemSpacesDecoration extends RecyclerView.ItemDecoration { | |
private final int directSpace; | |
private final int reverseSpace; |
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
package net.aquadc.common | |
// Gist: https://gist.github.com/Miha-x64/5f626228b34175f827734596d6701008 | |
import java.util.* | |
// maps | |
inline fun <reified K : Enum<K>, V> enumMapOf(): MutableMap<K, V> { | |
return EnumMap<K, V>(K::class.java) | |
} |
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
package whatever.dynamicapkloading; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.res.AssetManager; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.widget.TextView; |
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
package net.aquadc.commonandroid | |
import android.content.res.Resources | |
import java.text.SimpleDateFormat | |
import java.util.* | |
/** | |
* Returns text representation of `Date` and time (in millis) | |
* after which this value should be updated; | |
* time can be -1, which means that no update will ever be needed |
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
package net.aquadc.common | |
import com.google.gson.Gson | |
import com.google.gson.TypeAdapter | |
import com.google.gson.TypeAdapterFactory | |
import com.google.gson.reflect.TypeToken | |
import java.lang.reflect.ParameterizedType | |
import java.util.* | |
/** |
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
package net.aquadc.common | |
import java.util.* | |
import kotlin.DeprecationLevel.ERROR | |
import kotlin.UnsupportedOperationException as UOE | |
/** | |
* Created by mike on 17.02.17 | |
*/ |