Skip to content

Commit 1341602

Browse files
committed
Support AppCompat v26.0.0
fixed #59
1 parent 6b5f60e commit 1341602

File tree

13 files changed

+210
-193
lines changed

13 files changed

+210
-193
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ Change Log
22
==========
33

44

5+
## Version 4.0.0
6+
7+
_2017-07-26_
8+
9+
* Support AppCompat v26.0.0. Changed attribute names:
10+
- `typeface` -> `robotoTypeface`
11+
- `fontFamily` -> `robotoFontFamily`
12+
- `textWeight` -> `robotoTextWeight`
13+
- `textStyle` -> `robotoTextStyle`
14+
15+
516
## Version 3.0.0
617

718
_2017-02-14_

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ Supported fonts:
2020
</a>
2121

2222

23+
Deprecated :cry:
24+
----------
25+
26+
This project is deprecated in favor of the [native implementation](https://developer.android.com/preview/features/fonts-in-xml.html) introduced in Android O.
27+
28+
2329
Compatibility
2430
-------------
2531

26-
This library is compatible from API 9 (Android 2.3).
32+
This library is compatible from API 14 (Android 4.0).
2733

2834

2935
Download
@@ -32,7 +38,7 @@ Download
3238
Gradle:
3339

3440
```groovy
35-
compile 'com.github.johnkil.android-robototextview:robototextview:3.0.0'
41+
compile 'com.github.johnkil.android-robototextview:robototextview:4.0.0'
3642
```
3743

3844
Maven:
@@ -41,7 +47,7 @@ Maven:
4147
<dependency>
4248
<groupId>com.github.johnkil.android-robototextview</groupId>
4349
<artifactId>robototextview</artifactId>
44-
<version>3.0.0</version>
50+
<version>4.0.0</version>
4551
<type>aar</type>
4652
</dependency>
4753
```
@@ -52,27 +58,27 @@ Usage
5258

5359
#### In XML
5460

55-
To set up a typeface you must specify the parameter `typeface`:
61+
To set up a typeface you must specify the parameter `robotoTypeface`:
5662

5763
``` xml
5864
<com.devspark.robototextview.widget.RobotoTextView
5965
xmlns:android="http://schemas.android.com/apk/res/android"
6066
xmlns:app="http://schemas.android.com/apk/res-auto"
6167
android:layout_width="wrap_content"
6268
android:layout_height="wrap_content"
63-
app:typeface="roboto_light_italic"/>
69+
app:robotoTypeface="roboto_light_italic"/>
6470
```
6571

66-
or specify a set of parameters `fontFamily`, `textWeight` and `textStyle`:
72+
or specify a set of parameters `robotoFontFamily`, `robotoTextWeight` and `robotoTextStyle`:
6773
``` xml
6874
<com.devspark.robototextview.widget.RobotoTextView
6975
xmlns:android="http://schemas.android.com/apk/res/android"
7076
xmlns:app="http://schemas.android.com/apk/res-auto"
7177
android:layout_width="wrap_content"
7278
android:layout_height="wrap_content"
73-
app:fontFamily="roboto"
74-
app:textWeight="light"
75-
app:textStyle="italic"/>
79+
app:robotoFontFamily="roboto"
80+
app:robotoTextWeight="light"
81+
app:robotoTextStyle="italic"/>
7682
```
7783

7884
Set up typeface in code:
@@ -137,7 +143,7 @@ and specify the typeface in xml:
137143
xmlns:app="http://schemas.android.com/apk/res-auto"
138144
android:layout_width="wrap_content"
139145
android:layout_height="wrap_content"
140-
app:typeface="roboto_light_italic"
146+
app:robotoTypeface="roboto_light_italic"
141147
tools:ignore="MissingPrefix"/>
142148
```
143149

@@ -159,7 +165,7 @@ android.applicationVariants.all{ variant ->
159165
if (file.getName().contains("RobotoSlab")) {
160166
println("delete " + file.getName() + " font")
161167
file.delete()
162-
};
168+
}
163169
}
164170
}
165171
}

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ buildscript {
1414

1515
allprojects {
1616
repositories {
17+
google()
1718
jcenter()
1819
}
1920
}

dependencies.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ext.versions = [
2-
minSdk : 9,
3-
targetSdk : 25,
4-
compileSdk : 25,
5-
buildTools : '25.0.2',
2+
minSdk : 14,
3+
targetSdk : 26,
4+
compileSdk : 26,
5+
buildTools : '26.0.1',
66

7-
androidGradlePlugin : '2.3.0-beta3',
8-
versionsGradlePlugin: '0.14.0',
7+
androidGradlePlugin : '2.3.3',
8+
versionsGradlePlugin: '0.15.0',
99

1010
junit : '4.12',
11-
supportLib : '25.1.1'
11+
supportLib : '26.0.0'
1212
]
1313

1414
ext.gradlePlugins = [

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GROUP=com.github.johnkil.android-robototextview
2-
VERSION_NAME=3.0.0
2+
VERSION_NAME=4.0.0
33

4-
POM_DESCRIPTION=Implementation of the fragment with the ability to display indeterminate progress indicator when you are waiting for the initial dataImplementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab and Roboto Mono fonts.
4+
POM_DESCRIPTION=Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab and Roboto Mono fonts.
55

66
POM_URL=https://github.com/johnkil/Android-RobotoTextView
77
POM_SCM_URL=https://github.com/johnkil/Android-RobotoTextView

gradle/wrapper/gradle-wrapper.jar

505 Bytes
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Feb 12 01:14:28 MSK 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip

gradlew

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)