Skip to content

Commit

Permalink
updating sample to include zoomable gif
Browse files Browse the repository at this point in the history
  • Loading branch information
Viven committed Nov 29, 2016
1 parent d763925 commit 88ccb70
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ dependencies {
compile project(':library')
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.viven.imagezoom.sample">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.viven.imagezoom.ImageZoomHelper;

public class RecyclerViewActivity extends AppCompatActivity {
Expand Down Expand Up @@ -47,6 +48,11 @@ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType
ImageZoomHelper.setViewZoomable(imageView);
imageView.setMinimumHeight(400);
frameLayout.addView(imageView);
Glide.with(RecyclerViewActivity.this)
.load("https://raw.githubusercontent.com/okaybroda/ImageZoom/master/preview.gif")
.asGif()
.centerCrop()
.into(imageView);
return new RecyclerView.ViewHolder(frameLayout) {};
}

Expand Down

0 comments on commit 88ccb70

Please sign in to comment.