forked from ogaclejapan/ArcLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the code style to AndroidModernStyle
- Loading branch information
1 parent
276e32b
commit 3aa673f
Showing
58 changed files
with
2,250 additions
and
2,254 deletions.
There are no files selected for viewing
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
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() | ||
} | ||
} |
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
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' | ||
} |
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
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> |
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
94 changes: 48 additions & 46 deletions
94
demo/src/main/java/com/ogaclejapan/arclayout/demo/Demo.java
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
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); | ||
} | ||
|
||
} |
Oops, something went wrong.