Skip to content

Commit b85af3e

Browse files
committed
README.md changes.
1 parent d347750 commit b85af3e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ Decor
33

44
<a href='http://android-arsenal.com/details/1/1773'><img src='https://img.shields.io/badge/Android%20Arsenal-Decor-brightgreen.svg?style=flat'></a>
55

6-
*Decor* is a library that applies decorators to android layout with additional attributes
7-
without the need to extend and create a custom view for each functionnality.
6+
*Decor* is a library that applies decorators to Android layout with additional attributes
7+
without the need to extend and create a custom View for each functionality.
88

9-
Decor plugs into Android layout inflation and applies custom attributes to views.
9+
Decor plugs into Android's layout inflation and applies custom attributes to Views.
1010

11-
If you have written a custom view like AutofitTextViewWithFont : to make a textview resizes it's text and have a specific font
12-
and if you want to animate it you can write a custom view like AnimatedAutofitTextViewWithFont and if there's another runtime
13-
custom attribute you want to add you will have to yet create another custom view.
14-
Decor comes to the rescue to solve this unnecessary class explosion by using a seperate decorator for each functionality :
11+
If you have written a custom View like AutofitTextViewWithFont : to make a TextView resize it's text and have a specific font
12+
and if you want to animate it you can write a custom View like AnimatedAutofitTextViewWithFont and if there's another runtime
13+
custom attribute you want to add you will have to yet create another custom View.
14+
Decor comes to the rescue to solve this unnecessary class explosion by using a separate decorator for each functionality :
1515
: AutoFitDecorator , FontDecorator, AnimateDecorator (See decorators module for examples of how to create a decorator)
1616
and register them in attachBaseContext :
1717

@@ -32,7 +32,7 @@ protected void attachBaseContext(Context newBase) {
3232
app:decorAutoFit="true"
3333
tools:ignore="MissingPrefix"/>
3434
```
35-
or with an Imageview :
35+
or with an ImageView :
3636
<ImageView xmlns:app="http://schemas.android.com/apk/res-auto"
3737
xmlns:tools="http://schemas.android.com/tools"
3838
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -43,9 +43,9 @@ or with an Imageview :
4343
android:src="@drawable/search_vector_drawable"
4444
app:decorAnimateSearch="true" />
4545

46-
This has the advantage of reusing these decorators in other views.
46+
This has the advantage of reusing these decorators in other Views.
4747
The module decorators contains some examples of useful decorators that you can start using now,
48-
or write your own by extending ``` AttrsDecorator<T>``` where T is the type of the view the decor will be applied on.
48+
or write your own by extending ``` AttrsDecorator<T>``` where T is the type of the View the decor will be applied on.
4949

5050
If you want to apply only a subset of decorators :
5151

@@ -62,7 +62,7 @@ Check the samples for a working example :
6262
![](images/decor_sample.png)
6363

6464

65-
Android Studio (lint) will likely mark this xml with a warning despite being correct. You may want to add tools:ignore="MissingPrefix" to either the View itself or its parent ViewGroup to get rid of it. Also add tools namespace xmlns:tools=" http://schemas.android.com/tools" to have access to "ignore" attribute
65+
Android Studio (lint) will likely mark this XML with a warning despite being correct. You may want to add tools:ignore="MissingPrefix" to either the View itself or its parent ViewGroup to get rid of it. Also add tools namespace xmlns:tools="http://schemas.android.com/tools" to have access to "ignore" attribute.
6666

6767
Binaries
6868
========

0 commit comments

Comments
 (0)