Skip to content

Commit ce0bffd

Browse files
committed
* add description for new IconicsContextWrapper
1 parent 56e5c3f commit ce0bffd

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,33 @@ To use the icon within text use the `{` icon-definer `}` syntax
9292
Some great text with a {faw-android} font awesome icon and {met-wind} meteocons icons.
9393
```
9494

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+
95122
####As IconicsTextView
96123
```xml
97124
<com.mikepenz.iconics.view.IconicsTextView

0 commit comments

Comments
 (0)