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

Increase minSdkVersion to 19 #935

Merged
merged 1 commit into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Note: this release has breaking changes. See [MIGRATING.md](https://github.com/s
* [#907](https://github.com/stripe/stripe-android/pull/907) Update `PaymentIntent` model for API `2019-02-11`
* [#894](https://github.com/stripe/stripe-android/pull/894) Upgrade Android Gradle Plugin to 3.4.0
* [#872](https://github.com/stripe/stripe-android/pull/872) Create `CustomerSession.ActivityCustomerRetrievalListener` to handle `Activity` weak refs
* Increase `minSdkVersion` to 16
* Increase `minSdkVersion` from 14 to 19

## 8.7.0 2019-04-12
* [#863](https://github.com/stripe/stripe-android/pull/863) Fix garbage-collection issues with `Stripe` callbacks
Expand Down
2 changes: 1 addition & 1 deletion MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Migration Guides

### Migration from versions < 9.0.0
- `minSdkVersion` is now 16
- `minSdkVersion` is now 19

- `AccountParams.createAccountParams()` requires a `AccountParams#BusinessType` parameter
```java
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 19
targetSdkVersion rootProject.ext.compileSdkVersion
multiDexEnabled true
}
Expand Down
5 changes: 2 additions & 3 deletions example/res/layout/activity_customer_session.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/example_activity_total_margin"
android:layout_marginRight="@dimen/example_activity_total_margin"
android:layout_marginStart="@dimen/example_activity_total_margin"
android:layout_marginEnd="@dimen/example_activity_total_margin"
android:layout_marginTop="@dimen/example_vertical_spacing"
android:orientation="horizontal"
>
Expand All @@ -20,7 +20,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/example_customer_view_padding"
android:layout_marginRight="@dimen/example_customer_view_padding"
android:layout_weight="3"
android:text="@string/selected_card"
android:textAppearance="?attr/actionMenuTextAppearance"
Expand Down
2 changes: 0 additions & 2 deletions example/res/layout/activity_payment_multiline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="8dp"
android:paddingStart="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp"
android:gravity="center_horizontal"
android:orientation="vertical">
Expand Down
2 changes: 0 additions & 2 deletions example/res/layout/activity_polling.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="8dp"
android:paddingStart="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp"
tools:context="com.stripe.example.activity.RedirectActivity">

Expand Down
2 changes: 0 additions & 2 deletions example/res/layout/list_item_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingRight="10dp"
android:paddingEnd="10dp">

<TextView
Expand Down
2 changes: 0 additions & 2 deletions example/res/layout/payment_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="8dp"
android:paddingStart="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp"
android:gravity="center_horizontal"
android:orientation="vertical">
Expand Down
12 changes: 6 additions & 6 deletions example/res/layout/polling_list_headers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/underline"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
/>

<TextView
Expand All @@ -35,8 +35,8 @@
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/underline"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
/>

<TextView
Expand All @@ -53,8 +53,8 @@
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/underline"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
/>

<TextView
Expand Down
10 changes: 4 additions & 6 deletions example/res/layout/polling_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginRight="3dp"
android:layout_marginEnd="3dp"
/>

Expand All @@ -21,8 +20,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
/>

<TextView
Expand All @@ -32,8 +31,8 @@
android:layout_height="wrap_content"
android:maxLines="1"
android:gravity="center"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
/>

<TextView
Expand All @@ -44,7 +43,6 @@
android:maxLines="1"
android:gravity="center"
android:layout_marginStart="3dp"
android:layout_marginLeft="3dp"
/>

</LinearLayout>
2 changes: 1 addition & 1 deletion samplestore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {

defaultConfig {
applicationId "com.stripe.samplestore"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.View;
Expand All @@ -24,8 +23,8 @@ class ItemDivider extends RecyclerView.ItemDecoration {
@Override
public void onDraw(@NonNull Canvas c, @NonNull RecyclerView parent,
@NonNull RecyclerView.State state) {
int left = parent.getPaddingLeft();
int right = parent.getWidth() - parent.getPaddingRight();
final int start = parent.getPaddingStart();
final int end = parent.getWidth() - parent.getPaddingEnd();

int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
Expand All @@ -36,7 +35,7 @@ public void onDraw(@NonNull Canvas c, @NonNull RecyclerView parent,
int top = child.getBottom() + params.bottomMargin;
int bottom = top + divider.getIntrinsicHeight();

divider.setBounds(left, top, right, bottom);
divider.setBounds(start, top, end, bottom);
divider.draw(c);
}
}
Expand Down
1 change: 0 additions & 1 deletion samplestore/src/main/res/layout/activity_store.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
android:tint="@android:color/white"
app:rippleColor="@color/colorPrimary"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:clickable="true"
android:focusable="true"
Expand Down
3 changes: 0 additions & 3 deletions samplestore/src/main/res/layout/cart_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/shopping_cart_margin"
android:layout_marginLeft="@dimen/shopping_cart_margin"
android:gravity="center_vertical"
android:textSize="18sp"
/>
Expand All @@ -27,7 +26,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/item_padding"
android:layout_marginLeft="@dimen/item_padding"
android:gravity="center_vertical"
android:textSize="18sp"
/>
Expand All @@ -38,7 +36,6 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="end|center_vertical"
android:layout_marginRight="@dimen/shopping_cart_margin"
android:layout_marginEnd="@dimen/shopping_cart_margin"
android:textSize="22sp"
android:textAppearance="@android:style/TextAppearance.Holo.Widget.ActionMode.Title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
android:layout_height="match_parent"
android:paddingTop="@dimen/purchase_confirm_verical_margin"
android:paddingBottom="@dimen/purchase_confirm_verical_margin"
android:paddingLeft="@dimen/activity_padding"
android:paddingRight="@dimen/activity_padding"
android:paddingStart="@dimen/activity_padding"
android:paddingEnd="@dimen/activity_padding"
android:gravity="center_horizontal">

<TextView
Expand Down Expand Up @@ -34,7 +34,6 @@
android:layout_height="wrap_content"
android:textColor="@android:color/tertiary_text_light"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:layout_marginRight="@dimen/item_padding"
android:layout_marginEnd="@dimen/item_padding"
android:text="@string/total"
/>
Expand Down
4 changes: 0 additions & 4 deletions samplestore/src/main/res/layout/store_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/emoji_left_margin"
android:layout_marginStart="@dimen/emoji_left_margin"
style="@style/EmojiStyle"
/>
Expand All @@ -31,7 +30,6 @@
android:id="@+id/tv_quantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/emoji_left_margin"
android:layout_marginStart="@dimen/emoji_left_margin"
android:layout_gravity="center_vertical"
android:textSize="36sp"
Expand All @@ -44,7 +42,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/button_padding"
android:layout_marginLeft="@dimen/emoji_left_margin"
android:layout_marginStart="@dimen/emoji_left_margin"
android:layout_gravity="center_vertical"
android:background="?attr/selectableItemBackgroundBorderless"
Expand All @@ -60,7 +57,6 @@
android:gravity="end"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/price_right_margin"
android:layout_marginRight="@dimen/price_right_margin"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
/>

Expand Down
4 changes: 2 additions & 2 deletions samplestore/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

<style name="CustomButton" parent="Widget.AppCompat.Button.Colored">
<item name="android:minHeight">64dip</item>
<item name="android:paddingRight">24dp</item>
<item name="android:paddingLeft">24dp</item>
<item name="android:paddingStart">24dp</item>
<item name="android:paddingEnd">24dp</item>
</style>

<style name="EmojiStyle" parent="TextAppearance.AppCompat.Headline">
Expand Down
2 changes: 1 addition & 1 deletion stripe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 16
minSdkVersion 19
targetSdkVersion rootProject.ext.compileSdkVersion
consumerProguardFiles 'proguard-rules.txt'

Expand Down
3 changes: 0 additions & 3 deletions stripe/res/layout/activity_payment_methods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
android:layout_marginTop="@dimen/activity_total_margin"
android:focusableInTouchMode="true"
android:paddingStart="@dimen/masked_card_row_start_padding"
android:paddingLeft="@dimen/masked_card_row_start_padding"
android:paddingRight="@dimen/masked_card_row_end_padding"
android:paddingEnd="@dimen/masked_card_row_end_padding"
android:paddingTop="@dimen/add_payment_method_vertical_padding"
android:paddingBottom="@dimen/add_payment_method_vertical_padding"
Expand All @@ -64,7 +62,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="@dimen/masked_card_row_start_padding"
android:layout_marginStart="@dimen/masked_card_row_start_padding"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/payment_method_add_new_card"
Expand Down
9 changes: 3 additions & 6 deletions stripe/res/layout/card_input_widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
android:layout_marginTop="@dimen/card_icon_padding"
android:layout_marginBottom="@dimen/card_icon_padding"
android:layout_marginEnd="@dimen/card_icon_padding"
android:layout_marginRight="@dimen/card_icon_padding"
android:src="@drawable/ic_unknown"
android:contentDescription="@null" />

Expand Down Expand Up @@ -69,7 +68,7 @@
android:imeOptions="actionNext"
android:inputType="number"
android:maxLength="19"
android:layout_gravity="left"
android:layout_gravity="start"
android:focusable="true"
android:focusableInTouchMode="true"
android:visibility="visible"
Expand All @@ -96,9 +95,8 @@
android:visibility="visible"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_marginLeft="@dimen/card_expiry_initial_margin"
android:layout_marginStart="@dimen/card_expiry_initial_margin"
android:layout_gravity="left"
android:layout_gravity="start"
/>

<com.stripe.android.view.StripeEditText
Expand All @@ -117,9 +115,8 @@
android:maxLength="4"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_marginLeft="@dimen/card_cvc_initial_margin"
android:layout_marginStart="@dimen/card_cvc_initial_margin"
android:layout_gravity="left"
android:layout_gravity="start"
/>

</FrameLayout>
Expand Down
3 changes: 0 additions & 3 deletions stripe/res/layout/card_multiline_widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="@string/valid_digits"
android:drawableLeft="@drawable/ic_unknown"
android:drawablePadding="@dimen/card_icon_multiline_padding"
android:drawableStart="@drawable/ic_unknown"
android:imeOptions="actionNext"
Expand All @@ -41,7 +40,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/add_card_expiry_middle_margin"
android:layout_marginRight="@dimen/add_card_expiry_middle_margin"
android:layout_weight="1"
android:hint="@string/acc_label_expiry_date"
>
Expand All @@ -64,7 +62,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/add_card_expiry_middle_margin"
android:layout_marginRight="@dimen/add_card_expiry_middle_margin"
android:layout_weight="1"
>

Expand Down
2 changes: 0 additions & 2 deletions stripe/res/layout/masked_card_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/masked_card_row_end_padding"
android:paddingRight="@dimen/masked_card_row_end_padding"
android:paddingLeft="@dimen/masked_card_row_start_padding"
android:paddingStart="@dimen/masked_card_row_start_padding"
>

Expand Down
2 changes: 0 additions & 2 deletions stripe/res/layout/menu_text_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
Expand Down
Loading