Skip to content

Instantly share code, notes, and snippets.

💭
Engineering @PandoraMedia

Miguel Vargas guelo

💭
Engineering @PandoraMedia
Block or report user

Report or block guelo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View blog.md

Announcing Bottom Navigator, an Android open source library

Pandora's latest mobile redesign brings the Bottom Navigation pattern to our apps. Bottom Navigation has become a popular design choice for many apps due to its many advantages including easy one-handed use and the enhanced discoverability of top app destinations.

When Pandora embarked on this project our designers had a clear vision of how navigation should work, a vision that in many ways should be familiar to users of other popular apps with bottom navigation such as Instagram, Youtube and Netflix.

On the Android dev team we surveyed the open source library ecosystem and were unable to find a good fit for our requirements. We realized we would have to build our own and Bottom Navigator was born. We have decided to contribute it back to the Android development community from which we have benefited so much. The library is opinionated and it fits our tech stack, but we believe many other apps share these same opinions and tech stack.

Botto

View .bash_profile
export PS1="\u:$ "
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/26.0.2:~/scripts:.:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:/usr/local/share/npm/bin:$HOME/bin/gsutil:$HOME/.rvm/bin"
export NODE_PATH="/usr/local/lib/node_modules"
export EDITOR="subl -w"
export GRADLE_OPTS="-Dorg.gradle.daemon=true"
export HISTTIMEFORMAT="%m-%d %T "
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@guelo
guelo / java-sealed-class.java
Created Sep 30, 2017 — forked from rjrjr/java-sealed-class
Poor Man's Sealed Classes (visitor pattern)
View java-sealed-class.java
/**
* For Java developers all excited by and jealous of Kotlin's sealed classes.
* Do this when you wish you could put parameters on an enum.
*/
public class PoorMan {
interface Event {
<T> T dispatch(EventHandler<T> handler);
}
interface EventHandler<T> {
@guelo
guelo / a.kt
Last active Jun 26, 2017
Kotlin class with constructor and annotations formating
View a.kt
@ScreenScope internal class ReservationsPresenter @Inject constructor(private val shiftPresenter: ShiftPresenter, private val reservationRepository: ReservationRepository ) : Presenter<ReservationsFragment>() {
fun hello() {
}
}
View Test.java
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Consumer;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
@guelo
guelo / RxSchedulers.java
Last active Sep 24, 2019
Dagger injected Rx schedulers
View RxSchedulers.java
import javax.inject.Named;
import javax.inject.Singleton;
import io.reactivex.Observable;
import io.reactivex.ObservableTransformer;
import io.reactivex.Scheduler;
@Singleton
public class RxSchedulers {
@guelo
guelo / gist:6b74921cb118e36caf175cc91a894969
Created Apr 25, 2016
Mock Retrofit2 service interface.
View gist:6b74921cb118e36caf175cc91a894969
public interface GitHubService {
@GET("users/{user}/repos")
Call<List<Repo>> listRepos(@Path("user") String user);
}
class MockCall<T> implements Call<T> {
@Override
public Response<T> execute() throws IOException { return null; }
@Override
You can’t perform that action at this time.