All Projects → okaybroda → Imagezoom

okaybroda / Imagezoom

Licence: gpl-3.0
An Android library that makes any view to be zoomable.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Imagezoom

Shimmer Recyclerview X
🌀 ShimmerRecyclerViewX for AndroidX
Stars: ✭ 193 (+63.56%)
Mutual labels:  view, recyclerview
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+5.08%)
Mutual labels:  view, recyclerview
Snappyrecyclerview
An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
Stars: ✭ 178 (+50.85%)
Mutual labels:  view, recyclerview
SlideTable
可以滑动 以表格形式展示数据
Stars: ✭ 14 (-88.14%)
Mutual labels:  view, recyclerview
Windowimageview
An ImageView display in RecyclerView, looks like window.
Stars: ✭ 699 (+492.37%)
Mutual labels:  view, recyclerview
Inifiniterecyclerview
Library for implementing endless loading list easily in Android applications
Stars: ✭ 79 (-33.05%)
Mutual labels:  view, recyclerview
TimelineView
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration)
Stars: ✭ 169 (+43.22%)
Mutual labels:  view, recyclerview
Recyclerview Fastscroller
A fully customizable Fast Scroller for the RecyclerView in Android, written in Kotlin
Stars: ✭ 585 (+395.76%)
Mutual labels:  view, recyclerview
Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+4588.98%)
Mutual labels:  view, recyclerview
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-87.29%)
Mutual labels:  view, recyclerview
Zoomrecyclerview
A Zoomable RecyclerView for comic
Stars: ✭ 102 (-13.56%)
Mutual labels:  recyclerview, zoom
Zooming
🔍 Image zoom that makes sense.
Stars: ✭ 1,538 (+1203.39%)
Mutual labels:  zoom
Vue Recyclerview
Mastering Large Lists with the vue-recyclerview
Stars: ✭ 1,442 (+1122.03%)
Mutual labels:  recyclerview
Tileview
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
Stars: ✭ 1,447 (+1126.27%)
Mutual labels:  zoom
Log Viewer
Log viewer for laravel
Stars: ✭ 108 (-8.47%)
Mutual labels:  view
Mediaselector
Android图片选择器,仿微信相册图片选择器,支持自定义!
Stars: ✭ 115 (-2.54%)
Mutual labels:  view
Featureadapter
FeatureAdapter (FA) is an Android Library providing an optimized way to display complex screens on Android.
Stars: ✭ 112 (-5.08%)
Mutual labels:  recyclerview
Expandablerecyclerview
Custom RecyclerView#Adapter that implement features like ExpandableListView
Stars: ✭ 107 (-9.32%)
Mutual labels:  recyclerview
Gin Template
golang template for gin framework!
Stars: ✭ 106 (-10.17%)
Mutual labels:  view
Virtual Office
Virtual Office gives you transparency on what Zoom.us rooms are currently occupied and who is present
Stars: ✭ 103 (-12.71%)
Mutual labels:  zoom

ImageZoom

An Android library that makes any view to be zoomable. It was created to mimick the Instagram Zoom feature.

View Preview

Installation

Add Jitpack

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

Then add ImageZoom library

dependencies {
  compile 'com.github.okaybroda:ImageZoom:1.1.0'
}

Usage

Create an ImageZoomHelper instance in the OnCreate function of your Activity

ImageZoomHelper imageZoomHelper;

@Override
protected void onCreate(Bundle savedInstanceState) {
    // ... your code ...
    imageZoomHelper = new ImageZoomHelper(this);
}

Override dispatchTouchEvent in your Activity and pass all touch events to the ImageZoomHelper instance:

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
    return imageZoomHelper.onDispatchTouchEvent(ev) || super.dispatchTouchEvent(ev);
}

Set the R.id.zoomable tag to the Views that you would like to be zoomable.

ImageZoomHelper.setViewZoomable(findViewById(R.id.imgLogo));

To enable/disable zoom for certain Views (e.g. Recycler View refreshing)

ImageZoomHelper.setZoom(recyclerView, false)

Advanced Usage

For a smoother zoom transition, set the layout to be fullscreen. This only works on API 16 and above.

Place this code in the OnCreate function of your Activity. Preferably before the setContentView line.

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
    View decorView = getWindow().getDecorView();
    // Hide the status bar.
    int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
            View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
    decorView.setSystemUiVisibility(uiOptions);
}

The above code makes your Activity layout go behind the status bar which brings the status bar on top of the layout. To fix that, put this line in your root layout XML.

android:fitsSystemWindows="true"

Known Issues

RecyclerView

When using RecyclerView and setting it's child to be zoomable, RecyclerView crashes.

ImageView imageView = new ImageView(RecyclerViewActivity.this);
imageView.setImageResource(R.mipmap.ic_launcher);
ImageZoomHelper.setViewZoomable(imageView);
return new RecyclerView.ViewHolder(frameLayout) {};

Workaround is to wrap the zoomable View with a parent ViewGroup.

// Wrap ImageView with FrameLayout to avoid RecyclerView issue
FrameLayout frameLayout = new FrameLayout(parent.getContext());
frameLayout.addView(imageView);
return new RecyclerView.ViewHolder(frameLayout) {};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].