Skip to content

Instantly share code, notes, and snippets.

View florian-do's full-sized avatar
💼
Working at TravelBank !

Florian DO florian-do

💼
Working at TravelBank !
View GitHub Profile
@florian-do
florian-do / CustomOnItemSelectedListener.java
Last active July 29, 2016 13:10
OnChangeListener Spinner
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
/**
* Created by do_f on 20/06/16.
*/
public abstract class CustomOnItemSelectedListener implements AdapterView.OnItemSelectedListener {
@Override
@florian-do
florian-do / NetworkReceiver.java
Last active September 5, 2018 22:06
A simple network listener
package com.azconception.taxi.broadcast;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.util.Log;
/**
* Created by do_f on 28/07/16.
import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
import java.util.*
class RefreshStrategy(c: Context) {
private val map: MutableMap<Class<*>, Long> = hashMapOf()
private val forceRefresh: MutableMap<Class<*>, Boolean> = hashMapOf()