Git Product home page Git Product logo

quantitypickerview's Introduction

Hi there πŸ‘‹, I'm Guilherme Delgado

Software engineer focused on front-end mobile with special care for UX/UI @blissapps.
Currently working with Koltin Multiplatform and Compose Multiplatform.

When I’m not coding I’m πŸ§— or πŸ„β€β™‚οΈ

GuilhE

Latest publications

Connect with me

GuilhE GuilhE GuilhE

quantitypickerview's People

Contributors

gdelgadobliss avatar guilhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

quantitypickerview's Issues

How to get item click in recycle view?

In recycle view, the Quantity Picker is set as a child item. The button is not identifying when clicking`

My click listener code:

mListAdapter.setOnItemChildClickListener { adapter, view, position ->
if(view.id == R.id.quantitypicker) {
showToast("hai")`

My XML file
WhatsApp Image 2020-07-20 at 5 38 02 PM

        <com.github.guilhe.views.QuantityPickerView
            android:id="@+id/quantitypicker"
            android:onClick="click"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            app:textLabelFont="@font/poppins_medium"
            app:textLabelFormatter="%s "
            app:textLabelSize="14sp"
            app:btnAdd="@drawable/ic_dot"
            app:btnRemove="@drawable/ic_dot_remove"
            app:backgroundColor="@color/line"
            tools:isOpen="false" />
    </FrameLayout>

Count is not displaying

Thank you for the help. It worked when I used the toggle. But it is not
showing the count.

WhatsApp Image 2020-07-27 at 8 36 02 PM (1)

Animation getting slower on lower version android phone

Animation is getting slower while opening and closing
My XML :

`

        <com.github.guilhe.views.QuantityPickerView
            android:id="@+id/picker"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            app:textLabelFont="@font/poppins_medium"
            app:textLabelFormatter="%s "
            app:textLabelSize="14sp"
            app:rippleColor="@color/white"
            app:btnAdd="@drawable/default_btn_add"
            app:btnRemove="@drawable/default_btn_remove"
            app:backgroundColor="@color/white"
            tools:isOpen="true" />
    </FrameLayout>`

Testing device : Vivo V3
Version : Android 5.1
API Level : 21

Wrong measure specs inside ConstraintLayout when using 0dp

Describe the bug

When QuantityPickerView is child of a ConstraintLayout and it's width is 0dp (to take into account constraints) it receives wrong measures specs and the layout_width will be randomly wrong calculated.

To Reproduce

<androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="50dp">
       
        <com.github.guilhe.views.QuantityPickerView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
                 app:layout_constraintTop_toTopOf="parent"
                 app:layout_constraintBottom_toBottomOf="parent" />
    
</androidx.constraintlayout.widget.ConstraintLayout>

Expected behavior

No problems with measure specs

Details:

  • Library version: 1.2.4

Additional context

To fix this problem - for now - we have 2 options:

  1. Don't use 0dp, give it a fixed width value
  2. Add it as a child of FrameLayout and give constraints restrictions to the FrameLayout:
<androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="50dp">
    
        <FrameLayout
                android:id="@+id/quantityPickerView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">
                
                <com.github.guilhe.views.QuantityPickerView
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          app:value="@{item.quantity}" />
        </FrameLayout>
    
</androidx.constraintlayout.widget.ConstraintLayout>

isOpen attribute

Thanks a lot for your job !
I have a question about isOpen. I would like to use this picker always open. But when isOpen attribute is true, the start view is closed (only + button).
This attribute is private, then I cannot change it in my soft.
Is there any solution ?
Thank you again.
Alain

How to open quantity-picker view programmatically

First of all, thank you very much for your help in solving issues. I've just met with another issue.
How to open programmatically if there is any value
My XML :
holder.getView(R.id.picker) as QuantityPickerView).apply { if(it.picker_count!=null){ value=it.picker_count!! } }
//not working below line
this.isOpen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.