From c352ea8439b1a5e040eadb8427f965cd782b0b8f Mon Sep 17 00:00:00 2001 From: dani Date: Thu, 28 Nov 2024 12:28:17 +0200 Subject: [PATCH] feat(internal-payment-sdk): Added landscape mode for `BankSelectionBottomSheet` IPC-459 --- .../example-app/src/main/AndroidManifest.xml | 2 - .../bankselection/BankSelectionBottomSheet.kt | 6 +- .../gps_bottom_sheet_bank_selection.xml | 92 +++++++++++++++++++ .../gps_bottom_sheet_bank_selection.xml | 48 ++-------- .../sdk/src/main/res/values/dimens.xml | 1 + 5 files changed, 104 insertions(+), 45 deletions(-) create mode 100644 internal-payment-sdk/sdk/src/main/res/layout-land/gps_bottom_sheet_bank_selection.xml diff --git a/health-sdk/example-app/src/main/AndroidManifest.xml b/health-sdk/example-app/src/main/AndroidManifest.xml index 05ac08ecb..640f5feaa 100644 --- a/health-sdk/example-app/src/main/AndroidManifest.xml +++ b/health-sdk/example-app/src/main/AndroidManifest.xml @@ -40,12 +40,10 @@ android:exported="false" /> diff --git a/internal-payment-sdk/sdk/src/main/java/net/gini/android/internal/payment/bankselection/BankSelectionBottomSheet.kt b/internal-payment-sdk/sdk/src/main/java/net/gini/android/internal/payment/bankselection/BankSelectionBottomSheet.kt index 5cb3e60b8..4efb95a06 100644 --- a/internal-payment-sdk/sdk/src/main/java/net/gini/android/internal/payment/bankselection/BankSelectionBottomSheet.kt +++ b/internal-payment-sdk/sdk/src/main/java/net/gini/android/internal/payment/bankselection/BankSelectionBottomSheet.kt @@ -62,6 +62,7 @@ class BankSelectionBottomSheet private constructor(private val paymentComponent: override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { binding = GpsBottomSheetBankSelectionBinding.inflate(inflater, container, false) + binding.gpsPaymentProviderAppsList.setHasFixedSize(false) binding.gpsPaymentProviderAppsList.layoutManager = LinearLayoutManager(requireContext()) binding.gpsPaymentProviderAppsList.adapter = PaymentProviderAppsAdapter(emptyList(), @@ -76,11 +77,6 @@ class BankSelectionBottomSheet private constructor(private val paymentComponent: } }) - binding.gpsCloseButton.setOnClickListener { - viewModel.backListener?.backCalled() - dismiss() - } - binding.gpsMoreInformationLabel.apply { paintFlags = binding.gpsMoreInformationLabel.paintFlags or Paint.UNDERLINE_TEXT_FLAG setOnClickListener { diff --git a/internal-payment-sdk/sdk/src/main/res/layout-land/gps_bottom_sheet_bank_selection.xml b/internal-payment-sdk/sdk/src/main/res/layout-land/gps_bottom_sheet_bank_selection.xml new file mode 100644 index 000000000..5b71c0426 --- /dev/null +++ b/internal-payment-sdk/sdk/src/main/res/layout-land/gps_bottom_sheet_bank_selection.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/internal-payment-sdk/sdk/src/main/res/layout/gps_bottom_sheet_bank_selection.xml b/internal-payment-sdk/sdk/src/main/res/layout/gps_bottom_sheet_bank_selection.xml index c02548ef3..4161f2a30 100644 --- a/internal-payment-sdk/sdk/src/main/res/layout/gps_bottom_sheet_bank_selection.xml +++ b/internal-payment-sdk/sdk/src/main/res/layout/gps_bottom_sheet_bank_selection.xml @@ -15,50 +15,22 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - + android:text="@string/gps_select_bank" + android:textColor="@color/gps_bank_selection_bottom_sheet_title" + app:layout_constraintTop_toBottomOf="@id/drag_handle" + app:layout_constraintStart_toStartOf="@id/gps_subtitle_label"/> + app:layout_constraintTop_toBottomOf="@id/gps_title_label" /> 56dp 60dp 64dp + 72dp 80dp 96dp 100dp