Skip to content

Commit

Permalink
Support AppCompat v26.0.0
Browse files Browse the repository at this point in the history
fixed #59
  • Loading branch information
johnkil committed Jul 26, 2017
1 parent 6b5f60e commit 1341602
Show file tree
Hide file tree
Showing 13 changed files with 210 additions and 193 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ Change Log
==========


## Version 4.0.0

_2017-07-26_

* Support AppCompat v26.0.0. Changed attribute names:
- `typeface` -> `robotoTypeface`
- `fontFamily` -> `robotoFontFamily`
- `textWeight` -> `robotoTextWeight`
- `textStyle` -> `robotoTextStyle`


## Version 3.0.0

_2017-02-14_
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ Supported fonts:
</a>


Deprecated :cry:
----------

This project is deprecated in favor of the [native implementation](https://developer.android.com/preview/features/fonts-in-xml.html) introduced in Android O.


Compatibility
-------------

This library is compatible from API 9 (Android 2.3).
This library is compatible from API 14 (Android 4.0).


Download
Expand All @@ -32,7 +38,7 @@ Download
Gradle:

```groovy
compile 'com.github.johnkil.android-robototextview:robototextview:3.0.0'
compile 'com.github.johnkil.android-robototextview:robototextview:4.0.0'
```

Maven:
Expand All @@ -41,7 +47,7 @@ Maven:
<dependency>
<groupId>com.github.johnkil.android-robototextview</groupId>
<artifactId>robototextview</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
<type>aar</type>
</dependency>
```
Expand All @@ -52,27 +58,27 @@ Usage

#### In XML

To set up a typeface you must specify the parameter `typeface`:
To set up a typeface you must specify the parameter `robotoTypeface`:

``` xml
<com.devspark.robototextview.widget.RobotoTextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:typeface="roboto_light_italic"/>
app:robotoTypeface="roboto_light_italic"/>
```

or specify a set of parameters `fontFamily`, `textWeight` and `textStyle`:
or specify a set of parameters `robotoFontFamily`, `robotoTextWeight` and `robotoTextStyle`:
``` xml
<com.devspark.robototextview.widget.RobotoTextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:fontFamily="roboto"
app:textWeight="light"
app:textStyle="italic"/>
app:robotoFontFamily="roboto"
app:robotoTextWeight="light"
app:robotoTextStyle="italic"/>
```

Set up typeface in code:
Expand Down Expand Up @@ -137,7 +143,7 @@ and specify the typeface in xml:
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:typeface="roboto_light_italic"
app:robotoTypeface="roboto_light_italic"
tools:ignore="MissingPrefix"/>
```

Expand All @@ -159,7 +165,7 @@ android.applicationVariants.all{ variant ->
if (file.getName().contains("RobotoSlab")) {
println("delete " + file.getName() + " font")
file.delete()
};
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
}
}
Expand Down
14 changes: 7 additions & 7 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ext.versions = [
minSdk : 9,
targetSdk : 25,
compileSdk : 25,
buildTools : '25.0.2',
minSdk : 14,
targetSdk : 26,
compileSdk : 26,
buildTools : '26.0.1',

androidGradlePlugin : '2.3.0-beta3',
versionsGradlePlugin: '0.14.0',
androidGradlePlugin : '2.3.3',
versionsGradlePlugin: '0.15.0',

junit : '4.12',
supportLib : '25.1.1'
supportLib : '26.0.0'
]

ext.gradlePlugins = [
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GROUP=com.github.johnkil.android-robototextview
VERSION_NAME=3.0.0
VERSION_NAME=4.0.0

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.
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.

POM_URL=https://github.com/johnkil/Android-RobotoTextView
POM_SCM_URL=https://github.com/johnkil/Android-RobotoTextView
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Feb 12 01:14:28 MSK 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
Loading

0 comments on commit 1341602

Please sign in to comment.