Skip to content

Commit

Permalink
Change the code style to AndroidModernStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ogaclejapan committed May 10, 2015
1 parent 276e32b commit 3aa673f
Show file tree
Hide file tree
Showing 58 changed files with 2,250 additions and 2,254 deletions.
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {

version = VERSION_NAME
group = GROUP
version = VERSION_NAME
group = GROUP

repositories {
jcenter()
}
repositories {
jcenter()
}
}
64 changes: 32 additions & 32 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion 14
targetSdkVersion COMPILE_SDK_VERSION as int
versionCode VERSION_CODE as int
versionName VERSION_NAME
}
defaultConfig {
minSdkVersion 14
targetSdkVersion COMPILE_SDK_VERSION as int
versionCode VERSION_CODE as int
versionName VERSION_NAME
}

def secretFile = file("${rootDir}/secret.gradle")
if (secretFile.exists()) {
apply from: secretFile.absolutePath
signingConfigs {
release {
storeFile project.ext.storeFile
storePassword project.ext.storePassword
keyAlias project.ext.keyAlias
keyPassword project.ext.keyPassword
}
}
def secretFile = file("${rootDir}/secret.gradle")
if (secretFile.exists()) {
apply from: secretFile.absolutePath
signingConfigs {
release {
storeFile project.ext.storeFile
storePassword project.ext.storePassword
keyAlias project.ext.keyAlias
keyPassword project.ext.keyPassword
}
}
}

buildTypes {
release {
if (secretFile.exists()) {
signingConfig signingConfigs.release
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
buildTypes {
release {
if (secretFile.exists()) {
signingConfig signingConfigs.release
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}

dependencies {
compile project(':library')
compile 'com.android.support:appcompat-v7:22.0.0'
compile project(':library')
compile 'com.android.support:appcompat-v7:22.0.0'
}
69 changes: 41 additions & 28 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="https://schemas.android.com/apk/res/android"
package="com.ogaclejapan.arclayout.demo">
<manifest
xmlns:android="https://schemas.android.com/apk/res/android"
package="com.ogaclejapan.arclayout.demo"
>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
>

<activity
android:name=".MainActivity"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name=".DemoActivity"
android:label="@string/app_name"
/>

<activity
android:name=".DemoFreeAngleActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".DemoActivity"
android:label="@string/app_name" />
<activity
android:name=".DemoFreeAngleActivity"
android:label="@string/app_name" />
<activity
android:name=".DemoLikeTumblrActivity"
android:label="@string/app_name" />
<activity
android:name=".DemoLikePathActivity"
android:label="@string/app_name" />

</application>
/>

<activity
android:name=".DemoLikeTumblrActivity"
android:label="@string/app_name"
/>

<activity
android:name=".DemoLikePathActivity"
android:label="@string/app_name"
/>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@

public class AnimatorUtils {

public static final String ROTATION = "rotation";
public static final String SCALE_X = "scaleX";
public static final String SCALE_Y = "scaleY";
public static final String TRANSLATION_X = "translationX";
public static final String TRANSLATION_Y = "translationY";

public static PropertyValuesHolder rotation(float... values) {
return PropertyValuesHolder.ofFloat(ROTATION, values);
}

public static PropertyValuesHolder translationX(float... values) {
return PropertyValuesHolder.ofFloat(TRANSLATION_X, values);
}

public static PropertyValuesHolder translationY(float... values) {
return PropertyValuesHolder.ofFloat(TRANSLATION_Y, values);
}

public static PropertyValuesHolder scaleX(float... values) {
return PropertyValuesHolder.ofFloat(SCALE_X, values);
}

public static PropertyValuesHolder scaleY(float... values) {
return PropertyValuesHolder.ofFloat(SCALE_Y, values);
}

private AnimatorUtils() {
//No instances.
}
public static final String ROTATION = "rotation";
public static final String SCALE_X = "scaleX";
public static final String SCALE_Y = "scaleY";
public static final String TRANSLATION_X = "translationX";
public static final String TRANSLATION_Y = "translationY";

private AnimatorUtils() {
//No instances.
}

public static PropertyValuesHolder rotation(float... values) {
return PropertyValuesHolder.ofFloat(ROTATION, values);
}

public static PropertyValuesHolder translationX(float... values) {
return PropertyValuesHolder.ofFloat(TRANSLATION_X, values);
}

public static PropertyValuesHolder translationY(float... values) {
return PropertyValuesHolder.ofFloat(TRANSLATION_Y, values);
}

public static PropertyValuesHolder scaleX(float... values) {
return PropertyValuesHolder.ofFloat(SCALE_X, values);
}

public static PropertyValuesHolder scaleY(float... values) {
return PropertyValuesHolder.ofFloat(SCALE_Y, values);
}
}
94 changes: 48 additions & 46 deletions demo/src/main/java/com/ogaclejapan/arclayout/demo/Demo.java
Original file line number Diff line number Diff line change
@@ -1,58 +1,60 @@
package com.ogaclejapan.arclayout.demo;

import com.ogaclejapan.arclayout.Arc;

import android.content.Context;

import com.ogaclejapan.arclayout.Arc;

public enum Demo {

//Basic
CENTER(R.string.title_center, R.string.note_center, R.layout.arc_large, Arc.CENTER),
LEFT(R.string.title_left, R.string.note_left, R.layout.arc_medium, Arc.LEFT),
RIGHT(R.string.title_right, R.string.note_right, R.layout.arc_medium, Arc.RIGHT),
TOP(R.string.title_top, R.string.note_top, R.layout.arc_medium, Arc.TOP),
TOP_LEFT(R.string.title_top_left, R.string.note_top_left, R.layout.arc_small, Arc.TOP_LEFT),
TOP_RIGHT(R.string.title_top_right, R.string.note_top_right, R.layout.arc_small, Arc.TOP_RIGHT),
BOTTOM(R.string.title_bottom, R.string.note_bottom, R.layout.arc_medium, Arc.BOTTOM),
BOTTOM_LEFT(R.string.title_bottom_left, R.string.note_bottom_left, R.layout.arc_small, Arc.BOTTOM_LEFT),
BOTTOM_RIGHT(R.string.title_bottom_right, R.string.note_bottom_right, R.layout.arc_small, Arc.BOTTOM_RIGHT),

//Advanced
ADVANCED_FREE_ANGLE(R.string.title_advanced_freeangle, R.string.note_advanced_freeangle, R.layout.arc_free_angle, Arc.CENTER) {
@Override
public void startActivity(Context context) {
DemoFreeAngleActivity.startActivity(context, this);
}
},

ADVANCED_TUMBLR(R.string.title_advanced_tumblr, 0, 0, null) {
@Override
public void startActivity(Context context) {
DemoLikeTumblrActivity.startActivity(context, this);
}
},
ADVANCED_PATH(R.string.title_advanced_path, 0, 0, null) {
@Override
public void startActivity(Context context) {
DemoLikePathActivity.startActivity(context, this);
}
}
;

public final int titleResId;
public final int noteResId;
public final int layoutResId;
public final Arc arc;

Demo(int titleResId, int noteResId, int layoutResId, Arc arc) {
this.titleResId = titleResId;
this.noteResId = noteResId;
this.layoutResId = layoutResId;
this.arc = arc;
//Basic
CENTER(R.string.title_center, R.string.note_center, R.layout.arc_large, Arc.CENTER),
LEFT(R.string.title_left, R.string.note_left, R.layout.arc_medium, Arc.LEFT),
RIGHT(R.string.title_right, R.string.note_right, R.layout.arc_medium, Arc.RIGHT),
TOP(R.string.title_top, R.string.note_top, R.layout.arc_medium, Arc.TOP),
TOP_LEFT(R.string.title_top_left, R.string.note_top_left, R.layout.arc_small, Arc.TOP_LEFT),
TOP_RIGHT(R.string.title_top_right, R.string.note_top_right, R.layout.arc_small, Arc.TOP_RIGHT),
BOTTOM(R.string.title_bottom, R.string.note_bottom, R.layout.arc_medium, Arc.BOTTOM),
BOTTOM_LEFT(R.string.title_bottom_left, R.string.note_bottom_left, R.layout.arc_small,
Arc.BOTTOM_LEFT),
BOTTOM_RIGHT(R.string.title_bottom_right, R.string.note_bottom_right, R.layout.arc_small,
Arc.BOTTOM_RIGHT),

//Advanced
ADVANCED_FREE_ANGLE(R.string.title_advanced_freeangle, R.string.note_advanced_freeangle,
R.layout.arc_free_angle, Arc.CENTER) {
@Override
public void startActivity(Context context) {
DemoFreeAngleActivity.startActivity(context, this);
}
},

ADVANCED_TUMBLR(R.string.title_advanced_tumblr, 0, 0, null) {
@Override
public void startActivity(Context context) {
DemoLikeTumblrActivity.startActivity(context, this);
}
},
ADVANCED_PATH(R.string.title_advanced_path, 0, 0, null) {
@Override
public void startActivity(Context context) {
DemoActivity.startActivity(context, this);
DemoLikePathActivity.startActivity(context, this);
}
};

public final int titleResId;
public final int noteResId;
public final int layoutResId;
public final Arc arc;

Demo(int titleResId, int noteResId, int layoutResId, Arc arc) {
this.titleResId = titleResId;
this.noteResId = noteResId;
this.layoutResId = layoutResId;
this.arc = arc;
}

public void startActivity(Context context) {
DemoActivity.startActivity(context, this);
}

}
Loading

0 comments on commit 3aa673f

Please sign in to comment.