View MultiDraweeView.java
package me.s1rius.multidrawee;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
View DownsampleUtil.java
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.imagepipeline.producers;
View Build OpenCV&Matering on mac
1.download opencv 2.4.11 on ~/opencv-2.4.11
2.download cmake-3.5.1-Darwin-x86_64.dmg and install
3.clone https://github.com/MasteringOpenCV/code on ~/MasteringOpenCV
4.use cmake build opencv like https://www.youtube.com/watch?v=U49CVY8yOxw
5.cd MasteringOpenCV
6.mkdir build, cd build
7.export OpenCV_DIR="~/opencv-2.4.11/build"
8.cmake -D OpenCV_DIR=$OpenCV_DIR ../src
9.make install
10.done
View ProgressBarAnimation
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.ProgressBar;
public class ProgressBarAnimation extends Animation {
private ProgressBar mProgressBar;
private int mTo;
private int mFrom;
private long mStepDuration;
View proguard.cfg
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
View GoogleDriverSample
package com.intel.driveapp;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import java.util.ArrayList;
View build.gradle
// Just a dummy script building a useless jar file. Waiting for version 0.3 of Android's new build system.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7+'
}
}
View FirstTest
package com.mypackage;
import static org.junit.Assert.assertEquals;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.robolectric.RobolectricTestRunner;
import android.app.Activity;
import android.widget.TextView;
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'