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

Ipc 459 landscape mode bank selection (bank list) #630

Open
wants to merge 2 commits into
base: feat(internal-payment-sdk)-Landscape-mode
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/gps_medium_12"
android:paddingHorizontal="@dimen/gps_large_72">

<com.google.android.material.bottomsheet.BottomSheetDragHandleView
style="@style/GiniPaymentTheme.Widget.BottomSheet.DragHandle"
android:id="@+id/drag_handle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gps_medium"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/scroll_view"
android:layout_below="@id/drag_handle"
android:layout_above="@id/gps_more_information_label"
android:fillViewport="true"
android:layout_marginBottom="@dimen/gps_medium_12">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/gps_title_label"
style="@style/GiniPaymentTheme.Typography.Subtitle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gps_select_bank"
android:textColor="@color/gps_bank_selection_bottom_sheet_title"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@id/gps_subtitle_label"
/>

<TextView
android:id="@+id/gps_subtitle_label"
style="@style/GiniPaymentTheme.Typography.Caption1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/gps_large"
android:text="@string/gps_payment_provider_apps_list_description"
android:textColor="@color/gps_bank_selection_bottom_sheet_caption"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/gps_title_label"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gps_payment_provider_apps_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gps_large"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/gps_subtitle_label"
tools:itemCount="13"
tools:listitem="@layout/gps_item_payment_provider_app" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/gps_more_information_label"
style="@style/GiniPaymentTheme.Typography.Caption2"
android:drawableStart="@drawable/gps_info_circle_icon"
android:drawableTint="@color/gps_more_information_color"
android:drawablePadding="@dimen/gps_medium"
android:text="@string/gps_more_information_underlined_part"
android:textColor="@color/gps_payment_component_caption"
android:gravity="center_vertical"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
/>

<include layout="@layout/gps_powered_by_gini"
android:id="@+id/gps_powered_by_gini_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,30 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gps_header_container"
android:layout_width="match_parent"
<TextView
android:id="@+id/gps_title_label"
style="@style/GiniPaymentTheme.Typography.Subtitle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/gps_subtitle_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0"
app:layout_constraintVertical_chainStyle="packed">

<ImageView
android:id="@+id/gps_close_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/gps_small"
android:layout_marginTop="@dimen/gps_large_32"
android:paddingVertical="@dimen/gps_medium_12"
android:paddingHorizontal="@dimen/gps_medium_12"
android:contentDescription="@string/gps_close_content_description"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/gps_close_icon"
app:tint="?attr/colorOnBackground" />

<TextView
android:id="@+id/gps_title_label"
style="@style/GiniPaymentTheme.Typography.Subtitle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/gps_large_24"
android:text="@string/gps_select_bank"
android:textColor="@color/gps_bank_selection_bottom_sheet_title"
app:layout_constraintBottom_toBottomOf="@+id/gps_close_button"
app:layout_constraintStart_toEndOf="@+id/gps_close_button"
app:layout_constraintTop_toTopOf="@+id/gps_close_button" />

</androidx.constraintlayout.widget.ConstraintLayout>
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"/>

<TextView
android:id="@+id/gps_subtitle_label"
style="@style/GiniPaymentTheme.Typography.Caption1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gps_small"
android:layout_marginStart="@dimen/gps_large"
android:layout_marginEnd="@dimen/gps_large"
android:text="@string/gps_payment_provider_apps_list_description"
android:textColor="@color/gps_bank_selection_bottom_sheet_caption"
app:layout_constraintBottom_toTopOf="@id/gps_payment_provider_apps_list"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/gps_header_container" />
app:layout_constraintTop_toBottomOf="@id/gps_title_label" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gps_payment_provider_apps_list"
Expand Down