kandi background
Explore Kits

SmartTabLayout | custom ViewPager title strip which gives continuous feedback | Android library

 by   ogaclejapan Java Version: Current License: Apache-2.0

 by   ogaclejapan Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | SmartTabLayout Summary

SmartTabLayout is a Java library typically used in Mobile, Android applications. SmartTabLayout has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
A custom ViewPager title strip which gives continuous feedback to the user when scrolling. This library has been added some features and utilities based on android-SlidingTabBasic project of Google Samples. Try out the sample application on the Play Store.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • SmartTabLayout has a medium active ecosystem.
  • It has 6913 star(s) with 1353 fork(s). There are 195 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 115 open issues and 163 have been closed. On average issues are closed in 90 days. There are 5 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of SmartTabLayout is current.
SmartTabLayout Support
Best in #Android
Average in #Android
SmartTabLayout Support
Best in #Android
Average in #Android

quality kandi Quality

  • SmartTabLayout has 0 bugs and 0 code smells.
SmartTabLayout Quality
Best in #Android
Average in #Android
SmartTabLayout Quality
Best in #Android
Average in #Android

securitySecurity

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

license License

  • SmartTabLayout is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
SmartTabLayout License
Best in #Android
Average in #Android
SmartTabLayout License
Best in #Android
Average in #Android

buildReuse

  • SmartTabLayout releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • SmartTabLayout saves you 1221 person hours of effort in developing the same functionality from scratch.
  • It has 2749 lines of code, 216 functions and 71 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
SmartTabLayout Reuse
Best in #Android
Average in #Android
SmartTabLayout Reuse
Best in #Android
Average in #Android
Top functions reviewed by kandi - BETA

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

  • Scroll the tab to the specified position .
  • Draws the decoration .
  • Method used to create the tab view
  • Creates the example .
  • Get the start position of the view .
  • Sets the fragment at a specific position .
  • Called when the drawable is stateful .
  • Called when the view is created .
  • Start a demo activity .
  • Inserts aBinder with the given key .

SmartTabLayout Key Features

A custom ViewPager title strip which gives continuous feedback to the user when scrolling

Usage

copy iconCopydownload iconDownload
// For androidx (1.0.0)
dependencies {
    compile 'com.ogaclejapan.smarttablayout:library:2.0.0@aar'

    //Optional: see how to use the utility.
    compile 'com.ogaclejapan.smarttablayout:utils-v4:2.0.0@aar'
}

// For legacy android support library (28.0.0)
dependencies {
    compile 'com.ogaclejapan.smarttablayout:library:1.7.0@aar'

    //Optional: see how to use the utility.
    compile 'com.ogaclejapan.smarttablayout:utils-v4:1.7.0@aar'

    //Deprecated since 1.7.0
    compile 'com.ogaclejapan.smarttablayout:utils-v13:1.7.0@aar'
}

How to customize the tab

copy iconCopydownload iconDownload

public class SmartTabLayout extends HorizontalScrollView {

    //...

    /**
     * Create the custom tabs in the tab layout. Set with
     * {@link #setCustomTabView(com.ogaclejapan.smarttablayout.SmartTabLayout.TabProvider)}
     */
    public interface TabProvider {

        /**
         * @return Return the View of {@code position} for the Tabs
         */
        View createTabView(ViewGroup container, int position, PagerAdapter adapter);

    }

    //...
}

PagerAdapter for View-based Page

copy iconCopydownload iconDownload

ViewPagerItemAdapter adapter = new ViewPagerItemAdapter(ViewPagerItems.with(this)
        .add(R.string.title, R.layout.page)
        .add("title", R.layout.page)
        .create());

viewPager.setAdapter(adapter);

//...

public void onPageSelected(int position) {

  //.instantiateItem() from until .destroyItem() is called it will be able to get the View of page.
  View page = adapter.getPage(position);

}


PagerAdapter for Fragment-based Page

copy iconCopydownload iconDownload

FragmentPagerItemAdapter adapter = new FragmentPagerItemAdapter(
        getSupportFragmentManager(), FragmentPagerItems.with(this)
        .add(R.string.title, PageFragment.class),
        .add(R.string.title, WithArgumentsPageFragment.class, new Bundler().putString("key", "value").get()),
        .add("title", PageFragment.class)
        .create());

viewPager.setAdapter(adapter);

//...

public void onPageSelected(int position) {

  //.instantiateItem() from until .destoryItem() is called it will be able to get the Fragment of page.
  Fragment page = adapter.getPage(position);

}

LICENSE

copy iconCopydownload iconDownload
Copyright (C) 2015 ogaclejapan
Copyright (C) 2013 The Android Open Source Project

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.

How to define width programmatically of tabs in SmartTabLayout

copy iconCopydownload iconDownload
app:tabMode="scrollable"
app:tabGravity="fill"

Community Discussions

Trending Discussions on SmartTabLayout
  • Dependency Resolution error Android Studio
  • why crash my app when use the Material button?
  • How to define width programmatically of tabs in SmartTabLayout
Trending Discussions on SmartTabLayout

QUESTION

Dependency Resolution error Android Studio

Asked 2020-May-05 at 03:21

I am building a chat application in native android

I get this errors when i try to run my project -

........

Duplicate class android.arch.lifecycle.AndroidViewModel found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ComputableLiveData found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.ComputableLiveData$1 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.ComputableLiveData$2 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.ComputableLiveData$3 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.LiveData found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-core-1.1.1-runtime.jar (android.arch.lifecycle:livedata-core:1.1.1)
Duplicate class android.arch.lifecycle.LiveData$1 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-core-1.1.1-runtime.jar (android.arch.lifecycle:livedata-core:1.1.1)
Duplicate class android.arch.lifecycle.LiveData$LifecycleBoundObserver found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-core-1.1.1-runtime.jar (android.arch.lifecycle:livedata-core:1.1.1)
Duplicate class android.arch.lifecycle.MediatorLiveData found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.MediatorLiveData$Source found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.MutableLiveData found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-core-1.1.1-runtime.jar (android.arch.lifecycle:livedata-core:1.1.1)
Duplicate class android.arch.lifecycle.Observer found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-core-1.1.1-runtime.jar (android.arch.lifecycle:livedata-core:1.1.1)
Duplicate class android.arch.lifecycle.Transformations found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.Transformations$1 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.Transformations$2 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.Transformations$2$1 found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and livedata-1.1.1-runtime.jar (android.arch.lifecycle:livedata:1.1.1)
Duplicate class android.arch.lifecycle.ViewModel found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ViewModelProvider found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ViewModelProvider$Factory found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ViewModelProvider$NewInstanceFactory found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ViewModelStore found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)
Duplicate class android.arch.lifecycle.ViewModelStoreOwner found in modules extensions-1.0.0-beta1-runtime.jar (android.arch.lifecycle:extensions:1.0.0-beta1) and viewmodel-1.1.1-runtime.jar (android.arch.lifecycle:viewmodel:1.1.1)

Go to the documentation to learn how to Fix dependency resolution errors.

.........

My App level gradle file -

apply plugin: 'com.android.application'

/**
 * This is a part of ChatApp Project (https://github.com/h01d/ChatApp)
 * Licensed under Apache License 2.0
 *
 * @author Raf (https://github.com/h01d)
 * @version 1.1
 * @since 27/02/2018
 */

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.namandevloper.satyampublic"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 2
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

configurations {
    all*.exclude group: 'com.android.support', module: 'support-v13'
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'

    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'
    implementation 'com.firebaseui:firebase-ui-database:3.1.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.google.firebase:firebase-crash:11.8.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    implementation 'com.squareup.picasso:picasso:2.5.2'
    //https://github.com/square/picasso (Apache License 2.0)
    implementation 'com.squareup.okhttp:okhttp:2.5.0'
    //https://github.com/square/okhttp (Apache License 2.0)
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    //https://github.com/hdodenhof/CircleImageView (Apache License 2.0)
    implementation 'com.sothree.slidinguppanel:library:3.4.0'
    //https://github.com/umano/AndroidSlidingUpPanel (Apache License 2.0)
    implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
    //https://github.com/dmytrodanylyk/android-process-button (MIT)
    implementation 'com.github.XunMengWinter:CircularAnim:0.3.4'
    //https://github.com/XunMengWinter/CircularAnim (No license)
    implementation 'com.github.florent37:diagonallayout:1.0.8'
    //https://github.com/florent37/DiagonalLayout (Apache License 2.0)
    implementation 'com.flaviofaria:kenburnsview:1.0.7'
    //https://github.com/flavioarfaria/KenBurnsView (Apache License 2.0)
    implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
    //https://github.com/ogaclejapan/SmartTabLayout (Apache License 2.0)
    implementation 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
    //https://github.com/ogaclejapan/SmartTabLayout (Apache License 2.0)
    implementation 'me.jahirfiquitiva:FABsMenu:1.1.1'
    //https://github.com/jahirfiquitiva/FABsMenu (Apache License 2.0)
}


apply plugin: 'com.google.gms.google-services'

Project level Gradle -

/**
 * This is a part of ChatApp Project (https://github.com/h01d/ChatApp)
 * Licensed under Apache License 2.0
 *
 * @author  Raf (https://github.com/h01d)
 * @version 1.1
 * @since   27/02/2018
 */

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.google.gms:google-services:3.1.2'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

What should i do? I have searched and tried a lot of things but none of them helped me.

ANSWER

Answered 2020-Apr-27 at 04:39

Migrating the Project to Androidx should help.

It can be done from:

Android Studio > Refactor > Migrate to Androidx

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

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

Vulnerabilities

No vulnerabilities reported

Install SmartTabLayout

You can download it from GitHub, Maven.
You can use SmartTabLayout 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 SmartTabLayout 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.