kandi background
Explore Kits

ViewPagerIndicator | Paging indicator widgets compatible | Android library

 by   JakeWharton Java Version: Current License: No License

 by   JakeWharton Java Version: Current License: No License

Download this library from

kandi X-RAY | ViewPagerIndicator Summary

ViewPagerIndicator is a Java library typically used in Mobile, Android applications. ViewPagerIndicator has no bugs, it has no vulnerabilities, it has build file available and it has medium support. You can download it from GitHub.
Paging indicator widgets that are compatible with the ViewPager from the [Android Support Library][2] to improve discoverability of content. Try out the sample application [on the Android Market][10].
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • ViewPagerIndicator has a medium active ecosystem.
  • It has 10225 star(s) with 4157 fork(s). There are 697 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 134 open issues and 146 have been closed. On average issues are closed in 224 days. There are 80 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of ViewPagerIndicator is current.
ViewPagerIndicator Support
Best in #Android
Average in #Android
ViewPagerIndicator Support
Best in #Android
Average in #Android

quality kandi Quality

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

securitySecurity

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

license License

  • ViewPagerIndicator 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.
ViewPagerIndicator License
Best in #Android
Average in #Android
ViewPagerIndicator License
Best in #Android
Average in #Android

buildReuse

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

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

  • Called when the view is drawn .
  • Handle a touch event .
  • gets all data by prefix
  • Override to measure the view s margins .
  • Set the selected item to be selected .
  • Calculate long .
  • Calculate the width of a measure .
  • Set the current item .
  • Move to a tab .
  • Initializes the view .

ViewPagerIndicator Key Features

Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

Usage

copy iconCopydownload iconDownload
<com.viewpagerindicator.TitlePageIndicator
    android:id="@+id/titles"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent" />

Including In Your Project

copy iconCopydownload iconDownload
<dependency>
  <groupId>com.viewpagerindicator</groupId>
  <artifactId>library</artifactId>
  <version>2.4.1</version>
  <type>apklib</type>
</dependency>

License

copy iconCopydownload iconDownload
Copyright 2012 Jake Wharton
Copyright 2011 Patrik Åkerfeldt
Copyright 2011 Francisco Figueiredo Jr.

Firebase Crash report not appearing in android after Firebase crashlytics update

copy iconCopydownload iconDownload
 throw new RuntimeException("Test Crash");

Equally spaced four images using constraint layout

copy iconCopydownload iconDownload
<androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#ffffff"
            android:orientation="vertical">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/colorPrimary"
                app:title="@string/app_name"
                app:titleTextColor="#ffffff"
                tools:ignore="MissingConstraints" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline50"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintGuide_percent="0.5" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cvcxv"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_below="@id/toolbar"
                android:background="@color/colorBlackNormal"
                app:layout_constraintBottom_toTopOf="@id/guideline50"
                app:layout_constraintTop_toBottomOf="@id/toolbar"
                tools:ignore="MissingConstraints">

                <androidx.viewpager.widget.ViewPager
                    android:id="@+id/viewpagerhome"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    tools:ignore="MissingConstraints" />

                <com.viewpagerindicator.CirclePageIndicator
                    android:id="@+id/indicator"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="-30dp"
                    android:layout_marginBottom="-3dp"
                    android:gravity="bottom"
                    android:padding="10dip"
                    app:centered="true"
                    app:fillColor="@color/colorPrimary"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:pageColor="#FFFFFF"
                    app:snap="false"
                    tools:ignore="MissingConstraints" />
            </androidx.constraintlayout.widget.ConstraintLayout>
    <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_gravity="bottom"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:gravity="bottom"
            android:orientation="vertical"
            app:layout_constraintTop_toBottomOf="@id/cvcxv"
            app:layout_constraintBottom_toBottomOf="parent">
    
            <Button
                android:id="@+id/image1"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginEnd="4dp"
                android:layout_marginRight="4dp"
                android:background="@drawable/chairsicon"
                app:layout_constraintDimensionRatio="h,1:1"
                app:layout_constraintEnd_toStartOf="@id/image2"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
    
            <Button
                android:id="@+id/image2"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="4dp"
                android:layout_marginLeft="4dp"
                android:background="@drawable/chairsicon"
                app:layout_constraintDimensionRatio="h,1:1"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/image1"
                app:layout_constraintTop_toTopOf="parent" />
    
            <Button
                android:id="@+id/image3"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="4dp"
                android:layout_marginRight="4dp"
                android:background="@drawable/chairsicon"
                app:layout_constraintDimensionRatio="h,1:1"
                app:layout_constraintEnd_toStartOf="@id/image4"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/image1" />
    
            <Button
                android:id="@+id/image4"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="4dp"
                android:layout_marginLeft="4dp"
                android:layout_marginTop="8dp"
                android:background="@drawable/chairsicon"
                app:layout_constraintDimensionRatio="h,1:1"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/image3"
                app:layout_constraintTop_toBottomOf="@id/image2" />
    
        </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
-----------------------
  <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:gravity="bottom"
    android:orientation="vertical"
    app:layout_constraintBottom_toBottomOf="parent">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.50" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.50" />


    <Button
        android:id="@+id/image2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="5dp"
        android:background="@drawable/ic_launcher_background"
        app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintEnd_toStartOf="@+id/guideline_vertical"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/image3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="10dp"
        android:background="@drawable/ic_launcher_background"
        app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@+id/guideline_vertical"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/image4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="10dp"
        android:background="@drawable/ic_launcher_background"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintEnd_toStartOf="@+id/guideline_vertical"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/guideline_horizontal" />

    <Button
        android:id="@+id/buttonMiddle"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="10dp"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@+id/guideline_vertical"
        app:layout_constraintTop_toTopOf="@+id/guideline_horizontal" />

</androidx.constraintlayout.widget.ConstraintLayout>
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.viewpager.widget.ViewPager
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        app:layout_constraintBottom_toTopOf="@id/image_divider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/vertical_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent=".5" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/image_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="top"
        app:constraint_referenced_ids="view1, view2" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/horizontal_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="top"
        app:constraint_referenced_ids="view3, view4" />
    
    <View
        android:id="@+id/view1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_orange_dark"
        app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toStartOf="@id/vertical_divider"
        app:layout_constraintStart_toStartOf="parent" />

    <View
        android:id="@+id/view2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_orange_light"
        app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/vertical_divider" />

    <View
        android:id="@+id/view3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_red_light"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toStartOf="@id/vertical_divider"
        app:layout_constraintStart_toStartOf="parent" />

    <View
        android:id="@+id/view4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_red_dark"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/vertical_divider" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ffffff"
        android:orientation="vertical">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="@color/colorPrimary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:title="@string/app_name"
            app:titleTextColor="#ffffff"
            tools:ignore="MissingConstraints" />

        <androidx.viewpager.widget.ViewPager
            android:id="@+id/viewpagerhome"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            app:layout_constraintBottom_toTopOf="@id/image_divider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/toolbar"
            tools:ignore="NotSibling" />

        <com.viewpagerindicator.CirclePageIndicator
            android:id="@+id/indicator"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="-30dp"
            android:layout_marginBottom="-3dp"
            android:gravity="bottom"
            android:padding="10dip"
            app:centered="true"
            app:fillColor="@color/colorPrimary"
            app:layout_constraintBottom_toBottomOf="@id/viewpagerhome"
            app:layout_constraintEnd_toEndOf="@id/viewpagerhome"
            app:layout_constraintStart_toStartOf="@id/viewpagerhome"
            app:pageColor="#FFFFFF"
            app:snap="false" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/vertical_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent=".5" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/image_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="top"
            app:constraint_referenced_ids="view1, view2" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/horizontal_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="top"
            app:constraint_referenced_ids="view3, view4" />

        <View
            android:id="@+id/view1"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/tableicon"
            app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toStartOf="@id/vertical_divider"
            app:layout_constraintStart_toStartOf="parent" />

        <View
            android:id="@+id/view2"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/sofaicon"
            app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/vertical_divider" />

        <View
            android:id="@+id/view3"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/chairsicon"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toStartOf="@id/vertical_divider"
            app:layout_constraintStart_toStartOf="parent" />

        <View
            android:id="@+id/view4"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/cupboardicon"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/vertical_divider" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        app:headerLayout="@layout/nav_header_main"
        app:itemBackground="@drawable/drawer_item_bg"
        app:itemIconTint="#ffffff"
        app:itemTextColor="#ffffff"
        app:menu="@menu/menu" />

</androidx.drawerlayout.widget.DrawerLayout>
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.viewpager.widget.ViewPager
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        app:layout_constraintBottom_toTopOf="@id/image_divider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/vertical_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent=".5" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/image_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="top"
        app:constraint_referenced_ids="view1, view2" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/horizontal_divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="top"
        app:constraint_referenced_ids="view3, view4" />
    
    <View
        android:id="@+id/view1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_orange_dark"
        app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toStartOf="@id/vertical_divider"
        app:layout_constraintStart_toStartOf="parent" />

    <View
        android:id="@+id/view2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_orange_light"
        app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/vertical_divider" />

    <View
        android:id="@+id/view3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_red_light"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toStartOf="@id/vertical_divider"
        app:layout_constraintStart_toStartOf="parent" />

    <View
        android:id="@+id/view4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="4dp"
        android:background="@android:color/holo_red_dark"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/vertical_divider" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ffffff"
        android:orientation="vertical">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="@color/colorPrimary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:title="@string/app_name"
            app:titleTextColor="#ffffff"
            tools:ignore="MissingConstraints" />

        <androidx.viewpager.widget.ViewPager
            android:id="@+id/viewpagerhome"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            app:layout_constraintBottom_toTopOf="@id/image_divider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/toolbar"
            tools:ignore="NotSibling" />

        <com.viewpagerindicator.CirclePageIndicator
            android:id="@+id/indicator"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="-30dp"
            android:layout_marginBottom="-3dp"
            android:gravity="bottom"
            android:padding="10dip"
            app:centered="true"
            app:fillColor="@color/colorPrimary"
            app:layout_constraintBottom_toBottomOf="@id/viewpagerhome"
            app:layout_constraintEnd_toEndOf="@id/viewpagerhome"
            app:layout_constraintStart_toStartOf="@id/viewpagerhome"
            app:pageColor="#FFFFFF"
            app:snap="false" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/vertical_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent=".5" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/image_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="top"
            app:constraint_referenced_ids="view1, view2" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/horizontal_divider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="top"
            app:constraint_referenced_ids="view3, view4" />

        <View
            android:id="@+id/view1"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/tableicon"
            app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toStartOf="@id/vertical_divider"
            app:layout_constraintStart_toStartOf="parent" />

        <View
            android:id="@+id/view2"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/sofaicon"
            app:layout_constraintBottom_toTopOf="@id/horizontal_divider"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/vertical_divider" />

        <View
            android:id="@+id/view3"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/chairsicon"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toStartOf="@id/vertical_divider"
            app:layout_constraintStart_toStartOf="parent" />

        <View
            android:id="@+id/view4"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="4dp"
            android:background="@drawable/cupboardicon"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/vertical_divider" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        app:headerLayout="@layout/nav_header_main"
        app:itemBackground="@drawable/drawer_item_bg"
        app:itemIconTint="#ffffff"
        app:itemTextColor="#ffffff"
        app:menu="@menu/menu" />

</androidx.drawerlayout.widget.DrawerLayout>
-----------------------
<androidx.drawerlayout.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/holder"
        android:layout_width="match_parent"
        android:background="#000000"
        android:layout_height="match_parent"
        android:orientation="vertical">


        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:background="#ffffff"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <androidx.appcompat.widget.Toolbar
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:id="@+id/toolbar"
                app:titleTextColor="#ffffff"
                app:title="@string/app_name"
                android:background="@color/colorPrimary"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:id="@+id/cvcxv"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintBottom_toTopOf="@id/images_container"
                app:layout_constraintStart_toStartOf="parent"
                android:layout_below="@id/toolbar"
                app:layout_constraintTop_toBottomOf="@id/toolbar"
                >
                <androidx.viewpager.widget.ViewPager
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:id="@+id/viewpagerhome"
                    tools:ignore="MissingConstraints" />

                <com.viewpagerindicator.CirclePageIndicator
                    android:id="@+id/indicator"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="-30dp"
                    android:layout_marginBottom="-3dp"
                    android:gravity="bottom"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:padding="10dip"
                    app:centered="true"
                    app:fillColor="@color/colorPrimary"
                    app:pageColor="#FFFFFF"
                    app:snap="false"
                    />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/images_container"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintHeight_percent="0.5"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent">

                <Button
                    android:id="@+id/image1"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="4dp"
                    android:layout_marginTop="4dp"
                    android:layout_marginEnd="2dp"
                    android:background="@drawable/lake"
                    app:layout_constraintBottom_toTopOf="@+id/image3"
                    app:layout_constraintEnd_toStartOf="@+id/image2"
                    app:layout_constraintHeight_percent="0.48"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintWidth_percent="0.48" />

                <Button
                    android:id="@+id/image2"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="2dp"
                    android:layout_marginTop="4dp"
                    android:layout_marginEnd="4dp"
                    android:background="@drawable/test"
                    app:layout_constraintBottom_toTopOf="@+id/image4"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHeight_percent="0.48"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toEndOf="@+id/image1"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintWidth_percent="0.48" />

                <Button
                    android:id="@+id/image3"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:background="@drawable/test"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/image4"
                    app:layout_constraintHeight_percent="0.48"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/image1"
                    app:layout_constraintWidth_percent="0.48" />

                <Button
                    android:id="@+id/image4"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:background="@drawable/lake"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHeight_percent="0.48"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toEndOf="@+id/image3"
                    app:layout_constraintTop_toBottomOf="@+id/image2"
                    app:layout_constraintWidth_percent="0.48" />

            </androidx.constraintlayout.widget.ConstraintLayout>



        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>


    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        android:layout_gravity="start"
        app:itemTextColor="#ffffff"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/menu"
        app:itemIconTint="#ffffff"
        app:itemBackground="@drawable/drawer_item_bg"
        />


</androidx.drawerlayout.widget.DrawerLayout>   

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)

copy iconCopydownload iconDownload
repositories {
  jcenter()
}

View pager click functions enables when click on tabLayout

copy iconCopydownload iconDownload
@Override
public void onTabSelected(TabLayout.Tab tab) {
    vehicleDetailsViewPager.setCurrentItem(tab.getPosition());
}
-----------------------
           @Override
            public void onTabSelected(TabLayout.Tab tab) {
                vehicleDetailsViewPager .setCurrentItem(tab.getPosition());
            }

Community Discussions

Trending Discussions on ViewPagerIndicator
  • FAILURE: Build failed with an exception. Android Java
  • Firebase Crash report not appearing in android after Firebase crashlytics update
  • Equally spaced four images using constraint layout
  • ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
  • View pager click functions enables when click on tabLayout
Trending Discussions on ViewPagerIndicator

QUESTION

FAILURE: Build failed with an exception. Android Java

Asked 2022-Feb-16 at 14:10

when I try to run the application, I encounter a long error as follows. How can I solve this?

Can you help me?

FAILURE: Build failed with an exception.

Executing tasks: [:app:assembleDebug] in project /Users/Developer/projectname

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class androidx.collection.LruCache found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.ActivityCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.NavUtils found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.NotificationCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.NotificationCompat$Builder found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.ServiceCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.ShareCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.ShareCompat$IntentBuilder found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.ShareCompat$IntentReader found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.app.TaskStackBuilder found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.content.IntentCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.content.pm.ActivityInfoCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.database.DatabaseUtilsCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.os.ParcelableCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.os.ParcelableCompatCreatorCallbacks found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.util.DebugUtils found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.util.LogWriter found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.util.TimeUtils found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.AccessibilityDelegateCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.MenuCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.MenuItemCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.MotionEventCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.VelocityTrackerCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.ViewCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.ViewConfigurationCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.ViewGroupCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.accessibility.AccessibilityEventCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.accessibility.AccessibilityManagerCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.accessibility.AccessibilityManagerCompat$AccessibilityStateChangeListenerCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.accessibility.AccessibilityNodeInfoCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.view.accessibility.AccessibilityRecordCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.core.widget.EdgeEffectCompat found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.CursorAdapter found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.CursorAdapter$ChangeObserver found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.CursorAdapter$MyDataSetObserver found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.CursorFilter found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.CursorFilter$CursorFilterClient found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.ResourceCursorAdapter found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.SimpleCursorAdapter found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.SimpleCursorAdapter$CursorToStringConverter found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.cursoradapter.widget.SimpleCursorAdapter$ViewBinder found in modules cursoradapter-1.0.0-runtime (androidx.cursoradapter:cursoradapter:1.0.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.BackStackRecord found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.BackStackState found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.BackStackState$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.DialogFragment found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.Fragment found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.Fragment$InstantiationException found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.Fragment$SavedState found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.Fragment$SavedState$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentActivity found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManager found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManager$BackStackEntry found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManager$OnBackStackChangedListener found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl$2 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl$3 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl$4 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerImpl$5 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerState found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentManagerState$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentPagerAdapter found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentState found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentState$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentStatePagerAdapter found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.FragmentTransaction found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.ListFragment found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.ListFragment$1 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.ListFragment$2 found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.fragment.app.SuperNotCalledException found in modules fragment-1.1.0-runtime (androidx.fragment:fragment:1.1.0) and jetified-support-v4-r7 (com.google.android:support-v4:r7) Duplicate class androidx.loader.app.LoaderManager found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.app.LoaderManager$LoaderCallbacks found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.app.LoaderManagerImpl found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.app.LoaderManagerImpl$LoaderInfo found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.AsyncTaskLoader found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.AsyncTaskLoader$LoadTask found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.CursorLoader found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.Loader found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.Loader$ForceLoadContentObserver found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.Loader$OnLoadCompleteListener found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$1 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$2 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$3 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$4 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$AsyncTaskResult found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$InternalHandler found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$Status found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.loader.content.ModernAsyncTask$WorkerRunnable found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and loader-1.0.0-runtime (androidx.loader:loader:1.0.0) Duplicate class androidx.localbroadcastmanager.content.LocalBroadcastManager found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and localbroadcastmanager-1.0.0-runtime (androidx.localbroadcastmanager:localbroadcastmanager:1.0.0) Duplicate class androidx.localbroadcastmanager.content.LocalBroadcastManager$1 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and localbroadcastmanager-1.0.0-runtime (androidx.localbroadcastmanager:localbroadcastmanager:1.0.0) Duplicate class androidx.localbroadcastmanager.content.LocalBroadcastManager$BroadcastRecord found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and localbroadcastmanager-1.0.0-runtime (androidx.localbroadcastmanager:localbroadcastmanager:1.0.0) Duplicate class androidx.localbroadcastmanager.content.LocalBroadcastManager$ReceiverRecord found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and localbroadcastmanager-1.0.0-runtime (androidx.localbroadcastmanager:localbroadcastmanager:1.0.0) Duplicate class androidx.viewpager.widget.PagerAdapter found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.PagerTitleStrip found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.PagerTitleStrip$PageListener found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$1 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$2 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$ItemInfo found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$LayoutParams found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$OnAdapterChangeListener found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$OnPageChangeListener found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$PagerObserver found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$SavedState found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$SavedState$1 found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0) Duplicate class androidx.viewpager.widget.ViewPager$SimpleOnPageChangeListener found in modules jetified-support-v4-r7 (com.google.android:support-v4:r7) and viewpager-1.0.0-runtime (androidx.viewpager:viewpager:1.0.0)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 9s 27 actionable tasks: 1 executed, 26 up-to-date

enter image description here

run :

enter image description here

build gradle (app):

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

def keystorePropertiesFile = rootProject.file("keystore.properties")
// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()
// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
    signingConfigs {
        release {
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
        }
    }
    compileSdkVersion 30
    buildToolsVersion '30.0.3'
    defaultConfig {
        applicationId "com.ligradyo.android"
        minSdkVersion 17
        targetSdkVersion 30
        versionCode 10
        versionName "1.1.0"
        multiDexEnabled true
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
        manifestPlaceholders = [onesignal_app_id               : "4193dbe8-83d0-4d1c-8625-1cb42c2a37ae",
                                onesignal_google_project_number: "658644867384"]

        archivesBaseName = "ligradyo-$versionName"
    }
    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
    buildTypes {
        release {
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation "androidx.core:core-ktx:1.3.2"
    implementation 'com.google.android.material:material:1.3.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.google.code.gson:gson:2.8.6'

    // Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.6.4'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.4'

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    kapt 'com.github.bumptech.glide:compiler:4.12.0'


    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.viewpagerindicator:library:2.4.1'

    // Add the Firebase Crashlytics SDK.
    implementation platform("com.google.firebase:firebase-bom:26.8.0")
    implementation "com.google.firebase:firebase-crashlytics"
    implementation "com.google.firebase:firebase-analytics"
    implementation "com.google.firebase:firebase-auth"
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-core'

    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0'

    implementation 'com.onesignal:OneSignal:3.15.6'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

}

build gradle (project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.4.32'
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven { url 'https://plugins.gradle.org/m2/' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        classpath 'com.google.gms:google-services:4.3.5'
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.10'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url "http://dl.bintray.com/populov/maven" }
        maven { url "https://jitpack.io" }
        mavenCentral()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

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

ANSWER

Answered 2022-Feb-16 at 14:10

I created a new project and moved my existing activity and design pages, checked the pages and added the latest version of the required libraries to the project and was able to solve the problem.

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

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

Vulnerabilities

No vulnerabilities reported

Install ViewPagerIndicator

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