Updated on 2026-08-14

This commit is contained in:
Tangem 2018-07-30 23:35:58 +03:00
parent bd03f61333
commit 26be445734
15 changed files with 59 additions and 106 deletions

View file

@ -21,7 +21,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<provider

View file

@ -1,6 +1,5 @@
package com.tangem.presentation.activity
import android.app.Activity
import android.nfc.NfcAdapter
import android.nfc.Tag
import android.os.Bundle
@ -29,12 +28,12 @@ class LoadedWalletActivity : AppCompatActivity() {
}
}
override fun onBackPressed() {
val loadedWallet = supportFragmentManager.findFragmentById(R.id.loaded_wallet_fragment) as LoadedWallet
val data = loadedWallet.prepareResultIntent()
data.putExtra(EXTRA_MODIFICATION, "update")
setResult(Activity.RESULT_OK, data)
finish()
}
// override fun onBackPressed() {
// val loadedWallet = supportFragmentManager.findFragmentById(R.id.loaded_wallet_fragment) as LoadedWallet
// val data = loadedWallet.prepareResultIntent()
// data.putExtra(EXTRA_MODIFICATION, "update")
// setResult(Activity.RESULT_OK, data)
// finish()
// }
}

View file

@ -83,6 +83,8 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
mNfcManager = NfcManager(this, this)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR

View file

@ -2,6 +2,7 @@ package com.tangem.presentation.activity;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.nfc.NfcAdapter;
@ -39,6 +40,8 @@ public class PurgeActivity extends AppCompatActivity implements NfcAdapter.Reade
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_purge);
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
mNfcManager = new NfcManager(this, this);
MainActivity.Companion.commonInit(getApplicationContext());

View file

@ -13,7 +13,6 @@ class VerifyCardActivity : AppCompatActivity() {
MainActivity.commonInit(applicationContext)
}
override fun onBackPressed() {
super.onBackPressed()
val verifyCard = supportFragmentManager.findFragmentById(R.id.verify_card_fragment) as VerifyCard

View file

@ -78,25 +78,6 @@
android:textStyle="bold"
tools:text="4.51735 mBtc"/>
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginStart="16dp"-->
<!--android:orientation="horizontal">-->
<!--<TextView-->
<!--android:id="@+id/tvBalanceEquivalent"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginStart="8dp"-->
<!--android:layout_marginTop="4dp"-->
<!--android:fontFamily="@font/montserrat_light"-->
<!--android:textColor="@android:color/darker_gray"-->
<!--android:textSize="@dimen/text_size_1_small"-->
<!--tools:text="343"/>-->
<!--</LinearLayout>-->
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -123,7 +104,6 @@
android:id="@+id/etWallet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:enabled="false"
android:fontFamily="@font/montserrat_light"
android:hint="@string/target_wallet_address"
@ -203,20 +183,6 @@
app:layout_constraintStart_toEndOf="@+id/etAmount"
app:layout_constraintTop_toTopOf="parent"/>
<!--<TextView-->
<!--android:id="@+id/tvAmountEquivalent"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginEnd="12dp"-->
<!--android:layout_marginTop="12dp"-->
<!--android:fontFamily="@font/montserrat_light"-->
<!--android:textColor="@android:color/darker_gray"-->
<!--android:textSize="@dimen/text_size_1_small"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--tools:text="0000"/>-->
</android.support.constraint.ConstraintLayout>
</LinearLayout>
@ -334,9 +300,10 @@
android:id="@+id/tvFeeEquivalent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:fontFamily="@font/montserrat_light"
android:paddingLeft="10dp"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:textColor="@android:color/darker_gray"
android:textSize="@dimen/text_size_1_small"
app:layout_constraintBottom_toBottomOf="parent"

View file

@ -1,12 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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"
tools:context="com.tangem.presentation.activity.LoadedWalletActivity">
<include
layout="@layout/content_loaded_wallet"/>
<fragment
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:id="@+id/loaded_wallet_fragment"
android:name="com.tangem.presentation.fragment.LoadedWallet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fr_loaded_wallet"/>
</android.support.design.widget.CoordinatorLayout>

View file

@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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"
tools:context="com.tangem.presentation.activity.VerifyCardActivity">
<include
layout="@layout/content_verify_card"
<fragment
android:id="@+id/verify_card_fragment"
android:name="com.tangem.presentation.fragment.VerifyCard"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fr_verify_card"/>
</android.support.design.widget.CoordinatorLayout>

View file

@ -1,10 +0,0 @@
<fragment
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:id="@+id/loaded_wallet_fragment"
android:name="com.tangem.presentation.fragment.LoadedWallet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fr_loaded_wallet"/>

View file

@ -1,10 +0,0 @@
<fragment
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:id="@+id/fragmentMain"
android:name="com.tangem.presentation.fragment.Main"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fr_main"/>

View file

@ -1,10 +0,0 @@
<fragment
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:id="@+id/verify_card_fragment"
android:name="com.tangem.presentation.fragment.VerifyCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fr_verify_card"/>

View file

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
tools:ignore="contentDescription">
<ImageView
android:layout_width="96dp"
@ -17,7 +19,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="16dp"
android:text="Touch fingerprint scanner to confirm"
android:text="@string/touch_fingerprint_scanner_to_confirm"
android:textAlignment="center"
android:textSize="@dimen/text_size_medium"/>

View file

@ -99,7 +99,7 @@
android:id="@+id/tvBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_weight="3"
android:fontFamily="@font/maaxmedium"
android:paddingLeft="5dp"
android:paddingRight="5dp"

View file

@ -7,8 +7,8 @@
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:padding="0dp"
tools:context="com.tangem.presentation.fragment.VerifyCard"
tools:ignore="contentDescription"
tools:showIn="@layout/activity_verify_card">
<android.support.v4.widget.SwipeRefreshLayout
@ -28,11 +28,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/rlCardInfo"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
@ -165,10 +164,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_light"
android:text="Sign hash"
android:textColor="@color/primary_dark"
android:textSize="@dimen/text_size_1_small"
android:textStyle="normal|bold"/>
android:textStyle="normal|bold"
tools:text="Sign hash"/>
</LinearLayout>
@ -190,10 +189,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_light"
android:text="Reusable"
android:textColor="@color/primary_dark"
android:textSize="@dimen/text_size_1_small"
android:textStyle="normal|bold"/>
android:textStyle="normal|bold"
tools:text="Reusable"/>
</LinearLayout>
@ -461,10 +460,10 @@
android:layout_height="match_parent"
android:fontFamily="@font/montserrat_light"
android:gravity="start|center_vertical"
android:text="address"
android:textColor="@color/primary_dark"
android:textSize="@dimen/text_size_small"
android:textStyle="normal|bold"/>
android:textStyle="normal|bold"
tools:text="1DoQdnSYshhZ5Tqt5Sk6svZt29jqoYVwQY"/>
</LinearLayout>
@ -474,12 +473,11 @@
android:orientation="horizontal">
<TextView
android:id="@+id/tvWalletIdentityLabel"
android:layout_width="@dimen/verify_card_left_col_width"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:fontFamily="@font/raleway_r"
android:text="Private key"
android:text="@string/private_key"
android:textSize="@dimen/text_size_1_small"/>
<TextView
@ -487,10 +485,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_light"
android:text="Possession proved"
android:textColor="@color/confirmed"
android:textSize="@dimen/text_size_1_small"
android:textStyle="normal|bold"/>
android:textStyle="normal|bold"
tools:text="Possession proved"/>
</LinearLayout>
@ -505,10 +503,10 @@
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="2"
android:text="Error!"
android:textAlignment="center"
android:textColor="@color/white"
android:textStyle="bold"/>
android:textStyle="bold"
tools:text="Error!"/>
<TextView
android:id="@+id/tvMessage"
@ -517,10 +515,10 @@
android:background="#7F7FF27F"
android:fontFamily="@font/montserrat_light"
android:padding="4dp"
android:text="Message!"
android:textAlignment="center"
android:textColor="@color/black"
android:textStyle="normal|bold"/>
android:textStyle="normal|bold"
tools:text="Message!"/>
</LinearLayout>
@ -567,7 +565,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabMenu"
android:layout_width="wrap_content"

View file

@ -190,10 +190,12 @@
<string name="possession_proved">Possession proved</string>
<string name="possession_not_proved">Possession NOT proved</string>
<string name="not_available">not available</string>
<string name="private_key">Private key</string>
<!-- SavePINActivity -->
<string name="save">Save</string>
<string name="delete">Delete</string>
<string name="protect_with_fingerprint">Protect with fingerprint</string>
<string name="touch_fingerprint_scanner_to_confirm">Touch fingerprint scanner to confirm</string>
</resources>