Skip to content

Instantly share code, notes, and snippets.

View dlazaro66's full-sized avatar

David Lázaro dlazaro66

View GitHub Profile
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.PowerManager;
import android.support.annotation.NonNull;
import android.support.v4.view.ViewCompat;
import android.view.View;
@Aracem
Aracem / MasterTrackingHelper.java
Created July 21, 2015 21:23
Aspect Oriented Development with a Tracking Sample
package com.aracem.sample.tracking;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.aracem.sample.tracking.trackingservice.MixpanelTrackingHelper;
import com.aracem.sample.tracking.trackingservice.GoogleAnalyticsTrackingHelper;
@seanKenkeremath
seanKenkeremath / Android Lollipop Widget Tinting Guide
Last active November 17, 2023 12:40
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@melanke
melanke / MLRoundedImageView.java
Created October 25, 2013 17:19
Android Rounded Image
public class MLRoundedImageView extends ImageView {
public MLRoundedImageView(Context context) {
super(context);
}
public MLRoundedImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}