Skip to content

Instantly share code, notes, and snippets.

View rubenpla-develop's full-sized avatar

Ruben Pla Ferrero rubenpla-develop

  • Barcelona, Spain.
View GitHub Profile
@rubenpla-develop
rubenpla-develop / AutoCompleteTextViewWithDelay.kt
Last active March 2, 2018 10:51
CUstom view based on AutoCompleteTexview, with automatic delay and progress bar included. #Kotlin #CustomView #Android
package rubenpla.develop.autocompletetextview_sample
import android.annotation.SuppressLint
import android.content.Context
import android.os.Handler
import android.os.Message
import android.util.AttributeSet
import android.view.View
import android.widget.AutoCompleteTextView
import android.widget.ProgressBar
@rubenpla-develop
rubenpla-develop / TmdbApi.kt
Last active May 23, 2019 01:38
#Kotlin #Android Retrofit2 singleton instance sample
package rubenpla.develop.privtmdbendlesslist.data.api
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.GET
import retrofit2.http.Query
import rubenpla.develop.privtmdbendlesslist.data.model.MoviesResultsItem
interface TmdbApi {
@rubenpla-develop
rubenpla-develop / introrx.md
Created December 26, 2017 16:51 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@rubenpla-develop
rubenpla-develop / WebviewArticlePresenter.java
Created September 12, 2016 14:45 — forked from rupertbates/WebviewArticlePresenter.java
Work out the maximum scroll extent of an Android WebView
int maxScrollExtent = (int) ((mOverlayTop.getContentHeight() * mOverlayTop.getScale()) - mOverlayTop.getHeight());
/*
* Copyright (C) 2006 The Android Open Source Project
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Chris Banes
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Chris Banes
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software