Skip to content

Instantly share code, notes, and snippets.

@mandhor
mandhor / burgerArrowTransition.java
Created April 6, 2015 17:13
Android - method for animating ActionBarDrawerToggle between hamburger (drawer) and back arrow (home)
android.support.v7.app.ActionBarDrawerToggle mDrawerToggle;
android.support.v4.widget.DrawerLayout mDrawerLayout;
public void burgerArrowTransition(final boolean burgerToArrow) {
float start, end;
mDrawerToggle.setDrawerIndicatorEnabled(true);
if(burgerToArrow) {
start = 0.0f;
@mandhor
mandhor / gist:0443ddf151ab2bdbdffc
Last active May 29, 2019 19:46
[ SOLUTION ] JSON REST API returning List of different objects - source of LinkedTreeMap problem when deserializing data
// Source of problem
// JSON output from API
[
{
"id": 1,
"created_at": "01-06-2014",
"type": "message",
"text": "Hi there!",
"from": {
@mandhor
mandhor / CustomMarkerGenerator
Last active August 29, 2015 14:18
Custom GoogleMap marker with text drawn
//add dependency: com.google.maps.android:android-maps-utils:0.3.4
GoogleMap map; //map reference
LatLng point; //LatLng point reference
String markerText = "123"; //text on marker
IconGenerator iconFactory = new IconGenerator(context);
iconFactory.setBackground(context.getResources().getDrawable(R.drawable.custom_marker));
iconFactory.setTextAppearance(context, R.style.custom_text_apperance);
Bitmap icon = iconFactory.makeIcon(markerText);
Download the following ZIPs:
ARM Translation Installer v1.1 (http://goo.gl/tfjjMt)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358558856 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)