Skip to content

Commit c694790

Browse files
committed
Merge branch 'release/v2.0.0'
2 parents 86467d2 + 0839cef commit c694790

File tree

30 files changed

+2786
-2101
lines changed

30 files changed

+2786
-2101
lines changed

DEV/font-modifying-mac/info.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#http://mbauman.net/geek/2009/03/15/minor-truetype-font-editing-on-a-mac/
2+
#dumping
3+
ftxdumperfuser -t cmap -A d MaterialIcons-Regular.ttf
4+
#add-back
5+
ftxdumperfuser -t cmap -A f MaterialIcons-Regular.ttf

README.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,26 @@ Provide additional fonts for you project, or even create your custom font with j
3636
>* there is now a core package which comes without included fonts
3737
>* provide the fonts you need. no additional steps required
3838
39+
> UPGRADE < Google Material font 1.2.0.1 --> 2.1.2.1
40+
>* the mapping of some icons changed
41+
3942

4043
#Setup
4144

4245
##1. Provide the gradle dependency
4346
```gradle
4447
dependencies {
45-
compile 'com.mikepenz:iconics-core:1.7.9@aar'
48+
compile 'com.mikepenz:iconics-core:2.0.0@aar'
4649
}
4750
```
4851

4952
##2. Choose your desired fonts
5053
```gradle
51-
compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'
54+
compile 'com.mikepenz:google-material-typeface:2.1.2.1@aar'
5255
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
5356
compile 'com.mikepenz:octicons-typeface:3.0.0.1@aar'
5457
compile 'com.mikepenz:meteocons-typeface:1.1.0.1@aar'
55-
compile 'com.mikepenz:community-material-typeface:1.2.64.1@aar'
58+
compile 'com.mikepenz:community-material-typeface:1.2.65.1@aar'
5659
```
5760

5861
#Usage
@@ -89,6 +92,33 @@ To use the icon within text use the `{` icon-definer `}` syntax
8992
Some great text with a {faw-android} font awesome icon and {met-wind} meteocons icons.
9093
```
9194

95+
###Normal Views
96+
97+
####TextView / Button
98+
If you are going to use the **Android-Iconics** on normal `TextView`s or `Buttons` you will have to overwrite
99+
the `attachBaseContext` of your Activity.
100+
101+
**Note:** If you are going to use the **Android-Iconics** manually via `new Iconics.IconicsBuilder().ctx(this)....on(tv1) you should not use this.
102+
103+
```java
104+
@Override
105+
protected void attachBaseContext(Context newBase) {
106+
super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
107+
}
108+
```
109+
110+
```xml
111+
<TextView
112+
android:text="{gmd-chart} Chart"
113+
android:textColor="@android:color/black"
114+
android:layout_width="wrap_content"
115+
android:layout_height="56dp"
116+
android:textSize="16sp"/>
117+
```
118+
119+
120+
###Custom Views
121+
92122
####As IconicsTextView
93123
```xml
94124
<com.mikepenz.iconics.view.IconicsTextView
@@ -118,6 +148,7 @@ Some great text with a {faw-android} font awesome icon and {met-wind} meteocons
118148
* "faw"
119149
* DEFAULT
120150
* [Google Material Design Icons](https://github.com/google/material-design-icons)
151+
* **NEW SOURCE** [Google Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font)
121152
* "gmd"
122153
* DEFAULT
123154
* [Meteocons](http://www.alessioatzeni.com/meteocons/)

app/build.gradle

Lines changed: 4 additions & 4 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 179
16-
versionName "1.7.9"
15+
versionCode 200
16+
versionName "2.0.0"
1717
enforceUniquePackageName false
1818
}
1919

@@ -58,8 +58,8 @@ dependencies {
5858
compile 'com.android.support:recyclerview-v7:23.1.0'
5959
compile 'com.android.support:cardview-v7:23.1.0'
6060

61-
compile('com.mikepenz:aboutlibraries:5.2.4@aar')
62-
compile('com.mikepenz:materialdrawer:4.3.6@aar') {
61+
compile('com.mikepenz:aboutlibraries:5.2.7@aar')
62+
compile('com.mikepenz:materialdrawer:4.4.4@aar') {
6363
transitive = true
6464
exclude module: "iconics-core"
6565
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
<activity
1818
android:name=".PlaygroundActivity"
1919
android:label="@string/title_activity_playground"
20-
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar.ActionBar"></activity>
20+
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar.ActionBar" />
21+
<activity
22+
android:name=".AutomaticActivity"
23+
android:label="@string/title_activity_playground"
24+
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar.ActionBar" />
2125
</application>
2226

2327
</manifest>
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+
package com.mikepenz.iconics.sample;
18+
19+
import android.app.Activity;
20+
import android.content.Context;
21+
import android.os.Bundle;
22+
import android.widget.TextView;
23+
24+
import com.mikepenz.iconics.Iconics;
25+
import com.mikepenz.iconics.context.IconicsContextWrapper;
26+
27+
28+
public class AutomaticActivity extends Activity {
29+
30+
@Override
31+
protected void attachBaseContext(Context newBase) {
32+
super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
33+
}
34+
35+
@Override
36+
protected void onCreate(Bundle savedInstanceState) {
37+
super.onCreate(savedInstanceState);
38+
setContentView(R.layout.activity_automatic);
39+
40+
//set a new text on the textView and set the icon font on it
41+
Iconics.update((TextView) findViewById(R.id.test4), "{gmd-favorite} GIF");
42+
}
43+
}

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ private void search(String s) {
122122

123123
MenuItem menuItem = menu.findItem(R.id.action_opensource);
124124
menuItem.setIcon(new IconicsDrawable(this, FontAwesome.Icon.faw_github).actionBar().color(Color.WHITE));
125-
//menuItem.setIcon(new IconicsDrawable(this, "faw-github").actionBarSize().color(Color.WHITE));
126-
127-
128125
return super.onCreateOptionsMenu(menu);
129126
}
130127

@@ -150,8 +147,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
150147

151148
return true;
152149
case R.id.action_playground:
153-
Intent ip = new Intent(getApplicationContext(), PlaygroundActivity.class);
154-
startActivity(ip);
150+
startActivity(new Intent(getApplicationContext(), PlaygroundActivity.class));
151+
return true;
152+
case R.id.action_automatic:
153+
startActivity(new Intent(getApplicationContext(), AutomaticActivity.class));
155154
return true;
156155
default:
157156
return super.onOptionsItemSelected(item);
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17+
xmlns:tools="http://schemas.android.com/tools"
18+
android:layout_width="match_parent"
19+
android:layout_height="match_parent"
20+
android:clipToPadding="false"
21+
android:orientation="vertical"
22+
android:paddingBottom="@dimen/activity_vertical_margin"
23+
android:paddingLeft="@dimen/activity_horizontal_margin"
24+
android:paddingRight="@dimen/activity_horizontal_margin"
25+
android:paddingTop="@dimen/activity_vertical_margin"
26+
tools:context="com.mikepenz.iconics.sample.PlaygroundActivity"
27+
tools:ignore="MissingPrefix">
28+
29+
<ScrollView
30+
android:layout_width="match_parent"
31+
android:layout_height="wrap_content"
32+
android:clipToPadding="false">
33+
34+
<LinearLayout
35+
android:layout_width="match_parent"
36+
android:layout_height="wrap_content"
37+
android:orientation="vertical">
38+
39+
<TextView
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:layout_marginTop="8dp"
43+
android:text="TextView Showcase" />
44+
45+
<LinearLayout
46+
android:layout_width="match_parent"
47+
android:layout_height="1px"
48+
android:layout_marginBottom="8dp"
49+
android:layout_marginTop="8dp"
50+
android:background="#000" />
51+
52+
<TextView
53+
android:id="@+id/test1"
54+
android:layout_width="wrap_content"
55+
android:layout_height="56dp"
56+
android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lm{gmd-plus-circle}n{gmd-speaker}o{met-wind}pqrs{gmd-tab-unselected}tuv{fon-test2}wxy{z"
57+
android:textColor="@android:color/black"
58+
android:textSize="16sp" />
59+
60+
<TextView
61+
android:id="@+id/test5"
62+
android:layout_width="wrap_content"
63+
android:layout_height="56dp"
64+
android:text="somecustomtext with a custom icon :D"
65+
android:textColor="@android:color/black"
66+
android:textSize="16sp" />
67+
68+
<TextView
69+
android:layout_width="wrap_content"
70+
android:layout_height="56dp"
71+
android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lmnopqrstuv{fon-test2}wxyz"
72+
android:textColor="@android:color/black"
73+
android:textSize="16sp" />
74+
75+
<TextView
76+
android:layout_width="match_parent"
77+
android:layout_height="wrap_content"
78+
android:layout_marginTop="8dp"
79+
android:text="Button/IconicsButton Showcase" />
80+
81+
<LinearLayout
82+
android:layout_width="match_parent"
83+
android:layout_height="1px"
84+
android:layout_marginBottom="8dp"
85+
android:layout_marginTop="8dp"
86+
android:background="#000" />
87+
88+
<LinearLayout
89+
android:layout_width="match_parent"
90+
android:layout_height="wrap_content"
91+
android:orientation="horizontal">
92+
93+
<Button
94+
android:layout_width="0dp"
95+
android:layout_height="60dp"
96+
android:layout_weight="1"
97+
android:text="{faw-adjust} Button"
98+
android:textAllCaps="false" />
99+
100+
<Button
101+
android:id="@+id/test4"
102+
android:layout_width="0dp"
103+
android:layout_height="60dp"
104+
android:layout_weight="1"
105+
android:text="{gmd-chart} Button"
106+
android:textAllCaps="false" />
107+
108+
<Button
109+
android:layout_width="0dp"
110+
android:layout_height="60dp"
111+
android:layout_weight="1"
112+
android:text="{gmd-chevron-left} Button {gmd-chevron-right}"
113+
android:textAllCaps="false" />
114+
</LinearLayout>
115+
</LinearLayout>
116+
</ScrollView>
117+
</LinearLayout>

app/src/main/res/layout/activity_playground.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
android:id="@+id/test1"
142142
android:layout_width="wrap_content"
143143
android:layout_height="56dp"
144-
android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lm{gmd-poll}no{met-wind}pqrstuv{fon-test2}wxy{z"
144+
android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lm{gmd-chart}no{met-wind}pqrstuv{fon-test2}wxy{z"
145145
android:textColor="@android:color/black"
146146
android:textSize="16sp" />
147147

@@ -202,7 +202,7 @@
202202
android:layout_width="0dp"
203203
android:layout_height="60dp"
204204
android:layout_weight="1"
205-
android:text="{gmd-poll} Button" />
205+
android:text="{gmd-chart} Button" />
206206

207207
<ImageButton
208208
android:id="@+id/test6"

app/src/main/res/menu/menu_main.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
android:id="@+id/action_playground"
2323
android:title="@string/action_playground"
2424
app:showAsAction="never" />
25+
<item
26+
android:id="@+id/action_automatic"
27+
android:title="@string/action_automatic"
28+
app:showAsAction="never" />
2529
</menu>

0 commit comments

Comments
 (0)