Skip to content

Instantly share code, notes, and snippets.

View RobertZagorski's full-sized avatar

RobertZagorski

  • Affirm, Inc
  • Warsaw, Poland
View GitHub Profile
@RobertZagorski
RobertZagorski / AutoCompleteTextViewBehaviour.java
Last active March 26, 2019 15:46
AutoCompleteTextView CoordinatorLayout.Behavior that is aware of Snackbar and changes autocompletes popup when Snackbar is shown.
package com.example.rzagorski.coordinatorawareautocompletetextviewapp;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.AppCompatAutoCompleteTextView;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
@RobertZagorski
RobertZagorski / ExecutionTime.java
Last active December 2, 2016 15:07
An utility class that helps detecting events, that have occured on original RxJava Observable
/*
* Copyright (C) 2016 Robert Zagórski.
*
* 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
@RobertZagorski
RobertZagorski / ScrollableEditText.java
Last active June 19, 2016 13:26
An Android EditText, that reacts to parent scroll events. If clicked, intercepts parent event and scrolls itself as long as the text inside is scrollable. If not, gives back the control of a scroll event to a parent.
import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
/**
* Created by Robert Zagórski on 19.06.2016.
*/
public class ScrollableEditText extends AppCompatEditText {