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
#!/bin/sh | |
# this hook is in SCM so that it can be shared | |
# to install it, create a symbolic link in the projects .git/hooks folder | |
# | |
# i.e. - from the .git/hooks directory, run | |
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
# | |
# to skip the tests, run with the --no-verify argument | |
# i.e. - $ 'git commit --no-verify' |
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 { |