Skip to content

Commit fd0af61

Browse files
author
elliott.chenger
committed
Updating the text view to be an Android Library Module
1 parent d8808c7 commit fd0af61

File tree

14 files changed

+86
-19
lines changed

14 files changed

+86
-19
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
apply plugin: 'android'
1+
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 19
5-
buildToolsVersion "19.1.0"
4+
compileSdkVersion 22
5+
buildToolsVersion "21.1.2"
66

77
defaultConfig {
8-
minSdkVersion 9
9-
targetSdkVersion 19
8+
minSdkVersion 14
9+
targetSdkVersion 22
1010
versionCode 1
1111
versionName "1.0"
1212
}
1313
buildTypes {
1414
release {
15-
runProguard false
15+
minifyEnabled false
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
1717
}
1818
}
1919
}
2020

2121
dependencies {
2222
compile fileTree(dir: 'libs', include: ['*.jar'])
23-
compile 'com.android.support:appcompat-v7:19.+'
23+
compile 'com.android.support:appcompat-v7:21.+'
24+
compile project(':sizeadjustingtextview')
2425
}

SizeAdjustingTextViewAndroidStudios/app/src/main/java/com/elliott/chenger/autosizingtextexampleproject/app/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import android.widget.TextView.OnEditorActionListener;
1212

1313
import com.elliott.chenger.autosizingtextexampleproject.utils.TextMover;
14-
import com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView;
14+
import com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView;
1515

1616
public class MainActivity extends Activity {
1717

SizeAdjustingTextViewAndroidStudios/app/src/main/java/com/elliott/chenger/autosizingtextexampleproject/utils/TextMover.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.elliott.chenger.autosizingtextexampleproject.utils;
22

3-
import com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView;
3+
import com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView;
44

55
/**
66
* Created by chenger on 5/26/14.

SizeAdjustingTextViewAndroidStudios/app/src/main/res/layout/activity_main.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
android:inputType="textCapSentences" />
1818

1919
<!-- Top Row -->
20-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
20+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
2121
android:id="@+id/topBox"
2222
android:layout_width="fill_parent"
2323
android:layout_height="100dp"
@@ -35,7 +35,7 @@
3535
android:orientation="horizontal"
3636
android:layout_below="@id/topBox" >
3737

38-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
38+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
3939
android:id="@+id/middleLeftBox"
4040
android:layout_width="0dp"
4141
android:layout_height="fill_parent"
@@ -44,7 +44,7 @@
4444
android:padding="0dp"
4545
android:textSize="60sp" />
4646

47-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
47+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
4848
android:id="@+id/middleRightBox"
4949
android:layout_width="0dp"
5050
android:layout_height="fill_parent"
@@ -61,7 +61,7 @@
6161
android:layout_height="100dp"
6262
android:layout_below="@id/middleRow" >
6363

64-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
64+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
6565
android:id="@+id/bottomLeftBox"
6666
android:layout_width="0dp"
6767
android:layout_height="fill_parent"
@@ -70,7 +70,7 @@
7070
android:padding="0dp"
7171
android:textSize="60sp" />
7272

73-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
73+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
7474
android:id="@+id/bottomMiddleBox"
7575
android:layout_width="0dp"
7676
android:layout_height="fill_parent"
@@ -79,7 +79,7 @@
7979
android:padding="0dp"
8080
android:textSize="60sp" />
8181

82-
<com.elliott.chenger.autosizingtextexampleproject.view.SizeAdjustingTextView
82+
<com.omitneedlesscode.sizeadjustingtextview.SizeAdjustingTextView
8383
android:id="@+id/bottomRightBox"
8484
android:layout_width="0dp"
8585
android:layout_height="fill_parent"

SizeAdjustingTextViewAndroidStudios/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:0.9.+'
8+
classpath 'com.android.tools.build:gradle:1.1.0'
99
}
1010
}
1111

SizeAdjustingTextViewAndroidStudios/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':app'
1+
include ':app', ':sizeadjustingtextview'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 22
5+
buildToolsVersion "21.1.2"
6+
7+
defaultConfig {
8+
minSdkVersion 14
9+
targetSdkVersion 22
10+
versionCode 2
11+
versionName "1.1"
12+
}
13+
buildTypes {
14+
release {
15+
minifyEnabled false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
}
18+
}
19+
}
20+
21+
dependencies {
22+
compile fileTree(dir: 'libs', include: ['*.jar'])
23+
compile 'com.android.support:appcompat-v7:22.1.1'
24+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/elliot.chenger/Development/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}

0 commit comments

Comments
 (0)