-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bank-sdk): Add custom nav bar to skonto help
PP-626
- Loading branch information
1 parent
6d597d6
commit 183ed1e
Showing
10 changed files
with
141 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ini/android/bank/sdk/exampleapp/ui/adapters/CustomSkontoHelpNavigationBarBottomAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package net.gini.android.bank.sdk.exampleapp.ui.adapters | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import net.gini.android.bank.sdk.capture.skonto.help.SkontoHelpNavigationBarBottomAdapter | ||
import net.gini.android.bank.sdk.exampleapp.databinding.CustomSkontoHelpNavigationBarBottomBinding | ||
|
||
class CustomSkontoHelpNavigationBarBottomAdapter: | ||
SkontoHelpNavigationBarBottomAdapter { | ||
var viewBinding: CustomSkontoHelpNavigationBarBottomBinding? = null | ||
|
||
override fun setOnBackClickListener(onClick: () -> Unit) { | ||
viewBinding?.gbsGoBack?.setOnClickListener { onClick() } | ||
} | ||
|
||
override fun onCreateView(container: ViewGroup): View { | ||
val binding = CustomSkontoHelpNavigationBarBottomBinding.inflate(LayoutInflater.from(container.context), container, false) | ||
viewBinding = binding | ||
|
||
return viewBinding!!.root | ||
} | ||
|
||
override fun onDestroy() { | ||
viewBinding = null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
bank-sdk/example-app/src/main/res/layout/custom_skonto_help_navigation_bar_bottom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorSurface" | ||
android:minHeight="@dimen/gc_large_64"> | ||
|
||
<ImageButton | ||
android:id="@+id/gbs_go_back" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="@dimen/gc_large" | ||
android:src="@drawable/gc_action_bar_back" | ||
android:padding="@dimen/gc_medium" | ||
app:tint="?attr/colorError" | ||
android:background="@android:color/transparent" | ||
android:contentDescription="@string/gc_back_button_description" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ava/net/gini/android/bank/sdk/capture/skonto/help/SkontoHelpNavigationBarBottomAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.gini.android.bank.sdk.capture.skonto.help | ||
|
||
import net.gini.android.capture.view.InjectedViewAdapter | ||
|
||
interface SkontoHelpNavigationBarBottomAdapter : InjectedViewAdapter { | ||
|
||
/** | ||
* Set the click listener for the back button. | ||
* | ||
* @param onClick the click function for the back button | ||
*/ | ||
fun setOnBackClickListener(onClick: () -> Unit) | ||
|
||
} |