Skip to content

Commit

Permalink
-- Updated project to use latest SDK
Browse files Browse the repository at this point in the history
-- Removed unused resources
-- Included material color scheme
  • Loading branch information
amulyakhare committed Jan 20, 2015
1 parent 3fa69da commit 558677e
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 34 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories{
}
dependencies {
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}
```

Expand Down Expand Up @@ -83,7 +83,7 @@ TextDrawable drawable = TextDrawable.builder()
####5. Built-in color generator:

```java
ColorGenerator generator = ColorGenerator.DEFAULT;
ColorGenerator generator = ColorGenerator.MATERIAL; // or use DEFAULT
// generate random color
int color1 = generator.getRandomColor();
// generate color based on a key (same key returns the same color), useful for list/grid views
Expand Down Expand Up @@ -124,7 +124,7 @@ image.setImageDrawable(drawable);

####7. Other features:

1. Mix-match with other drawables. Use it in conjunction with `LayerDrawable`, `InsetDrawable`, `AnimationDrawable`, `TransitionDrawable` etc.
1. Mix-match with other drawables. Use it in conjunction with `LayerDrawable`, `InsetDrawable`, `AnimationDrawable`, `TransitionDrawable` etc.

2. Compatible with other views (not just `ImageView`). Use it as background drawable, compound drawable for `TextView`, `Button` etc.

Expand Down
4 changes: 3 additions & 1 deletion TextDrawable.iml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.14.0'
classpath 'com.android.tools.build:gradle:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Nov 14 11:24:15 SGT 2014
#Sun Jan 04 21:42:37 SGT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
8 changes: 3 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ android {
buildToolsVersion "21.1.1"

defaultConfig {
applicationId "com.amulyakhare.textdrawable"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.1"
}
buildTypes {
release {
runProguard false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
}

sourceSets {
Expand Down
5 changes: 1 addition & 4 deletions library/library.iml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
Expand Down Expand Up @@ -85,9 +85,6 @@
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-21.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.0" level="project" />
</component>
</module>

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class ColorGenerator {

public static ColorGenerator DEFAULT;

public static ColorGenerator MATERIAL;

static {
DEFAULT = create(Arrays.asList(
0xfff16364,
Expand All @@ -24,6 +26,25 @@ public class ColorGenerator {
0xffad62a7,
0xff805781
));
MATERIAL = create(Arrays.asList(
0xffe57373,
0xfff06292,
0xffba68c8,
0xff9575cd,
0xff7986cb,
0xff64b5f6,
0xff4fc3f7,
0xff4dd0e1,
0xff4db6ac,
0xff81c784,
0xffaed581,
0xffff8a65,
0xffd4e157,
0xffffd54f,
0xffffb74d,
0xffa1887f,
0xff90a4ae
));
}

private final List<Integer> mColors;
Expand Down
Binary file removed library/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed library/src/main/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed library/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary file not shown.
3 changes: 0 additions & 3 deletions library/src/main/res/values/strings.xml

This file was deleted.

8 changes: 0 additions & 8 deletions library/src/main/res/values/styles.xml

This file was deleted.

6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ android {
applicationId "com.amulyakhare.td"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionCode 2
versionName "1.0"
}
buildTypes {
release {
runProguard false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -22,5 +22,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.3'
}
6 changes: 3 additions & 3 deletions sample/sample.iml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-21.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="module" module-name="library" exported="" />
</component>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ListActivity extends ActionBarActivity {
);

// declare the color generator and drawable builder
private ColorGenerator mColorGenerator = ColorGenerator.DEFAULT;
private ColorGenerator mColorGenerator = ColorGenerator.MATERIAL;
private TextDrawable.IBuilder mDrawableBuilder;

@Override
Expand Down

0 comments on commit 558677e

Please sign in to comment.