Skip to content

Commit 22f4beb

Browse files
committed
Merge pull request bumptech#966 from TWiStErRob/readme
Enhancements to documentation
2 parents ee36815 + 4e23a45 commit 22f4beb

File tree

2 files changed

+84
-60
lines changed

2 files changed

+84
-60
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ The best way to ask general questions is to send an email to our [mailing list][
99

1010
## Filing issues
1111
When in doubt, file an issue. We'd rather close a few duplicate issues than let a problem go unnoticed.
12-
Similarly if you support a particular feature request, feel free to let us know by commenting on the issue.
12+
Similarly if you support a particular feature request, feel free to let us know by commenting on the issue or [subscribing][6] to the issue.
1313

1414
To file a new issue, please use our issue template and fill out the template as much as possible (remove irrelevant parts).
1515

16-
<pre>**Glide Version/Integration library (if any)**:
16+
<pre>**Glide Version**:
17+
**Integration libraries**:
1718
**Device/Android Version**:
18-
**Issue details/Repro steps/Use case background**:
19+
**Issue details / Repro steps / Use case background**:
1920

2021
**Glide load line**:
2122
```java
@@ -46,9 +47,27 @@ Our code style is defined in Intellij project files in the repo and also by our
4647
If you'd like to submit code, but can't get the style checks to pass, feel free to put up your pull request anyway and we can help you fix the style issues.
4748
If you'd like to contribute code, you will need to sign [Google's individual contributor license agreement][4] which will be asked when you create the PR by [googlebot](https://github.com/googlebot) should you forget it.
4849

50+
## Labels
51+
Labels on issues are managed by contributors, you don't have to worry about them. Here's a list of what they mean:
4952

50-
[1]: https://github.com/bumptech/glide/issues/new?body=**Glide%20Version/Integration%20library%20%28if%20any%29**%3A%0A**Device/Android%20Version**%3A%0A**Issue%20details/Repro%20steps/Use%20case%20background**%3A%0A%0A**Glide%20load%20line**%3A%0A%60%60%60java%0AGlide.with%28...%29.....load%28...%29.....into%28...%29%3B%0A%60%60%60%0A%0A**Layout%20XML**%3A%0A%60%60%60xml%0A%3C...Layout%3E%0A%20%20%20%20%3CImageView%20android%3AscaleType%3D%22...%22%20...%20/%3E%0A%3C/..Layout%3E%0A%60%60%60%0A%0A**Stack%20trace%20/%20LogCat**%3A%0A%60%60%60ruby%0Apaste%20stack%20trace%20here%0A%60%60%60
53+
* **bug**: feature that should work, but doesn't
54+
* **enhancement**: minor tweak/addition to existing behavior
55+
* **feature**: new behavior, bigger than enhancement, it gives more bang to Glide
56+
* **question**: no need to modify Glide to fix the issue, usually a usage problem
57+
* **reproducible**: has enough information to very easily reproduce, mostly in form of a small project in a GitHub repo
58+
* **repro-needed**: we need some code to be able to reproduce and debug locally, otherwise there's not much we can do
59+
* **duplicate**: there's another issue which already covers/tracks this
60+
* **wontfix**: working as intented, or won't be fixed due to compatibility or other reasons
61+
* **invalid**: there isn't enough information to make a verdict, or unrelated to Glide
62+
* **non-library**: issue is not in the core library code, but rather in documentation, samples, build process, releases
63+
* **v4**: problem originated in v4, or question about v4 (while v3 is in wide use)
64+
65+
*bug + enhancement: feature that doesn't work, but it's an edge case that either has a workaround or doesn't affect many users*
66+
67+
68+
[1]: https://github.com/bumptech/glide/issues/new?body=**Glide%20Version**%3A%0A**Integration%20libraries**%3A%0A**Device/Android%20Version**%3A%0A**Issue%20details%20/%20Repro%20steps%20/%20Use%20case%20background**%3A%0A%0A**Glide%20load%20line**%3A%0A%60%60%60java%0AGlide.with%28...%29.....load%28...%29.....into%28...%29%3B%0A%60%60%60%0A%0A**Layout%20XML**%3A%0A%60%60%60xml%0A%3C...Layout%3E%0A%20%20%20%20%3CImageView%20android%3AscaleType%3D%22...%22%20...%20/%3E%0A%3C/..Layout%3E%0A%60%60%60%0A%0A**Stack%20trace%20/%20LogCat**%3A%0A%60%60%60ruby%0Apaste%20stack%20trace%20here%0A%60%60%60
5169
[2]: https://groups.google.com/forum/#!forum/glidelibrary
5270
[3]: http://webchat.freenode.net/?channels=glide-library
5371
[4]: https://developers.google.com/open-source/cla/individual
54-
[5]: /bumptech/glide
72+
[5]: https://github.com/bumptech/glide
73+
[6]: https://help.github.com/articles/subscribing-to-conversations/

README.md

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Glide
22
=====
33

44
[![Build Status](https://travis-ci.org/bumptech/glide.svg?branch=master)](https://travis-ci.org/bumptech/glide)
5+
[Report an issue with Glide][5]
56

67
Glide is a fast and efficient open source media management and image loading framework for Android that wraps media
78
decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
@@ -23,39 +24,41 @@ Or use Gradle:
2324

2425
```gradle
2526
repositories {
26-
mavenCentral()
27+
mavenCentral() // jcenter() works as well because it pulls from Maven Central
2728
}
2829
2930
dependencies {
30-
compile 'com.github.bumptech.glide:glide:3.7.0'
31-
compile 'com.android.support:support-v4:19.1.0'
31+
compile 'com.github.bumptech.glide:glide:3.7.0'
32+
compile 'com.android.support:support-v4:19.1.0'
3233
}
3334
```
3435

3536
Or Maven:
3637

3738
```xml
3839
<dependency>
39-
<groupId>com.github.bumptech.glide</groupId>
40-
<artifactId>glide</artifactId>
41-
<version>3.7.0</version>
40+
<groupId>com.github.bumptech.glide</groupId>
41+
<artifactId>glide</artifactId>
42+
<version>3.7.0</version>
4243
</dependency>
4344
<dependency>
44-
<groupId>com.google.android</groupId>
45-
<artifactId>support-v4</artifactId>
46-
<version>r7</version>
45+
<groupId>com.google.android</groupId>
46+
<artifactId>support-v4</artifactId>
47+
<version>r7</version>
4748
</dependency>
4849
```
4950

51+
For info on using the bleeding edge, see the [Snapshots][17] wiki page.
52+
5053
Proguard
5154
--------
5255
Depending on your proguard config and usage, you may need to include the following lines in your proguard.cfg:
5356

5457
```pro
5558
-keep public class * implements com.bumptech.glide.module.GlideModule
5659
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
57-
**[] $VALUES;
58-
public *;
60+
**[] $VALUES;
61+
public *;
5962
}
6063
```
6164

@@ -67,58 +70,53 @@ Simple use cases will look something like this:
6770

6871
```java
6972
// For a simple view:
70-
@Override
71-
public void onCreate(Bundle savedInstanceState) {
72-
...
73-
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
73+
@Override public void onCreate(Bundle savedInstanceState) {
74+
...
75+
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
7476

75-
Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
77+
Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
7678
}
7779

7880
// For a simple image list:
79-
@Override
80-
public View getView(int position, View recycled, ViewGroup container) {
81-
final ImageView myImageView;
82-
if (recycled == null) {
83-
myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, container, false);
84-
} else {
85-
myImageView = (ImageView) recycled;
86-
}
87-
88-
String url = myUrls.get(position);
89-
90-
Glide.with(myFragment)
91-
.load(url)
92-
.centerCrop()
93-
.placeholder(R.drawable.loading_spinner)
94-
.crossFade()
95-
.into(myImageView);
96-
97-
return myImageView;
81+
@Override public View getView(int position, View recycled, ViewGroup container) {
82+
final ImageView myImageView;
83+
if (recycled == null) {
84+
myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, container, false);
85+
} else {
86+
myImageView = (ImageView) recycled;
87+
}
88+
89+
String url = myUrls.get(position);
90+
91+
Glide
92+
.with(myFragment)
93+
.load(url)
94+
.centerCrop()
95+
.placeholder(R.drawable.loading_spinner)
96+
.crossFade()
97+
.into(myImageView);
98+
99+
return myImageView;
98100
}
99101

100102
```
101103

102-
OkHttp and Volley
103-
-----------------
104-
Support for OkHttp and Volley is provided by integration libraries you can optionally include as dependencies.
105-
The integration libraries are available via Maven or the [releases page][1].
106-
107-
For instructions on including either the OkHttp or the Volley integration libraries, see the [Integration Libraries][12] wiki page.
108-
109-
Android SDK Version
110-
-------------------
111-
Glide requires a minimum SDK version of 10.
112-
113-
License
114-
-------
115-
BSD, part MIT and Apache 2.0. See the [LICENSE][16] file for details.
116-
117104
Status
118105
------
119-
[*Version 3*][14] is a stable public release used in multiple open source projects at Google including in the Android Camera
106+
[*Version 3* on the `3.0` branch][14] is a stable public release used in multiple open source projects at Google including in the Android Camera
120107
app and in the 2014 Google IO app. *Version 4* is currently under development on the `master` branch.
121-
Comments/bugs/questions/pull requests welcome!
108+
109+
Comments/bugs/questions/pull requests are always welcome! Please read [CONTRIBUTING.md][5] on how to report issues.
110+
111+
Compatibility
112+
-------------
113+
114+
* **Android SDK**: Glide requires a minimum API level of 10.
115+
* **OkHttp 2.x**: there are optional dependencies available called `okhttp-integration`, see [Integration Libraries][12] wiki page.
116+
* **OkHttp 3.x**: there are optional dependencies available called `okhttp3-integration`, see [Integration Libraries][12] wiki page.
117+
* **Volley**: there are optional dependencies available called `volley-integration`, see [Integration Libraries][12] wiki page.
118+
* **Round Pictures**: `CircleImageView`/`CircularImageView`/`RoundedImageView` are known to have [issues][18] with `TransitionDrawable` (`.crossFade()` with `.thumbnail()` or `.placeholder()`) and animated GIFs, use a [`BitmapTransformation`][19] (`.circleCrop()` will be available in v4) or `.dontAnimate()` to fix the issue.
119+
* **Huge Images** (maps, comic strips): Glide can load huge images by downsampling them, but does not support zooming and panning `ImageView`s as they require special resource optimizations (such as tiling) to work without `OutOfMemoryError`s.
122120

123121
Build
124122
-----
@@ -150,7 +148,7 @@ Development
150148
Follow the steps in the [Build](#build) section to setup the project and then edit the files however you wish.
151149
[Intellij IDEA 14][4] cleanly imports both Glide's source and tests and is the recommended way to work with Glide.
152150

153-
To open the project in Intellij 14:
151+
To open the project in IntelliJ IDEA:
154152

155153
1. Go to *File* menu or the *Welcome Screen*
156154
2. Click on *Open...*
@@ -176,7 +174,11 @@ Thanks
176174

177175
Author
178176
------
179-
Sam Judd - @samajudd
177+
Sam Judd - @sjudd on GitHub, @samajudd on Twitter
178+
179+
License
180+
-------
181+
BSD, part MIT and Apache 2.0. See the [LICENSE][16] file for details.
180182

181183
Disclaimer
182184
---------
@@ -186,7 +188,7 @@ This is not an official Google product.
186188
[2]: https://github.com/bumptech/glide/wiki
187189
[3]: http://bumptech.github.io/glide/javadocs/latest/index.html
188190
[4]: https://www.jetbrains.com/idea/download/
189-
[5]: https://github.com/bumptech/glide/issues/new?body=**Glide%20Version/Integration%20library%20%28if%20any%29**%3A%0A**Device/Android%20Version**%3A%0A**Issue%20details/Repro%20steps/Use%20case%20background**%3A%0A%0A**Glide%20load%20line**%3A%0A%60%60%60java%0AGlide.with%28...%29.....load%28...%29.....into%28...%29%3B%0A%60%60%60%0A%0A**Layout%20XML**%3A%0A%60%60%60xml%0A%3C...Layout%3E%0A%20%20%20%20%3CImageView%20android%3AscaleType%3D%22...%22%20...%20/%3E%0A%3C/..Layout%3E%0A%60%60%60%0A%0A**Stack%20trace%20/%20LogCat**%3A%0A%60%60%60ruby%0Apaste%20stack%20trace%20here%0A%60%60%60
191+
[5]: https://github.com/bumptech/glide/blob/master/CONTRIBUTING.md
190192
[6]: https://groups.google.com/forum/#!forum/glidelibrary
191193
[7]: https://developers.google.com/open-source/cla/individual
192194
[8]: https://github.com/JakeWharton/DiskLruCache
@@ -198,3 +200,6 @@ This is not an official Google product.
198200
[14]: https://github.com/bumptech/glide/tree/3.0
199201
[15]: https://github.com/bumptech/glide/tree/master
200202
[16]: https://github.com/bumptech/glide/blob/master/LICENSE
203+
[17]: https://github.com/bumptech/glide/wiki/Snapshots
204+
[18]: https://github.com/bumptech/glide/issues?q=is%3Aissue+CircleImageView+OR+CircularImageView+OR+RoundedImageView
205+
[19]: https://github.com/wasabeef/glide-transformations

0 commit comments

Comments
 (0)