Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicator dose not appear on screen #191

Open
MrAndroi opened this issue Dec 26, 2023 · 0 comments
Open

Indicator dose not appear on screen #191

MrAndroi opened this issue Dec 26, 2023 · 0 comments

Comments

@MrAndroi
Copy link

MrAndroi commented Dec 26, 2023

Hello, Thanks for the amazing library.

Im trying to use it like this:

Note, This issue on api level 34

//Xml
 <com.tbuonomo.viewpagerdotsindicator.DotsIndicator
            android:id="@+id/viewpager_indicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:selectedDotColor="@color/primary"
            app:dotsColor="@color/gray_2"
            app:dotsCornerRadius="10dp"
            app:dotsSize="8dp"
            app:dotsSpacing="7dp"
            app:dotsWidthFactor="1"
            app:progressMode="false"
            android:layout_marginBottom="30dp"
            app:layout_constraintBottom_toTopOf="@+id/button_next"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />


//primaryColor, is blue

and in the activity:


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(binding.root)
        init()
    }

    private fun init() {
        setupAdapter()
        setupClicks()
        setupListeners()
        binding.executePendingBindings()
    }

    private fun setupAdapter() {
        onBoardingAdapter = OnBoardingAdapter()
        binding.viewPager.adapter = onBoardingAdapter
        onBoardingAdapter.submitList(viewModel.onBoardingContent)
        binding.viewPager.offscreenPageLimit = 1
        binding.viewpagerIndicator.attachTo(binding.viewPager)
    }

but the issue when i run the app i do not see an indicators here is a screenshot:

link_image_one

but when i add black background to the indicator i can see it like this:

link_image_two

Can you help please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant