Skip to content

Commit ed12bb1

Browse files
authored
Update README.md
1 parent e2c7dd2 commit ed12bb1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ For demonstration and experimentation, an apk of the sample project can be downl
1414

1515
## Usage
1616

17-
### Setup
18-
1917
The Gradle dependency is available through jCenter, which is used by default in Android Studio. To add the dependency to your project, copy this line into the dependencies section of your app's build.gradle file.
2018

2119
##### AndroidX
@@ -33,30 +31,30 @@ implementation 'me.jfenn:attribouter:0.1.2'
3331
```
3432

3533

36-
#### Starting an Activity
34+
### Starting an Activity
3735
This is pretty simple.
3836

3937
``` java
4038
Attribouter.from(context).show();
4139
```
4240

43-
#### Creating a Fragment
41+
### Creating a Fragment
4442
This is also pretty simple.
4543

4644
``` java
4745
Fragment fragment = Attribouter.from(context).toFragment();
4846
```
4947

50-
### Request Limits
48+
## Request Limits
5149

5250
This library does not use an auth key for the GitHub API by default. It does cache data for up to 10 days to avoid crossing GitHub's [rate limits](https://developer.github.com/v3/rate_limit/), but if your project has more than a few contributors and libraries *or* you want it to have access to a private repository, you will need to provide an auth token by calling `.withGitHubToken(token)` on your instance of `Attribouter`.
5351

54-
### Setup
52+
## Configuration
5553

5654
By default, Attribouter will use the configuration file at [res/xml/attribouter.xml](./attribouter/src/main/res/xml/attribouter.xml). You can either name your configuration file "attribouter.xml" to override the resource, or name it differently and call `.withFile(R.xml.[name])` on your instance of `Attribouter` instead.
5755

5856
The configuration file consists of a single root element, `<about>`, with many child elements that can be placed any amount of times in any order, the same as views in a layout file. These elements, called "wedges" in this library for no apparent reason, are created by Attribouter and added to the page in the order and heirarchy that they are defined in. To create your configuration file, you can either use the [file from the sample project](./app/src/main/res/xml/about.xml) as a template or use [the documentation](https://jfenn.me/Attribouter/) to write your own.
5957

60-
### Proguard
58+
## Proguard
6159

6260
This library uses GSON, which does not behave nicely with proguard as it uses reflection to instantiate classes and initialize variables based on their names. It is recommended to use the [example configuration](https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg) in GSON's repo to prevent these issues.

0 commit comments

Comments
 (0)