Skip to content

Instantly share code, notes, and snippets.

🌵
Hi

Chris Arriola arriolac

🌵
Hi
Block or report user

Report or block arriolac

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 keybase.md

Keybase proof

I hereby claim:

  • I am arriolac on github.
  • I am chrisarriola (https://keybase.io/chrisarriola) on keybase.
  • I have a public key ASBSQlNOoGj57_pr5_Rn2ei1zRfC6Xm4GHkigxYOwjIXCQo

To claim this, I am signing this object:

@arriolac
arriolac / ActionBarDrawerToggle.java
Created Feb 23, 2016
ActionBarDrawerToggle with no animation
View ActionBarDrawerToggle.java
new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) {
@Override public void onDrawerSlide(View drawerView, float slideOffset) {
super.onDrawerSlide(drawerView, 0);
}
};
@arriolac
arriolac / FlatIterator.java
Last active Jan 6, 2016
An Iterator that flattens iterating over a list of Iterators.
View FlatIterator.java
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
/**
* An Iterator that flattens iterating over a list of Iterators.
*
* Created by chris on 1/5/16.
*/
@arriolac
arriolac / CustomView.java
Last active May 26, 2019
Saving state on configuration changes for a custom view.
View CustomView.java
package com.operator.android;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.View;
/**
* A custom {@link View} that demonstrates how to save/restore instance state.
*/
View DrawingViewArchitecture.md

This is the proposed architecture for implementing drawing on text, photos and videos on Leo.

DrawingView

  • This is the custom view that will display the drawing created by the user.
  • Will be the View on "top" (relative to z-axis) of all the other views in AddTextActivity except the top bar Views.
  • Notes:
    • overrides onTouchEvent(...)
    • has a method called setEnabled(boolean enabled)
      • enabled value will be returned by onTouchEvent(...). this means that it will intercept all touch events when enabled.
      • Note: this will be toggled by the compose views (enabled when in drawing mode, disabled when not in drawing mode).
View AutomaticDripCoffeeMaker.java
public class AutomaticDripCoffeeMaker extends BaseCoffeeMaker {
public AutomaticDropCoffeeMaker() {
super();
}
public void scheduleBrew() {
// schedules a call to #brew()
}
@arriolac
arriolac / ReminderIntentService.java
Last active Jul 27, 2016
IntentService for displaying a reminder
View ReminderIntentService.java
package chrisarriola.me.remind;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import chrisarriola.me.DataPath;
import chrisarriola.me.remind.util.LogUtil;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
@arriolac
arriolac / BundleUtil.java
Last active Aug 29, 2015
Utility class for writing Parcelables into a Bundle (ExampleActivity.java uses the Parceler library: https://github.com/johncarl81/parceler).
View BundleUtil.java
import android.os.Bundle;
import android.os.Parcelable;
/**
* Utility class for {@link android.os.Bundle}.
* Created by chris on 8/6/14.
*/
public class BundleUtil {
private static final String EXTRA_PARCELABLE_COUNT = "parcelable_count";
@arriolac
arriolac / AlphaImageButton.java
Created Mar 26, 2014
AlphaImageButton - auto shows disabled state on an ImageButton.
View AlphaImageButton.java
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageButton;
public class AlphaImageButton extends ImageButton {
private static final float ENABLED_ALPHA = 1.0f;
private static final float DISABLED_ALPHA = 0.5f;
public AlphaImageButton(Context context) {
@arriolac
arriolac / AutoNextTextWatcher.java
Last active Aug 29, 2015
TextWatcher that will proceed to the next focusable view once the specified length has been reached
View AutoNextTextWatcher.java
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
/**
* Created by chris on 3/13/14.
*/
public class AutoNextTextWatcher implements TextWatcher {
You can’t perform that action at this time.