kandi background
Explore Kits

DiscreteScrollView | scrollable list of items that centers the current element | RecyclerView library

 by   yarolegovich Java Version: v1.5.1 License: No License

 by   yarolegovich Java Version: v1.5.1 License: No License

Download this library from

kandi X-RAY | DiscreteScrollView Summary

DiscreteScrollView is a Java library typically used in User Interface, RecyclerView applications. DiscreteScrollView has no bugs, it has no vulnerabilities, it has build file available and it has medium support. You can download it from GitHub.
The library is a RecyclerView-based implementation of a scrollable list, where current item is centered and can be changed using swipes. It is similar to a ViewPager, but you can quickly and painlessly create layout, where views adjacent to the currently selected view are partially or fully visible on the screen.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • DiscreteScrollView has a medium active ecosystem.
  • It has 5448 star(s) with 740 fork(s). There are 101 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 38 open issues and 148 have been closed. On average issues are closed in 504 days. There are 1 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of DiscreteScrollView is v1.5.1
DiscreteScrollView Support
Best in #RecyclerView
Average in #RecyclerView
DiscreteScrollView Support
Best in #RecyclerView
Average in #RecyclerView

quality kandi Quality

  • DiscreteScrollView has 0 bugs and 0 code smells.
DiscreteScrollView Quality
Best in #RecyclerView
Average in #RecyclerView
DiscreteScrollView Quality
Best in #RecyclerView
Average in #RecyclerView

securitySecurity

  • DiscreteScrollView has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • DiscreteScrollView code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
DiscreteScrollView Security
Best in #RecyclerView
Average in #RecyclerView
DiscreteScrollView Security
Best in #RecyclerView
Average in #RecyclerView

license License

  • DiscreteScrollView does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
DiscreteScrollView License
Best in #RecyclerView
Average in #RecyclerView
DiscreteScrollView License
Best in #RecyclerView
Average in #RecyclerView

buildReuse

  • DiscreteScrollView releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • It has 4299 lines of code, 462 functions and 61 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
DiscreteScrollView Reuse
Best in #RecyclerView
Average in #RecyclerView
DiscreteScrollView Reuse
Best in #RecyclerView
Average in #RecyclerView
Top functions reviewed by kandi - BETA

kandi has reviewed DiscreteScrollView and discovered the below as its top functions. This is intended to give you an instant insight into DiscreteScrollView implemented functionality, and help decide if they suit your requirements.

  • Called when the activity is created .
  • Set the pivot point on a view
  • Calculates the allowed scroll in the given direction .
  • Smooth scroll to a user - selected position .
  • Returns the closest position to the given position .
  • Initializes the layout manager .
  • Sets the weather preview .
  • Searches for a scroll .
  • Open the Snackbar .
  • Create view holder .

DiscreteScrollView Key Features

A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.

Gradle

copy iconCopydownload iconDownload
compile 'com.yarolegovich:discrete-scrollview:1.5.1'

General

copy iconCopydownload iconDownload
<com.yarolegovich.discretescrollview.DiscreteScrollView
  android:id="@+id/picker"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:dsv_orientation="horizontal|vertical" />  <!-- orientation is optional, default is horizontal -->

API

copy iconCopydownload iconDownload
scrollView.setOrientation(DSVOrientation o); //Sets an orientation of the view
scrollView.setOffscreenItems(count); //Reserve extra space equal to (childSize * count) on each side of the view
scrollView.setOverScrollEnabled(enabled); //Can also be set using android:overScrollMode xml attribute

License

copy iconCopydownload iconDownload
Copyright 2017 Yaroslav Shevchuk

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

NullPointerException when running from Google Play but not from Android Studio

copy iconCopydownload iconDownload
if ("your_component" != null){
//your code
}
-----------------------
public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                                //inflate the single recycler view layout(item)
                           //  !!!!!!!!!!!!! **the issue is here**! !!!!!!!!!!!!!!!
                                View view = LayoutInflater.from(parent.getContext())
                                        .inflate(R.layout.card_product, parent, false);
                                final CardHolder cardViewHolder = new CardHolder(view);
                                return cardViewHolder;
                            }
public class yourActivity extends AppCompatActivity{
   YourAdapter mAdapter; 
/// lets say you are setting it up in android ONCREATE Method
@override
public void OnCreate(....){
...........

mAdapter(data,design,YourActivity.this);
 //here this will be the context going in your adapter simple

}

}
public class YourAdapter extends RECYCLERView.Adapter......{
Context mContext;
public YourAdapter(Data data, int design,Context mContext)
this.mContext = mContext;
}
//and now you can access without any stress about context null exception 
   public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                            //inflate the single recycler view layout(item)
                            View view = LayoutInflater.from(mContext)
                                    .inflate(R.layout.card_product, parent, false);
                            final CardHolder cardViewHolder = new CardHolder(view);
                            return cardViewHolder;
                        }
-----------------------
public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                                //inflate the single recycler view layout(item)
                           //  !!!!!!!!!!!!! **the issue is here**! !!!!!!!!!!!!!!!
                                View view = LayoutInflater.from(parent.getContext())
                                        .inflate(R.layout.card_product, parent, false);
                                final CardHolder cardViewHolder = new CardHolder(view);
                                return cardViewHolder;
                            }
public class yourActivity extends AppCompatActivity{
   YourAdapter mAdapter; 
/// lets say you are setting it up in android ONCREATE Method
@override
public void OnCreate(....){
...........

mAdapter(data,design,YourActivity.this);
 //here this will be the context going in your adapter simple

}

}
public class YourAdapter extends RECYCLERView.Adapter......{
Context mContext;
public YourAdapter(Data data, int design,Context mContext)
this.mContext = mContext;
}
//and now you can access without any stress about context null exception 
   public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                            //inflate the single recycler view layout(item)
                            View view = LayoutInflater.from(mContext)
                                    .inflate(R.layout.card_product, parent, false);
                            final CardHolder cardViewHolder = new CardHolder(view);
                            return cardViewHolder;
                        }
-----------------------
public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                                //inflate the single recycler view layout(item)
                           //  !!!!!!!!!!!!! **the issue is here**! !!!!!!!!!!!!!!!
                                View view = LayoutInflater.from(parent.getContext())
                                        .inflate(R.layout.card_product, parent, false);
                                final CardHolder cardViewHolder = new CardHolder(view);
                                return cardViewHolder;
                            }
public class yourActivity extends AppCompatActivity{
   YourAdapter mAdapter; 
/// lets say you are setting it up in android ONCREATE Method
@override
public void OnCreate(....){
...........

mAdapter(data,design,YourActivity.this);
 //here this will be the context going in your adapter simple

}

}
public class YourAdapter extends RECYCLERView.Adapter......{
Context mContext;
public YourAdapter(Data data, int design,Context mContext)
this.mContext = mContext;
}
//and now you can access without any stress about context null exception 
   public CardHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                            //inflate the single recycler view layout(item)
                            View view = LayoutInflater.from(mContext)
                                    .inflate(R.layout.card_product, parent, false);
                            final CardHolder cardViewHolder = new CardHolder(view);
                            return cardViewHolder;
                        }

Community Discussions

Trending Discussions on DiscreteScrollView
  • gradlew app:dependencies command is not working
  • NullPointerException when running from Google Play but not from Android Studio
Trending Discussions on DiscreteScrollView

QUESTION

gradlew app:dependencies command is not working

Asked 2018-May-18 at 17:43

I am getting errors when running command gradlew app:dependencies. I want to check which dependency are making conflict. Because my project is not compiling after adding twitter dependency. So i disabled twitter dependency and tried to check which of module if using google.gms package. So i can exclude that.

Failed to notify project evaluation listener. javax/xml/bind/annotation/XmlSchema

Then tried changing version of gradle wrapper or gradle plugin. got this error.

Failed to notify project evaluation listener. Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

Then after some change again by searching this error.

Could not determine java version from '9.0.4'.

I can run app but i can not see dependency tree.

What is this, i am stuck of hours :(

app level build.gradle

apply plugin: 'com.android.application'
apply plugin: 'io.objectbox'
android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    defaultConfig {
        applicationId "com.amelio"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
    }
    buildTypes {
        debug {
            versionNameSuffix "-T"
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            versionNameSuffix "-R"
        }
    }
    dataBinding {
        enabled = true
    }
    compileOptions {
        sourceCompatibility rootProject.ext.sourceCompatibilityVersion
        targetCompatibility rootProject.ext.targetCompatibilityVersion
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
}

def SDP_VERSION = '1.0.5'
def PERCELER_VERSION = '1.1.10'

dependencies {
//    implementation rootProject.ext.dep.firebaseAuth
    configurations {
        all*.exclude group: 'com.android.support', module: 'support-v13'
    }
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation rootProject.ext.dep.supportAppcompatV7
    implementation rootProject.ext.dep.supportRecyclerViewV7
    implementation rootProject.ext.dep.supportV4
    implementation rootProject.ext.dep.supportDesign
    implementation rootProject.ext.dep.playServicesAuth
    implementation rootProject.ext.dep.retrofit2ConverterGson
    implementation rootProject.ext.dep.retrofit2
    implementation rootProject.ext.dep.playServicesLocation
    implementation rootProject.ext.dep.playServicesMaps
    implementation rootProject.ext.dep.playServicesPlaces
    implementation rootProject.ext.dep.firebaseMessaging
    implementation rootProject.ext.dep.materialDatePicker
    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
    implementation "com.intuit.sdp:sdp-android:$SDP_VERSION"
    implementation "com.intuit.ssp:ssp-android:$SDP_VERSION"
    implementation rootProject.ext.dep.picasso
    implementation 'com.wdullaer:materialdatetimepicker:3.5.1'
    implementation 'me.dm7.barcodescanner:zbar:1.9.8'
//  implementation 'com.google.android.gms:play-services:11.6.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
    implementation "org.parceler:parceler-api:$PERCELER_VERSION"
    annotationProcessor "org.parceler:parceler:$PERCELER_VERSION"
    implementation rootProject.ext.dep.butterKnife
    annotationProcessor rootProject.ext.dep.butterKnifeCompiler
//    compile 'com.razorpay:checkout:1.4.7'
    implementation('com.razorpay:checkout:1.4.1')
//    implementation('com.twitter.sdk.android:twitter:3.3.0@aar') {
//        transitive = true
//    }
}
apply plugin: 'com.google.gms.google-services'

project level build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: rootProject.file('dependencies.gradle')

buildscript {
    ext.objectboxVersion = '1.5.0'
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
//        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.2.0'
        classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
    }
}
allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
        }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

gradle-wrapper.properties

#Wed May 16 15:37:31 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

Another file dependencies.gradle which i use to define all dependency versions.

ext {
    compileSdkVersion = 27
    buildToolsVersion = '27.0.3'
    minSdkVersion = 15
    targetSdkVersion = 27
    sourceCompatibilityVersion = JavaVersion.VERSION_1_8
    targetCompatibilityVersion = JavaVersion.VERSION_1_8

    SUPPORT_LIB_VER = '27.1.0'
    PLAY_SERVICES_VER = '15.0.0'
    FIREBASE_VER = '15.0.0'
    RX_BINDING_VER = '2.0.0'
    DAGGER2_VER = '2.11-rc2'
    BOLTS_VER = '1.4.0'
    RETROFIT_VER = "2.1.0"
    OKHTTP_VER = '3.0.1'
    BUTTER_KNIFE_VER = '8.5.1'

    dep = [
            // Google Support Library.
            supportV4              : "com.android.support:support-v4:$SUPPORT_LIB_VER",
            supportV4CoreUtils     : "com.android.support:support-core-utils:$SUPPORT_LIB_VER",
            supportAppcompatV7     : "com.android.support:appcompat-v7:$SUPPORT_LIB_VER",
            supportRecyclerViewV7  : "com.android.support:recyclerview-v7:${SUPPORT_LIB_VER}",
            supportCardViewV7      : "com.android.support:cardview-v7:${SUPPORT_LIB_VER}",
            supportGridLayoutV7    : "com.android.support:gridlayout-v7:${SUPPORT_LIB_VER}",
            supportAnnotations     : "com.android.support:support-annotations:$SUPPORT_LIB_VER",
            supportDesign          : "com.android.support:design:${SUPPORT_LIB_VER}",
            supportVectorDrawable  : "com.android.support:support-vector-drawable:${SUPPORT_LIB_VER}",
            supportPercent         : "com.android.support:percent:${SUPPORT_LIB_VER}",
            supportTransition      : "com.android.support:transition:${SUPPORT_LIB_VER}",
            supportConstraintLayout: "com.android.support.constraint:constraint-layout:1.0.2",
            supportMultidex        : 'com.android.support:multidex:1.0.1',
            // Google Play Service.
            playServicesAds        : "com.google.android.gms:play-services-ads:${PLAY_SERVICES_VER}",
            playServicesAnalytics  : "com.google.android.gms:play-services-analytics:${PLAY_SERVICES_VER}",
            playServicesVision     : "com.google.android.gms:play-services-vision:${PLAY_SERVICES_VER}",
            playServicesMaps       : "com.google.android.gms:play-services-maps:${PLAY_SERVICES_VER}",
            playServicesPlaces     : "com.google.android.gms:play-services-places:${PLAY_SERVICES_VER}",
            playServicesAuth       : "com.google.android.gms:play-services-auth:${PLAY_SERVICES_VER}",
            playServicesLocation   : "com.google.android.gms:play-services-location:${PLAY_SERVICES_VER}",
            // Google Firebase.
            firebaseCore           : "com.google.firebase:firebase-core:${FIREBASE_VER}",
            firebaseAnalytics      : "com.google.firebase:firebase-analytics:${FIREBASE_VER}",
            firebaseAuth           : 'com.google.firebase:firebase-auth:15.0.0',
            firebaseConfig         : "com.google.firebase:firebase-config:${FIREBASE_VER}",
            firebaseCrash          : "com.google.firebase:firebase-crash:${FIREBASE_VER}",
            firebaseMessaging      : "com.google.firebase:firebase-messaging:${FIREBASE_VER}",
            firebaseInvites        : "com.google.firebase:firebase-invites:${FIREBASE_VER}",
            firebasePerf           : "com.google.firebase:firebase-perf:${FIREBASE_VER}",
            // Facebook.
            facebook               : 'com.facebook.android:facebook-android-sdk:4.18.0',
            facebookAudienceNetwork: 'com.facebook.android:audience-network-sdk:4.17.0',
            // JSON.
            gson                   : "com.google.code.gson:gson:2.7",
            // Image.
//            fresco                 : "com.facebook.fresco:fresco:0.14.1",
//            glide                  : "com.github.bumptech.glide:glide:3.7.0",
//            lottie                 : 'com.airbnb.android:lottie:2.0.0-rc1',
            picasso                 : 'com.squareup.picasso:picasso:2.5.2',
//            adobeFoundation        : 'com.adobe.creativesdk.foundation:auth:0.9.1251',
//            adobeImage             : 'com.adobe.creativesdk:image:4.8.3',
            // RxJava.
//            rxJava                 : 'io.reactivex.rxjava2:rxjava:2.1.0',
//            rxAndroid              : 'io.reactivex.rxjava2:rxandroid:2.0.1',
//            rxRelay                : 'com.jakewharton.rxrelay2:rxrelay:2.0.0',
//            rxBinding              : "com.jakewharton.rxbinding2:rxbinding:${RX_BINDING_VER}",
//            rxBindingRecyclerViewV7: "com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:${RX_BINDING_VER}",
//            rxPermissions          : 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar',
            // View Binding.
            butterKnife            : "com.jakewharton:butterknife:${BUTTER_KNIFE_VER}",
            butterKnifeCompiler    : "com.jakewharton:butterknife-compiler:${BUTTER_KNIFE_VER}",
            // Dependency Injection.
//            dagger2                : "com.google.dagger:dagger:${DAGGER2_VER}",
//            dagger2Support         : "com.google.dagger:dagger-android-support:${DAGGER2_VER}",
//            dagger2Compiler        : "com.google.dagger:dagger-compiler:${DAGGER2_VER}",
            // Leak Detection.
            leakcanary             : 'com.squareup.leakcanary:leakcanary-android:1.5.1',
            leakcanaryNoOp         : 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1',
            // Custom View.
//            discreteScrollView     : 'com.yarolegovich:discrete-scrollview:1.2.0',
            // ASYNC.
//            bolts                  : "com.parse.bolts:bolts-tasks:$BOLTS_VER",
            // BUS.
//            ottoBus                : 'com.squareup:otto:1.3.6',
            // HTTP/HTTPS.
            retrofit2              : "com.squareup.retrofit2:retrofit:${RETROFIT_VER}",
            retrofit2ConverterGson : "com.squareup.retrofit2:converter-gson:${RETROFIT_VER}",
//            retrofit2RxJava2Adapter: 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0',
            okhttp                 : "com.squareup.okhttp3:okhttp:$OKHTTP_VER",
//            okhttpMockWebServer    : "com.squareup.okhttp3:mockwebserver:$OKHTTP_VER",
//            volley                 : 'com.android.volley:volley:1.0.0',
            // TESTING.
//            testJunit              : 'junit:junit:4.12',
//            testMockito            : 'org.mockito:mockito-core:2.8.9',
//            testEspressoCore       : 'com.android.support.test.espresso:espresso-core:2.2.2',
//            testRunner             : 'com.android.support.test:runner:0.5',
            materialDatePicker     : 'com.wdullaer:materialdatetimepicker:3.5.0'
    ]
}

ANSWER

Answered 2018-May-18 at 17:43

Updating all dependencies worked for me.

Source https://stackoverflow.com/questions/50404539

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install DiscreteScrollView

You can download it from GitHub.
You can use DiscreteScrollView like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the DiscreteScrollView component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.