dbachelder / CreditCardEntry

Smooth UI for Credit Card Entry on Android device, regex check for supported credit card types and luhn check. Inspired by Square credit card entry interface
MIT License
503 stars 166 forks source link

android:padding seems to set a margin instead? #35

Open MiralDesai opened 8 years ago

MiralDesai commented 8 years ago

Hi,

In my XML I'm using 'android:padding="15dp"' on the CardForm, however it seems to be adding a margin around the entire view. Is there a way I can set the padding in XML between the white background and the text, to make the input field bigger? I would like the ability to add different paddings for different screen sizes, but I can handle that bit as long as I find a way to actually adjust the padding.

Is this a bug or something I'm just missing?

Thanks.

MiralDesai commented 8 years ago

To add to this, the design in general seems very restrictive. I cannot make changes that I would love. For now I've had to remove the library entirely/

dbachelder commented 8 years ago

Yeah.. there are tons of things I would like to make more flexible.. I just don't have the time to rewrite more that I did when I took this project over. Would love to see a PR :)

MiralDesai commented 8 years ago

I've actually forked your library since posting this and made some changes so that it is fully customisable by the end user. I will put this up on GitHub soon, probably after Christmas since I've been getting quite busy!

eliasbagley commented 8 years ago

@MiralDesai any news on those changes? I also need some customization but would hate to repeat something you've already done!

MiralDesai commented 8 years ago

@eliasbagley Yes! You can find my fork here: https://github.com/dcode-technologies/GreenCard

Still very busy so some things have not been done yet, like a sample, but it's there. My library does one thing differently however, I separated all the fields into separate EditText boxes because it better suited my needs. So the card number, expiry date, and cvv all have their own fields.

Let me know if you have any questions by raising an issue on the repo if you plan on using it.

eliasbagley commented 8 years ago

I'll take a look! I need mine as separate fields too, so it sounds like it should work out well