All Projects → CrazyPumPkin → Dragmorescrollview

CrazyPumPkin / Dragmorescrollview

一种浏览相册的交互效果

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Dragmorescrollview

Xupdate
🚀A lightweight, high availability Android version update framework.(一个轻量级、高可用性的Android版本更新框架)
Stars: ✭ 1,688 (+1159.7%)
Mutual labels:  android-ui
Androidrate
AndroidRate is a library to help you promote your Android app by prompting users to rate the app after using it for a few days.
Stars: ✭ 117 (-12.69%)
Mutual labels:  android-ui
Carouselrecyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.
Stars: ✭ 107 (-20.15%)
Mutual labels:  android-ui
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (-16.42%)
Mutual labels:  android-ui
Ui2018
安卓高级UI代码,配合博客详细讲解知识点
Stars: ✭ 1,571 (+1072.39%)
Mutual labels:  android-ui
Anychart Android
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
Stars: ✭ 1,762 (+1214.93%)
Mutual labels:  android-ui
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-21.64%)
Mutual labels:  android-ui
Shotang App
The New Home Screen is designed in a modular way with the core focus on product discovery. Search, Deals, Products everything has been brought upfront. The hamburger menu has been replaced with a bottom navigation bar for easy reachability. On the tech side too, this design allows us to run new deals and other experiments in an agile manner which wasn't possible in the previous version.
Stars: ✭ 132 (-1.49%)
Mutual labels:  android-ui
Truffle Shuffle
An Android data-driven, percentage-based UI Card Gallery Library
Stars: ✭ 117 (-12.69%)
Mutual labels:  android-ui
Zoomabletextureview
Adding zoom and scroll gestures to video playback on Android
Stars: ✭ 122 (-8.96%)
Mutual labels:  android-ui
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (-14.93%)
Mutual labels:  android-ui
Teammate Android
A Team Management app for creating tournaments and games for various sports
Stars: ✭ 116 (-13.43%)
Mutual labels:  android-ui
Firebasecrud
Rich UI and animation flutter app backed by firebase
Stars: ✭ 121 (-9.7%)
Mutual labels:  android-ui
Android Observablescrollview
Android library to observe scroll events on scrollable views.
Stars: ✭ 9,625 (+7082.84%)
Mutual labels:  android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+1140.3%)
Mutual labels:  android-ui
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+1047.01%)
Mutual labels:  android-ui
Vectorifydahome
📱 Minimal app to apply wallpapers from a vast (400+) collection of vector graphics 🙃
Stars: ✭ 119 (-11.19%)
Mutual labels:  android-ui
Texthighlighter
TextHighlighter for android. Highlights your TextView easily.
Stars: ✭ 133 (-0.75%)
Mutual labels:  android-ui
Paris
Define and apply styles to Android views programmatically
Stars: ✭ 1,716 (+1180.6%)
Mutual labels:  android-ui
Easyadapter
Recyclerview adapter library- Create adapter in just 3 lines of code
Stars: ✭ 122 (-8.96%)
Mutual labels:  android-ui

DragMoreScrollView

一种浏览图片的交互效果实现,类似iOS相册

使用方法:

<com.crazypumpkin.library.DragMoreScrollView 
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/sv"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:photoReservedHeight="150dp"
    app:fullAnimationDuration="250"
    android:background="#000000">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.github.chrisbanes.photoview.PhotoView
            android:id="@+id/iv_detail"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="fitCenter"/>

        <FrameLayout
            android:id="@+id/fl_detail_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/ll_detail_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                
                <!-- 详情内容(请按照以上的层级结构,detail_container 只能有一个子View) -->
                
            </LinearLayout>
        </FrameLayout>

    </FrameLayout>
</com.crazypumpkin.library.DragMoreScrollView>

代码设置:

mIvDetail.setOnScaleChangeListener(new OnScaleChangedListener() {
            @Override
            public void onScaleChange(float scaleFactor, float focusX, float focusY) {
                //当图片正在放大浏览的时候,禁用ScrollView
                String scale = mScaleFormat.format(mIvDetail.getScale());
                if (Float.parseFloat(scale) > 1) {
                    mDragMoreScrollView.setEnabled(false);
                } else {
                    mDragMoreScrollView.setEnabled(true);
                }
            }
        });
mDragMoreScrollView.setRatio(1f);//设置图片宽高比
mDragMoreScrollView.setExitZoomRect(new Rect());//设置缩略图的所占区域
//处于详情模式时应禁用图片缩放功能,在退出的时候finish Activity
mDragMoreScrollView.setOnStatusChangeListener(new DragMoreScrollView.OnStatusChangeListener() {
    @Override
    public void onDetailMode() {
        mIvDetail.setZoomable(false);
    }

    @Override
    public void onPhotoMode() {
        mIvDetail.setZoomable(true);
    }

    @Override
    public void onExit() {
        finish();
    }
});
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].