-
Notifications
You must be signed in to change notification settings - Fork 563
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
PageIndicatorView only work outside viewpager #121
Comments
Hi, it is not supposed to work inside viewpager. If you want to use
pageindicatorview with viewpager simply place them in layaut as you want
and specify your viewpager id to pageindicatorview via attribute or
programmatically.
Hopefully it helps.
…On Sun, Sep 1, 2019, 09:06 mohammad mahmoodi ***@***.***> wrote:
hi
i have some problem with com.rd.PageIndicatorView tag i used this tag
inside viewpager but i cant see result (dont show in build or design mode)
but when i move PageIndicatorView to outside of viewpager works fine
dont show
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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="match_parent"
xmlns:attrs="http://schemas.android.com/apk/res-auto"
tools:context=".HomeActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#03FFFFFF"
***@***.***/AppTheme.AppBarOverlay">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="200dp"
android:clickable="true"
android:visibility="visible"
tools:visibility="visible"
android:focusable="true">
<com.rd.PageIndicatorView
android:id="@+id/pageIndicatorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
app:piv_animationType="scale"
app:piv_dynamicCount="true"
app:piv_interactiveAnimation="true"
***@***.***/colorPrimary"
***@***.***/colorPrimary"
app:piv_viewPager="@+id/viewpager"
attrs:piv_padding="12dp"
attrs:piv_radius="8dp"
tools:visibility="visible" />
</androidx.viewpager.widget.ViewPager>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="top"
***@***.***:color/transparent"
***@***.***/AppTheme.PopupOverlay" />
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout>
<include
android:id="@+id/include"
***@***.***/content_home"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
***@***.***/btm_nav"
app:layout_anchor="@+id/include"
app:layout_anchorGravity="center" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
show
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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="match_parent"
xmlns:attrs="http://schemas.android.com/apk/res-auto"
tools:context=".HomeActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#03FFFFFF"
***@***.***/AppTheme.AppBarOverlay">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="200dp"
android:clickable="true"
android:visibility="visible"
tools:visibility="visible"
android:focusable="true">
</androidx.viewpager.widget.ViewPager>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="top"
***@***.***:color/transparent"
***@***.***/AppTheme.PopupOverlay" />
</FrameLayout>
<com.rd.PageIndicatorView
android:id="@+id/pageIndicatorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
app:piv_animationType="scale"
app:piv_dynamicCount="true"
app:piv_interactiveAnimation="true"
***@***.***/colorPrimary"
***@***.***/colorPrimary"
app:piv_viewPager="@+id/viewpager"
attrs:piv_padding="12dp"
attrs:piv_radius="8dp"
tools:visibility="visible" />
</com.google.android.material.appbar.AppBarLayout>
<include
android:id="@+id/include"
***@***.***/content_home"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
***@***.***/btm_nav"
app:layout_anchor="@+id/include"
app:layout_anchorGravity="center" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#121?email_source=notifications&email_token=ABYQPEBO62PVQPFKLRDUZM3QHNLWDA5CNFSM4ISVYM2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIT6JLA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYQPEFBY4QLKC4DA6RXDW3QHNLWDANCNFSM4ISVYM2A>
.
|
sorry , can you sho me an example , i cant find layout attr in PageIndicatorView tag |
app:piv_viewPager="@id/viewPager" |
i do it please watch my code in first comment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi
i have some problem with com.rd.PageIndicatorView tag i used this tag inside viewpager but i cant see result (dont show in build or design mode) but when i move PageIndicatorView to outside of viewpager works fine
dont show
show
The text was updated successfully, but these errors were encountered: