Updated on 2026-08-14

This commit is contained in:
Tangem 2018-07-06 15:18:17 +03:00
parent 390aa9a761
commit 248381a954
4 changed files with 42 additions and 18 deletions

Binary file not shown.

View file

@ -15,7 +15,7 @@ android {
applicationId "com.tangem.wallet"
minSdkVersion 21
targetSdkVersion 27
versionCode 32
versionCode 33
versionName "0.85.5." + generateVersionName()
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

View file

@ -28,6 +28,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
@ -125,6 +126,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
private FloatingActionButton fabInfo;
private Tag lastTag;
private ImageView ivTangemCard;
private RelativeLayout rlProgressBar;
public LoadedWallet() {
@ -577,13 +579,14 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
View v = inflater.inflate(R.layout.fr_loaded_wallet, container, false);
mSwipeRefreshLayout = v.findViewById(R.id.swipe_container);
progressBar = v.findViewById(R.id.progressBar);
rlProgressBar = v.findViewById(R.id.rlProgressBar);
ivTangemCard = v.findViewById(R.id.ivTangemCard);
tvBalance = v.findViewById(R.id.tvBalance);
tvOffline = v.findViewById(R.id.tvOffline);
tvCardID = v.findViewById(R.id.tvCardID);
tvWallet = v.findViewById(R.id.tvWallet);
tvInputs = v.findViewById(R.id.tvInputs);
// TextView lbInputs = v.findViewById(R.id.lbInputs);
tvLastOutput = v.findViewById(R.id.tvLastOutput);
tvError = v.findViewById(R.id.tvError);
tvMessage = v.findViewById(R.id.tvMessage);
@ -594,7 +597,6 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
ImageView imgLookup = v.findViewById(R.id.imgLookup);
ImageView ivCopy = v.findViewById(R.id.ivCopy);
tvValidationNode = v.findViewById(R.id.tvValidationNode);
progressBar = v.findViewById(R.id.progressBar);
tvBlockchain = v.findViewById(R.id.tvBlockchain);
ivBlockchain = v.findViewById(R.id.imgBlockchain);
ivPIN = v.findViewById(R.id.imgPIN);
@ -614,17 +616,11 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
ivTangemCard.setImageResource(mCard.getCardImageResource());
// Log.i(TAG, "sxnnnnnnnnnnn " + mCard.getBlockchainID());
Log.i(TAG, "sxnnnnnnnnnnn " + mCard.getTokenSymbol());
// Log.i(TAG, "getDenomination " + Arrays.toString(mCard.getDenomination()));
final CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
boolean visibleFlag = engine != null ? engine.InOutPutVisible() : true;
int visibleIOPuts = visibleFlag ? View.VISIBLE : View.GONE;
tvInputs.setVisibility(visibleIOPuts);
// lbInputs.setVisibility(visibleIOPuts);
// tvLastOutput.setVisibility(visibleIOPuts);
try {
ivQR.setImageBitmap(UtilHelper.INSTANCE.generateQrCode(Objects.requireNonNull(engine).getShareWalletURI(mCard).toString()));
@ -1059,6 +1055,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
@Override
public void OnReadStart(CardProtocol cardProtocol) {
progressBar.post(() -> {
rlProgressBar.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.VISIBLE);
progressBar.setProgress(5);
});
@ -1076,6 +1073,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
if (cardProtocol != null) {
if (cardProtocol.getError() == null) {
progressBar.post(() -> {
rlProgressBar.setVisibility(View.GONE);
progressBar.setProgress(100);
progressBar.setProgressTintList(ColorStateList.valueOf(Color.GREEN));
@ -1109,6 +1107,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
progressBar.postDelayed(() -> {
try {
rlProgressBar.setVisibility(View.GONE);
progressBar.setProgress(0);
progressBar.setProgressTintList(ColorStateList.valueOf(Color.DKGRAY));
progressBar.setVisibility(View.INVISIBLE);
@ -1128,6 +1127,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
verifyCardTask = null;
progressBar.postDelayed(() -> {
try {
rlProgressBar.setVisibility(View.GONE);
progressBar.setProgress(0);
progressBar.setProgressTintList(ColorStateList.valueOf(Color.DKGRAY));
progressBar.setVisibility(View.INVISIBLE);

View file

@ -54,8 +54,7 @@
android:layout_width="325dp"
android:layout_height="0dp"
android:layout_weight="1"
tools:src="@drawable/card_btc001"
/>
tools:src="@drawable/card_btc001"/>
<LinearLayout
android:layout_width="match_parent"
@ -265,13 +264,13 @@
android:visibility="gone">
<!--<TextView-->
<!--android:id="@+id/lbInputs"-->
<!--android:layout_width="110dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:fontFamily="@font/raleway_r"-->
<!--android:text="@string/unspents"-->
<!--android:textColor="@color/primary_dark"-->
<!--android:textSize="@dimen/text_size_small"/>-->
<!--android:id="@+id/lbInputs"-->
<!--android:layout_width="110dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:fontFamily="@font/raleway_r"-->
<!--android:text="@string/unspents"-->
<!--android:textColor="@color/primary_dark"-->
<!--android:textSize="@dimen/text_size_small"/>-->
<TextView
android:id="@+id/tvInputs"
@ -391,6 +390,31 @@
</LinearLayout>
<RelativeLayout
android:id="@+id/rlProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="215dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:alpha="0.5"
android:text="@string/verifying"
android:textColor="@color/colorPrimary"
android:textStyle="bold"/>
<ProgressBar
android:layout_width="@dimen/size_progress_bar_big"
android:layout_height="@dimen/size_progress_bar_big"
android:layout_centerInParent="true"
android:alpha="0.5"
android:elevation="1dp"/>
</RelativeLayout>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>