Skip to content

Commit 88ccb70

Browse files
author
Viven
committed
updating sample to include zoomable gif
1 parent d763925 commit 88ccb70

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ dependencies {
2929
compile project(':library')
3030
compile 'com.android.support:recyclerview-v7:25.0.1'
3131
compile 'com.android.support:support-v4:25.0.1'
32+
compile 'com.github.bumptech.glide:glide:3.7.0'
3233
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.viven.imagezoom.sample">
44

5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
7+
58
<application
69
android:allowBackup="true"
710
android:icon="@mipmap/ic_launcher"

app/src/main/java/com/viven/imagezoom/sample/RecyclerViewActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import android.widget.FrameLayout;
1313
import android.widget.ImageView;
1414

15+
import com.bumptech.glide.Glide;
1516
import com.viven.imagezoom.ImageZoomHelper;
1617

1718
public class RecyclerViewActivity extends AppCompatActivity {
@@ -47,6 +48,11 @@ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType
4748
ImageZoomHelper.setViewZoomable(imageView);
4849
imageView.setMinimumHeight(400);
4950
frameLayout.addView(imageView);
51+
Glide.with(RecyclerViewActivity.this)
52+
.load("https://raw.githubusercontent.com/okaybroda/ImageZoom/master/preview.gif")
53+
.asGif()
54+
.centerCrop()
55+
.into(imageView);
5056
return new RecyclerView.ViewHolder(frameLayout) {};
5157
}
5258

0 commit comments

Comments
 (0)