This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 Square, Inc. | |
package com.squareup.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
public class AspectRatioImageView extends ImageView { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.android.dex; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.Map; | |
import java.util.TreeMap; | |
import java.util.concurrent.atomic.AtomicInteger; | |
public class Summary { | |
public static void main(String[] args) throws IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dex-method-count() { | |
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
} | |
function dex-method-count-by-package() { | |
dir=$(mktemp -d -t dex) | |
baksmali $1 -o $dir | |
for pkg in `find $dir/* -type d`; do | |
smali $pkg -o $pkg/classes.dex | |
count=$(dex-method-count $pkg/classes.dex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import android.content.Context; | |
import com.squareup.okhttp.HttpResponseCache; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.picasso.OkHttpDownloader; | |
import com.squareup.picasso.Picasso; | |
import javax.net.ssl.SSLContext; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.Shader; | |
// enables hardware accelerated rounded corners | |
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2013 Google Inc. | |
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */ | |
package com.example.latlnginterpolation; | |
import android.animation.ObjectAnimator; | |
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.os.Build; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Pre-commit hook for running checkstyle on changed Java sources | |
# | |
# To use this you need: | |
# 1. checkstyle's jar file somewhere | |
# 2. a checkstyle XML check file somewhere | |
# 3. To configure git: | |
# * git config --add checkstyle.jar <location of jar> | |
# * git config --add checkstyle.checkfile <location of checkfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.damon.view; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.support.v4.view.GestureDetectorCompat; | |
import android.text.Spanned; | |
import android.text.style.BackgroundColorSpan; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.GestureDetector; |
OlderNewer