Skip to content

Instantly share code, notes, and snippets.

View corsair992's full-sized avatar

corsair992

  • Pakistan
View GitHub Profile
@corsair992
corsair992 / AttachableSeekBar.java
Last active August 29, 2015 14:07
This is a derivative of the Android SeekBar widget that supports an indicator attached above the thumb. It extends SeekBar for convenience even though most of the functionality in it's base class AbsSeekBar was defined in private methods, and needed to be copied/hacked. The comments are also copied from AbsSeekBar except where evident. The app t…
package com.example.test.widget;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@corsair992
corsair992 / MapViewWrapper.java
Last active April 11, 2016 09:44
This is a wrapper for MapView that can enable live custom info windows in the Android Google Maps API v2. It accomplishes this by wrapping both the MapView and info window View. The MapView wrapper passes on touch events to the info window if one is active, while the info window wrapper refreshes the info window by calling showInfoWindow() on th…
package com.example.liveinfowindow;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import java.util.HashMap;
import java.util.Map;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Matrix;