diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fc10cb166..950f16a66e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,26 +1,54 @@ # Contributing -Contributions of all types are welcome. We use GitHub as our bug and feature tracker both for code and for other -aspects of the library (documentation, the wiki etc.) +Contributions of all types are welcome. +We use GitHub as our bug and feature tracker both for code and for other aspects of the library (documentation, the wiki, etc.). + ## Asking Questions -The best way to ask general questions is to send an email to our [mailing list][2], or join [#glide-library on -freenode.org.][3] +The best way to ask general questions is to send an email to our [mailing list][2], or join [#glide-library on freenode.org][3]. + ## Filing issues -To file an issue, please use our [issue template link][1] and fill out the template as much as possible. The more -information you can provide, the more likely we are to be able help. +When in doubt, file an issue. We'd rather close a few duplicate issues than let a problem go unnoticed. +Similarly if you support a particular feature request, feel free to let us know by commenting on the issue. + +To file a new issue, please use our issue template and fill out the template as much as possible (remove irrelevant parts). + +
**Glide Version/Integration library (if any)**:
+**Device/Android Version**:
+**Issue details/Repro steps/Use case background**:
+
+**Glide load line**:
+```java
+Glide.with(...).....load(...).....into(...);
+```
+
+**Layout XML**:
+```xml
+<...Layout>
+    <ImageView android:scaleType="..." ... />
+</..Layout>
+```
+
+**Stack trace / LogCat**:
+```ruby
+paste stack trace here
+```
+
+ +You can save [this as a bookmark or just click it][1] to create a new issue. +The more information you can provide, the more likely we are to be able help. -When in doubt, file an issue. We'd rather close a few duplicate issues than let a problem go unnoticed. Similarly if -you support a particular feature request, feel free to let us know by commenting on the issue. ## Contributing code -Pull requests are welcome for all parts of the codebase, especially the integration libraries. You can find -instructions on building the project in our README. Our code style is defined in Intellij project files in the repo -and also by our Checkstyle config. 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. If you'd like to -contribute code, you will need to sign [Google's individual contributor license agreement][4]. +Pull requests are welcome for all parts of the codebase, especially the integration libraries. +You can find instructions on building the project in [README.md][5]. +Our code style is defined in Intellij project files in the repo and also by our Checkstyle config. +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. +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. + -[1]: https://github.com/bumptech/glide/issues/new?body=**Glide%20Version/Integration%20library%20(if%20any)**:%0A**Device/Android%20Version**:%0A**Issue%20details/Repro%20steps**:%0A%0A**Glide%20load%20line**:%0A```%0AGlide.with(context)...%3B%0A```%0A%0A**Stack%20trace**:%0A```%0Apaste%20stack%20trace%20here%0A``` +[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 [2]: https://groups.google.com/forum/#!forum/glidelibrary [3]: http://webchat.freenode.net/?channels=glide-library -[4]: https://developers.google.com/open-source/cla/individual. +[4]: https://developers.google.com/open-source/cla/individual +[5]: /bumptech/glide \ No newline at end of file diff --git a/README.md b/README.md index 34bbbf0b3d..8c95a46346 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ decoding, memory and disk caching, and resource pooling into a simple and easy t ![](static/glide_logo.png) -Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. Glide includes a flexible api -that allows developers to plug in to almost any network stack. By default Glide uses a custom HttpUrlConnection based +Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. Glide includes a flexible API +that allows developers to plug in to almost any network stack. By default Glide uses a custom `HttpUrlConnection` based stack, but also includes utility libraries plug in to Google's Volley project or Square's OkHttp library instead. Glide's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is @@ -21,13 +21,13 @@ You can download a jar from GitHub's [releases page][1]. Or use Gradle: -```groovy +```gradle repositories { - mavenCentral() + mavenCentral() } dependencies { - compile 'com.github.bumptech.glide:glide:3.6.0' + compile 'com.github.bumptech.glide:glide:3.6.1' compile 'com.android.support:support-v4:19.1.0' } ``` @@ -36,22 +36,23 @@ Or Maven: ```xml - com.github.bumptech.glide - glide - 3.6.0 - aar + com.github.bumptech.glide + glide + 3.6.1 + aar - com.google.android - support-v4 - r7 + com.google.android + support-v4 + r7 ``` Proguard -------- Depending on your proguard config and usage, you may need to include the following lines in your proguard.cfg: -``` + +```pro -keep public class * implements com.bumptech.glide.module.GlideModule -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { **[] $VALUES; @@ -65,25 +66,22 @@ Checkout the [GitHub wiki][2] for pages on a variety of topics, and see the [jav Simple use cases will look something like this: -```Java - +```java // For a simple view: @Override public void onCreate(Bundle savedInstanceState) { ... - ImageView imageView = (ImageView) findViewById(R.id.my_image_view); Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView); } -// For a list: +// For a simple image list: @Override public View getView(int position, View recycled, ViewGroup container) { final ImageView myImageView; if (recycled == null) { - myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, - container, false); + myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, container, false); } else { myImageView = (ImageView) recycled; } @@ -104,65 +102,66 @@ public View getView(int position, View recycled, ViewGroup container) { OkHttp and Volley ----------------- -Support for OkHttp and Volley is provided by integration libraries you can optionally include as dependencies. The -integration libraries are available via Maven or the [releases page][1]. +Support for OkHttp and Volley is provided by integration libraries you can optionally include as dependencies. +The integration libraries are available via Maven or the [releases page][1]. -For instructions on including either the OkHttp or the Volley integration libraries, see the -[Integration Libraries][12] wiki page. +For instructions on including either the OkHttp or the Volley integration libraries, see the [Integration Libraries][12] wiki page. Android SDK Version ------------------- -Glide requires a minimum sdk version of 10. +Glide requires a minimum SDK version of 10. License ------- -BSD, part MIT and Apache 2.0. See LICENSE file for details. +BSD, part MIT and Apache 2.0. See the [LICENSE][16] file for details. Status ------ -Version 3 is a stable public release used in multiple open source projects at Google including in the Android Camera -app and in the 2014 Google IO app. Comments/bugs/questions/pull requests welcome! +[*Version 3*][14] is a stable public release used in multiple open source projects at Google including in the Android Camera +app and in the 2014 Google IO app. *Version 4* is currently under development on the `master` branch. +Comments/bugs/questions/pull requests welcome! Build ------ Building Glide with gradle is fairly straight forward: -``` -git clone git@github.com:bumptech/glide.git +```shell +git clone git@github.com:bumptech/glide.git # use https://github.com/bumptech/glide.git if "Permission Denied" cd glide git submodule init && git submodule update ./gradlew jar ``` -Note: Make sure your Android SDK has the Android Support Repository installed, and that your `$ANDROID_HOME` environment +**Note**: Make sure your *Android SDK* has the *Android Support Repository* installed, and that your `$ANDROID_HOME` environment variable is pointing at the SDK or add a `local.properties` file in the root project with a `sdk.dir=...` line. Samples ------- -Follow the steps in the 'Build' section to setup the project and then: +Follow the steps in the [Build](#build) section to setup the project and then: -``` +```shell ./gradlew :samples:flickr:run ./gradlew :samples:giphy:run ./gradlew :samples:svg:run ``` +You may also find precompiled APKs on the [releases page][1]. Development ----------- -Follow the steps in the 'Build' section to setup the project and then edit the files however you wish. +Follow the steps in the [Build](#build) section to setup the project and then edit the files however you wish. [Intellij IDEA 14][4] cleanly imports both Glide's source and tests and is the recommended way to work with Glide. To open the project in Intellij 14: -1. Go to File. -2. Click on 'Open...' +1. Go to *File* menu or the *Welcome Screen* +2. Click on *Open...* 3. Navigate to Glide's root directory. -4. Select glide-parent.iml +4. Select `build.gradle` Getting Help ------------ To report a specific problem or feature request, [open a new issue on Github][5]. For questions, suggestions, or -anything else, join or email [Glide's discussion group][6], or join our irc channel: [irc.freenode.net#glide-library][13]. +anything else, join or email [Glide's discussion group][6], or join our IRC channel: [irc.freenode.net#glide-library][13]. Contributing ------------ @@ -170,10 +169,10 @@ Before submitting pull requests, contributors must sign Google's [individual con Thanks ------ -* The Android team and Jake Wharton for the [disk cache implementation][8] Glide's disk cache is based on. -* Dave Smith for the [gif decoder gist][9] Glide's gif decoder is based on. -* Chris Banes for his [gradle-mvn-push][10] script. -* Corey Hall for Glide's [amazing logo][11]. +* The **Android team** and **Jake Wharton** for the [disk cache implementation][8] Glide's disk cache is based on. +* **Dave Smith** for the [gif decoder gist][9] Glide's gif decoder is based on. +* **Chris Banes** for his [gradle-mvn-push][10] script. +* **Corey Hall** for Glide's [amazing logo][11]. * Everyone who has contributed code and reported issues! Author @@ -188,7 +187,7 @@ This is not an official Google product. [2]: https://github.com/bumptech/glide/wiki [3]: http://bumptech.github.io/glide/javadocs/latest/index.html [4]: https://www.jetbrains.com/idea/download/ -[5]: https://github.com/bumptech/glide/issues/new?body=**Glide%20Version/Integration%20library%20(if%20any)**:%0A**Device/Android%20Version**:%0A**Issue%20details/Repro%20steps**:%0A%0A**Glide%20load%20line**:%0A```%0AGlide.with(context)...%3B%0A```%0A%0A**Stack%20trace**:%0A```%0Apaste%20stack%20trace%20here%0A``` +[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 [6]: https://groups.google.com/forum/#!forum/glidelibrary [7]: https://developers.google.com/open-source/cla/individual [8]: https://github.com/JakeWharton/DiskLruCache @@ -197,3 +196,6 @@ This is not an official Google product. [11]: static/glide_logo.png [12]: https://github.com/bumptech/glide/wiki/Integration-Libraries [13]: http://webchat.freenode.net/?channels=glide-library +[14]: https://github.com/bumptech/glide/tree/3.0 +[15]: https://github.com/bumptech/glide/tree/master +[16]: https://github.com/bumptech/glide/blob/master/LICENSE \ No newline at end of file