Skip to content

Commit 6854cb7

Browse files
committed
Merge branch 'release/v2.5.1'
2 parents ab4aaff + 9488574 commit 6854cb7

File tree

54 files changed

+4549
-2636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4549
-2636
lines changed

README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ Use the icons in the variation you need them.
2222
- Save in APK size
2323

2424
**Already available fonts**
25-
- FontAwesome
26-
- Material Design Icons
27-
- Meteocons
28-
- Octicons
29-
- Community Material Icons
30-
- Weather Icons
31-
- Typeicons
32-
- Entypo
25+
- [Google Material Design Icons](https://github.com/google/material-design-icons)
26+
- [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font)
27+
- [Fontawesome](http://fontawesome.io)
28+
- [Meteocons](http://www.alessioatzeni.com/meteocons/)
29+
- [Octicons](https://github.com/github/octicons)
30+
- [Community Material](http://materialdesignicons.com/)
31+
- [Weather Icons](https://erikflowers.github.io/weather-icons/)
32+
- [Typeicons](http://typicons.com/)
33+
- [Entypo](http://www.entypo.com/)
34+
- [Devicon](http://devicon.fr/)
35+
- [Foundation Icons](http://zurb.com/playground/foundation-icon-fonts-3)
36+
- [Ionicons](http://ionicons.com/)
3337

3438
**Need more?**
3539
Provide additional fonts for you project, or even create your custom font with just the icons you need.
@@ -42,22 +46,24 @@ Provide additional fonts for you project, or even create your custom font with j
4246
##1. Provide the gradle dependency
4347
```gradle
4448
dependencies {
45-
compile 'com.mikepenz:iconics-core:2.5.0@aar'
49+
compile 'com.mikepenz:iconics-core:2.5.1@aar'
4650
}
4751
```
4852

4953
##2. Choose your desired fonts
5054
```gradle
51-
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
52-
//this one is the original set by google different baseline may (really really rare) mapping issues on single custom roms
5355
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
54-
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
56+
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
57+
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1@aar'
5558
compile 'com.mikepenz:octicons-typeface:3.2.0.1@aar'
5659
compile 'com.mikepenz:meteocons-typeface:1.1.0.1@aar'
5760
compile 'com.mikepenz:community-material-typeface:1.3.41.1@aar'
5861
compile 'com.mikepenz:weather-icons-typeface:2.0.10.1@aar'
5962
compile 'com.mikepenz:typeicons-typeface:2.0.7.1@aar'
60-
compile 'com.mikepenz:entypo:1.0.0.1@aar'
63+
compile 'com.mikepenz:entypo-typeface:1.0.0.1@aar'
64+
compile 'com.mikepenz:devicon-typeface:2.0.0.1@aar'
65+
compile 'com.mikepenz:foundation-icons-typeface-typeface:3.0.0.1@aar'
66+
compile 'com.mikepenz:ionicons-typeface:2.0.1.1@aar'
6167
```
6268

6369
##3. Define IconicsLayoutInflater to enable automatic xml icons detection (optional)
@@ -172,10 +178,12 @@ Some great text with a {faw-android} font awesome icon and {met-wind} meteocons
172178

173179

174180
#Available fonts
175-
* [Google Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font) - [Google Material Design Icons](https://github.com/google/material-design-icons)
181+
* [Google Material Design Icons](https://github.com/google/material-design-icons)
176182
* "gmd"
177-
* **Google Material Iconic** compile 'com.mikepenz:google-material-typeface:+@aar'
178183
* **ORIGINAL by Google** compile 'com.mikepenz:google-material-typeface:+.original@aar'
184+
* [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font)
185+
* "gmi"
186+
* **Google Material Iconic** compile 'com.mikepenz:material-design-iconic-typeface:+@aar'
179187
* [Fontawesome](http://fontawesome.io)
180188
* "faw"
181189
* compile 'com.mikepenz:fontawesome-typeface:+@aar'
@@ -196,8 +204,18 @@ Some great text with a {faw-android} font awesome icon and {met-wind} meteocons
196204
* compile 'com.mikepenz:typeicons-typeface:+@aar'
197205
* [Entypo](http://www.entypo.com/)
198206
* "ent"
199-
* compile 'com.mikepenz:entypo:+@aar'
200-
207+
* compile 'com.mikepenz:entypo-typeface:+@aar'
208+
* [Devicon](http://devicon.fr/)
209+
* "dev"
210+
* compile 'com.mikepenz:devicon-typeface:+@aar'
211+
* [Foundation Icons](http://zurb.com/playground/foundation-icon-fonts-3)
212+
* "fou"
213+
* compile 'com.mikepenz:foundation-icons-typeface:+@aar'
214+
* [Ionicons](http://ionicons.com/)
215+
* "ion"
216+
* compile 'com.mikepenz:ionicons-typeface:+@aar'
217+
218+
Licenses for all included fonts are linked inside the class or can be found on the coresponding repoistories.
201219

202220
#Advanced Usage
203221

app/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
defaultConfig {
1313
minSdkVersion rootProject.ext.minSdkVersion
1414
targetSdkVersion rootProject.ext.targetSdkVersion
15-
versionCode 250
16-
versionName "2.5.0"
15+
versionCode 251
16+
versionName "2.5.1"
1717
enforceUniquePackageName false
1818
}
1919

@@ -65,12 +65,15 @@ dependencies {
6565
}
6666

6767
compile project(':fontawesome-typeface-library')
68+
compile project(':material-design-iconic-typeface-library')
6869
compile project(':google-material-typeface-library')
69-
//compile project(':original-google-material-typeface-library')
7070
compile project(':meteocons-typeface-library')
7171
compile project(':weather-icons-typeface-library')
7272
compile project(':octicons-typeface-library')
7373
compile project(':community-material-typeface-library')
7474
compile project(':entypo-typeface-library')
7575
compile project(':typeicons-typeface-library')
76+
compile project(':devicon-typeface-library')
77+
compile project(':foundation-icons-typeface-library')
78+
compile project(':ionicons-typeface-library')
7679
}

app/src/main/java/com/mikepenz/iconics/sample/CustomApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void onCreate() {
1717
Iconics.registerFont(new CustomFont());
1818

1919
//Generic font creation process
20-
GenericFont gf2 = new GenericFont("gmf", "fonts/materialdrawerfont.ttf");
20+
GenericFont gf2 = new GenericFont("GenericFont", "SampleGenericFont", "gmf", "fonts/materialdrawerfont.ttf");
2121
gf2.registerIcon("person", '\ue800');
2222
gf2.registerIcon("up", '\ue801');
2323
gf2.registerIcon("down", '\ue802');

app/src/main/java/com/mikepenz/iconics/sample/MainActivity.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,18 @@
4444
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
4545

4646
import java.util.ArrayList;
47+
import java.util.Collections;
48+
import java.util.Comparator;
4749
import java.util.Iterator;
50+
import java.util.List;
4851
import java.util.Random;
4952

5053

5154
public class MainActivity extends AppCompatActivity {
5255

5356
private IconsFragment mIconsFragment;
5457
private boolean mRandomize;
55-
58+
private List<ITypeface> mFonts;
5659

5760
@Override
5861
protected void onCreate(Bundle savedInstanceState) {
@@ -64,9 +67,18 @@ protected void onCreate(Bundle savedInstanceState) {
6467
setSupportActionBar(toolbar);
6568
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
6669

67-
ArrayList<IDrawerItem> items = new ArrayList<>(Iconics.getRegisteredFonts(this).size());
70+
//order fonts by their name
71+
mFonts = new ArrayList<>(Iconics.getRegisteredFonts(this));
72+
Collections.sort(mFonts, new Comparator<ITypeface>() {
73+
@Override
74+
public int compare(final ITypeface object1, final ITypeface object2) {
75+
return object1.getFontName().compareTo(object2.getFontName());
76+
}
77+
});
78+
6879
//add all icons of all registered Fonts to the list
69-
for (ITypeface font : Iconics.getRegisteredFonts(this)) {
80+
ArrayList<IDrawerItem> items = new ArrayList<>(Iconics.getRegisteredFonts(this).size());
81+
for (ITypeface font : mFonts) {
7082
PrimaryDrawerItem pdi = new PrimaryDrawerItem()
7183
.withName(font.getFontName())
7284
.withBadge("" + font.getIcons().size())
@@ -89,10 +101,8 @@ protected void onCreate(Bundle savedInstanceState) {
89101
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
90102
@Override
91103
public boolean onItemClick(View view, int i, IDrawerItem iDrawerItem) {
92-
ITypeface font = new ArrayList<>(Iconics.getRegisteredFonts(MainActivity.this)).get(i);
93-
loadIcons(font.getFontName());
94-
95-
getSupportActionBar().setTitle(font.getFontName());
104+
loadIcons(mFonts.get(i).getFontName());
105+
getSupportActionBar().setTitle(mFonts.get(i).getFontName());
96106

97107
return false;
98108
}

app/src/main/java/com/mikepenz/iconics/sample/typeface/CustomFont.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public String getFontName() {
5050

5151
@Override
5252
public String getVersion() {
53-
return "";
53+
return "1.0.0";
5454
}
5555

5656
@Override
@@ -72,7 +72,7 @@ public Collection<String> getIcons() {
7272

7373
@Override
7474
public String getAuthor() {
75-
return "";
75+
return "SampleCustomFont";
7676
}
7777

7878
@Override

build.gradle

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

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2014 Mike Penz
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'com.android.library'
18+
19+
android {
20+
compileSdkVersion rootProject.ext.compileSdkVersion
21+
buildToolsVersion '23.0.2'
22+
23+
defaultConfig {
24+
minSdkVersion rootProject.ext.minSdkVersion
25+
targetSdkVersion rootProject.ext.targetSdkVersion
26+
consumerProguardFiles 'consumer-proguard-rules.pro'
27+
versionCode 20001
28+
versionName "2.0.0.1"
29+
}
30+
buildTypes {
31+
release {
32+
minifyEnabled false
33+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34+
}
35+
}
36+
}
37+
if (project.hasProperty('pushall') || project.hasProperty('DevIcononly')) {
38+
apply from: '../gradle-mvn-push.gradle'
39+
}
40+
41+
dependencies {
42+
compile project(':library-core')
43+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-keep class com.mikepenz.devicon_typeface_library.DevIcon { *; }

original-google-material-typeface-library/gradle.properties renamed to devicon-typeface-library/gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
# This option should only be used with decoupled projects. More details, visit
3333
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
3434
# org.gradle.parallel=true
35-
VERSION_NAME=2.1.0.1.original
36-
VERSION_CODE=21001
35+
VERSION_NAME=2.0.0.1
36+
VERSION_CODE=20001
3737

38-
POM_NAME=Android-Iconics Google Material Typeface Library
39-
POM_ARTIFACT_ID=google-material-typeface
38+
POM_NAME=Android-Iconics DevIcon Typeface Library
39+
POM_ARTIFACT_ID=devicon-typeface
4040
POM_PACKAGING=aar

original-google-material-typeface-library/src/main/AndroidManifest.xml renamed to devicon-typeface-library/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
~ limitations under the License.
1515
-->
1616

17-
<manifest package="com.mikepenz.google_material_typeface_library">
17+
<manifest package="com.mikepenz.devicon_typeface_library">
1818
<application/>
1919
</manifest>

0 commit comments

Comments
 (0)