Skip to content

Instantly share code, notes, and snippets.

View adneal's full-sized avatar

Andrew Neal adneal

View GitHub Profile
@adneal
adneal / ProgressTracker.java
Last active May 19, 2018 13:05
A way to swipe between the children of a ViewPager using the ActionBar. Similar the Google Chrome app for Android.
/**
* A {@link LinearLayout} that tracks a user's finger movement
*
* @author Andrew Neal (andrew@seeingpixels.org)
*/
public class ProgressTracker extends LinearLayout {
/** The callback invoked depicting the current finger movement */
private OnProgressChangeListner mCallback;
/** Used to track the velocity of the finger movement */
@adneal
adneal / ProgressDrawable.java
Last active August 23, 2016 17:31
A custom ColorDrawable that can easily be implemented as a progress bar.
/*
* Copyright 2013 Andrew Neal
*
* 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