Updated on 2026-08-14
This commit is contained in:
parent
80b3aba688
commit
a38a751d2c
9 changed files with 121 additions and 0 deletions
|
|
@ -127,6 +127,11 @@
|
|||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name="com.tangem.presentation.activity.SettingsDebugActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.tangem.presentation.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
|
||||
import com.tangem.wallet.R
|
||||
|
||||
class SettingsDebugActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_settings_debug)
|
||||
|
||||
initToolbar()
|
||||
}
|
||||
|
||||
private fun initToolbar() {
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)!!
|
||||
toolbar.title = getString(R.string.debug_settings)
|
||||
setSupportActionBar(toolbar)
|
||||
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp)
|
||||
toolbar.setNavigationOnClickListener {
|
||||
if (fragmentManager.backStackEntryCount == 0)
|
||||
finish()
|
||||
else
|
||||
fragmentManager.popBackStack()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.tangem.presentation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.preference.PreferenceFragment
|
||||
import android.preference.SwitchPreference
|
||||
import com.tangem.wallet.R
|
||||
|
||||
class SettingsDebug : PreferenceFragment() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
addPreferencesFromResource(R.xml.fr_settings_debug)
|
||||
|
||||
val debug_new_request_verify = findPreference(getString(R.string.key_debug_new_request_verify)) as SwitchPreference
|
||||
val debug_new_request_verify_show_json = findPreference(getString(R.string.key_debug_new_request_verify_show_json)) as SwitchPreference
|
||||
|
||||
debug_new_request_verify.title = "Новый запрос verify card"
|
||||
debug_new_request_verify_show_json.title = "Показать ответ"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
7
app/src/main/res/drawable/ic_arrow_left_white_24dp.xml
Normal file
7
app/src/main/res/drawable/ic_arrow_left_white_24dp.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#fff" android:pathData="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
|
||||
</vector>
|
||||
24
app/src/main/res/layout/activity_settings_debug.xml
Normal file
24
app/src/main/res/layout/activity_settings_debug.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/activity_about_layout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/about_fragment"
|
||||
android:name="com.tangem.presentation.fragment.SettingsDebug"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/view"/>
|
||||
|
||||
</RelativeLayout>
|
||||
10
app/src/main/res/layout/toolbar.xml
Normal file
10
app/src/main/res/layout/toolbar.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<android.support.v7.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
|
@ -47,6 +47,7 @@
|
|||
<string name="need_attach_card_again">Scan again to verify the card</string>
|
||||
<string name="reading">READING…</string>
|
||||
<string name="verifying">VERIFYING…</string>
|
||||
<string name="debug_settings">Дебаг</string>
|
||||
|
||||
<!-- dialogs -->
|
||||
<string name="device_is_rooted">Your Android device is rooted. Security at risk!</string>
|
||||
|
|
|
|||
6
app/src/main/res/values/strings_key.xml
Normal file
6
app/src/main/res/values/strings_key.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
|
||||
<string name="key_debug_new_request_verify" translatable="false">debug_new_request_verify</string>
|
||||
<string name="key_debug_new_request_verify_show_json" translatable="false">debug_new_request_verify_show_json</string>
|
||||
|
||||
</resources>
|
||||
15
app/src/main/res/xml/fr_settings_debug.xml
Normal file
15
app/src/main/res/xml/fr_settings_debug.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="">
|
||||
<SwitchPreference
|
||||
android:key="debug_new_request_verify"
|
||||
android:summary=""/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="debug_new_request_verify_show_json"
|
||||
android:summary=""/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Loading…
Add table
Add a link
Reference in a new issue