Updated on 2026-08-14
This commit is contained in:
parent
36eef84d80
commit
ef2dd67c9d
7 changed files with 24 additions and 34 deletions
|
|
@ -51,9 +51,5 @@ dependencies {
|
|||
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.github.gbIxaHue:eu4d:0.3.1'
|
||||
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
|
||||
implementation 'com.github.gbIxaHue:eu4d:0.3.4'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import android.widget.TextView
|
|||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.Observer
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.snackbar.BaseTransientBottomBar
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.tangem.CardManager
|
||||
|
|
@ -21,6 +21,7 @@ import com.tangem.tangemtest.card_use_cases.ui.widgets.ParameterWidget
|
|||
import com.tangem.tangemtest.card_use_cases.view_models.ActionViewModelFactory
|
||||
import com.tangem.tangemtest.card_use_cases.view_models.ParamsViewModel
|
||||
import com.tangem.tangemtest.commons.ActionType
|
||||
import ru.dev.gbixahue.eu4d.lib.android._android.views.find
|
||||
import ru.dev.gbixahue.eu4d.lib.android.global.log.Log
|
||||
import ru.dev.gbixahue.eu4d.lib.kotlin.common.LayoutHolder
|
||||
|
||||
|
|
@ -54,10 +55,7 @@ abstract class BaseCardActionFragment : Fragment(), LayoutHolder {
|
|||
|
||||
private fun initFab() {
|
||||
Log.d(this, "initFab")
|
||||
val fab = mainView.findViewById<ExtendedFloatingActionButton>(R.id.fab_action) ?: return
|
||||
|
||||
fab.setText(getAction().resName)
|
||||
fab.setOnClickListener { viewModel.invokeMainAction() }
|
||||
mainView.find<FloatingActionButton>(R.id.fab_action)?.setOnClickListener { viewModel.invokeMainAction() }
|
||||
}
|
||||
|
||||
private fun createWidgets(callback: (List<ParameterWidget>) -> Unit) {
|
||||
|
|
@ -97,7 +95,6 @@ abstract class BaseCardActionFragment : Fragment(), LayoutHolder {
|
|||
val inflater = LayoutInflater.from(where.context)
|
||||
val view = inflater.inflate(R.layout.w_card_incoming_param, where, false)
|
||||
where.addView(view)
|
||||
inflater.inflate(R.layout.m_divider_h, where, true)
|
||||
return view as ViewGroup
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,23 +22,19 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
layout="@layout/w_action_response_json"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/def_indent" />
|
||||
<include layout="@layout/w_action_response_json" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/def_indent"
|
||||
android:layout_marginBottom="@dimen/def_double_indent"
|
||||
android:text="any action" />
|
||||
android:src="@drawable/ic_nfc" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
@ -22,23 +22,19 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
layout="@layout/w_action_response_json"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/def_indent" />
|
||||
<include layout="@layout/w_action_response_json" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/def_indent"
|
||||
android:layout_marginBottom="@dimen/def_double_indent"
|
||||
android:text="any action" />
|
||||
android:src="@drawable/ic_nfc" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tv_action_response_json"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/def_indent">
|
||||
|
||||
</TextView>
|
||||
|
|
@ -7,13 +7,14 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_param"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="@dimen/def_indent"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="@dimen/def_indent"
|
||||
app:boxBackgroundColor="@android:color/transparent"
|
||||
app:endIconMode="clear_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_action"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -22,7 +23,10 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_param"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start|bottom"
|
||||
android:paddingBottom="4dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<string name="app_name">Tangem Demo</string>
|
||||
|
||||
<string name="fg_name_entry_point">@string/app_name</string>
|
||||
<string name="action_card_scan">Scan card</string>
|
||||
<string name="action_card_sign">Sign card</string>
|
||||
<string name="action_card_scan">Scan</string>
|
||||
<string name="action_card_sign">Sign</string>
|
||||
<string name="action_wallet_create">Create wallet</string>
|
||||
<string name="action_wallet_purge">Purge wallet</string>
|
||||
<string name="action_issuer_read_data">Read issuer data</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue