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

Maybe im doing something wrong, but padding and radius in layout doesnt work to me #129

Open
MadRatSRP opened this issue Dec 1, 2019 · 3 comments

Comments

@MadRatSRP
Copy link

Here is my code from layout and image of it

    <com.rd.PageIndicatorView
        android:id="@+id/collectItemsPageIndicator"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:background="@color/WHITE"
        app:piv_animationType="scale"
        app:piv_dynamicCount="true"
        app:piv_interactiveAnimation="true"
        app:piv_selectedColor="@color/WHITE"
        app:piv_unselectedColor="@color/GRAY"
        app:piv_viewPager="@id/collectItemsViewPager"
        attrs:piv_padding="55dp"
        attrs:piv_radius="18dp" />

image

but it works when i declare it from code:

image

val pageIndicator: PageIndicatorView = view.findViewById(R.id.collectItemsPageIndicator)
pageIndicator.padding = 55

I'm using the latest version, 1.0.3 and Android X

@MadRatSRP
Copy link
Author

If i'm doing something wrong, please correct me. Thanks for your help!

@ilyaklyukin
Copy link

<layout 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"> ... <com.rd.PageIndicatorView ... tools:piv_padding="55dp" tools:piv_radius="18dp" />

@iammert
Copy link

iammert commented Apr 9, 2020

Use xmlns:attrs="http://schemas.android.com/apk/res-auto"

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

3 participants