Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from agrosner/master
Browse files Browse the repository at this point in the history
Fix for React Native Consumers
  • Loading branch information
paynd authored Nov 30, 2017
2 parents fa4ad49 + 597954f commit d169f7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,14 @@ private void updateLast4() {
int length = number.length();
String digits = number.substring(length - 4);
textFourDigits.setText(digits);
relayoutChildren(this);
}

private static void relayoutChildren(View view) {
view.measure(
View.MeasureSpec.makeMeasureSpec(view.getMeasuredWidth(), View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(view.getMeasuredHeight(), View.MeasureSpec.EXACTLY));
view.layout(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
}

private void nextField(CreditEntryFieldBase currentField, String initialFieldValue) {
Expand Down
1 change: 0 additions & 1 deletion CreditCardEntryDemo/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

<com.devmarvel.creditcardentry.library.CreditCardForm
android:id="@+id/form_no_zip"
short_card_number_position
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
Expand Down

0 comments on commit d169f7a

Please sign in to comment.