Updated on 2026-08-14

This commit is contained in:
Tangem 2018-06-08 13:47:57 +03:00
parent da64de5acc
commit a731ddba76
2 changed files with 80 additions and 76 deletions

View file

@ -96,7 +96,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
private static final int REQUEST_CODE_SWAP_PIN = 8; private static final int REQUEST_CODE_SWAP_PIN = 8;
private TangemCard mCard; private TangemCard mCard;
private TextView tvCardID, tvBalance, tvOffline, tvBalanceEquivalent, tvWallet, tvInputs, lbInputs, tvOutputs, tvSend, tvPurge, tvError, tvMessage, tvIssuer, tvIssuerData, tvBlockchain, tvLastInput, tvLastOutput, lbLastOutput, tvValidationNode; private TextView tvCardID, tvBalance, tvOffline, tvBalanceEquivalent, tvWallet, tvInputs, lbInputs, tvOutputs, tvLoad, tvSend, tvPurge, tvError, tvMessage, tvIssuer, tvIssuerData, tvBlockchain, tvLastInput, tvLastOutput, lbLastOutput, tvValidationNode;
private TextView tvHeader, tvCaution; private TextView tvHeader, tvCaution;
private ImageView imgLookup; private ImageView imgLookup;
private TextView tvLookup; private TextView tvLookup;
@ -594,6 +594,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
tvIssuerData = v.findViewById(R.id.tvIssuerData); tvIssuerData = v.findViewById(R.id.tvIssuerData);
tvHeader = v.findViewById(R.id.tvHeader); tvHeader = v.findViewById(R.id.tvHeader);
tvCaution = v.findViewById(R.id.tvCaution); tvCaution = v.findViewById(R.id.tvCaution);
tvLoad = v.findViewById(R.id.tvLoad);
tvSend = v.findViewById(R.id.tvSend); tvSend = v.findViewById(R.id.tvSend);
imgLookup = v.findViewById(R.id.imgLookup); imgLookup = v.findViewById(R.id.imgLookup);
tvValidationNode = v.findViewById(R.id.tvValidationNode); tvValidationNode = v.findViewById(R.id.tvValidationNode);
@ -619,10 +620,6 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
tvBalanceEquivalent = v.findViewById(R.id.tvBalanceEquivalent); tvBalanceEquivalent = v.findViewById(R.id.tvBalanceEquivalent);
tvWallet.setOnClickListener(v12 -> doShareWallet(false));
final CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain()); final CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
boolean visibleFlag = engine != null ? engine.InOutPutVisible() : true; boolean visibleFlag = engine != null ? engine.InOutPutVisible() : true;
@ -648,8 +645,6 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
} catch (WriterException e) { } catch (WriterException e) {
e.printStackTrace(); e.printStackTrace();
} }
ivQR.setOnClickListener(v1 -> doShareWallet(true));
if (imgLookup != null) { if (imgLookup != null) {
imgLookup.setOnClickListener(v15 -> { imgLookup.setOnClickListener(v15 -> {
@ -704,14 +699,18 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
}); });
} }
tvPurge.setOnClickListener(v16 -> showMenu(tvPurge));
updateViews(); updateViews();
if (!mCard.hasBalanceInfo()) { if (!mCard.hasBalanceInfo()) {
mSwipeRefreshLayout.setRefreshing(true); mSwipeRefreshLayout.setRefreshing(true);
mSwipeRefreshLayout.postDelayed(this::onRefresh, 1000); mSwipeRefreshLayout.postDelayed(this::onRefresh, 1000);
} }
tvWallet.setOnClickListener(v12 -> doShareWallet(false));
ivQR.setOnClickListener(v1 -> doShareWallet(true));
tvLoad.setOnClickListener(v1 -> doShareWallet(true));
tvPurge.setOnClickListener(v16 -> showMenu(tvPurge));
return v; return v;
} }

View file

@ -405,7 +405,7 @@
android:id="@+id/rlMessageAndError" android:id="@+id/rlMessageAndError"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/rlCardIdAndIcons"> app:layout_constraintBottom_toTopOf="@+id/rlToolButtons">
<TextView <TextView
android:id="@+id/tvMessage" android:id="@+id/tvMessage"
@ -438,13 +438,64 @@
</RelativeLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/rlToolButtons"
android:layout_width="0dp"
android:layout_height="40dp"
app:layout_constraintBottom_toTopOf="@+id/rlCardIdAndIcons"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<TextView
android:id="@+id/tvLoad"
android:layout_width="120dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@color/colorPrimary"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:text="@string/load"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
<TextView
android:id="@+id/tvPurge"
android:layout_width="40dp"
android:layout_height="36dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/ic_show_menu"
android:backgroundTint="@color/colorPrimaryDark"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
<TextView
android:id="@+id/tvSend"
android:layout_width="120dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@color/colorPrimary"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:text="@string/extract"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rlCardIdAndIcons" android:id="@+id/rlCardIdAndIcons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginLeft="8dp" app:layout_constraintBottom_toBottomOf="parent">
android:layout_marginRight="8dp"
app:layout_constraintBottom_toTopOf="@id/rlToolButtons">
<ImageView <ImageView
android:id="@+id/imgPIN" android:id="@+id/imgPIN"
@ -510,69 +561,23 @@
</RelativeLayout> </RelativeLayout>
<LinearLayout <include
android:id="@+id/rlToolButtons"
android:layout_width="0dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<TextView
android:id="@+id/tvLoad"
android:layout_width="120dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@color/colorPrimary"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:text="@string/load"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
<TextView
android:id="@+id/tvPurge"
android:layout_width="40dp"
android:layout_height="36dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/ic_show_menu"
android:backgroundTint="@color/colorPrimaryDark"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
<TextView
android:id="@+id/tvSend"
android:layout_width="120dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@color/colorPrimary"
android:fontFamily="@font/raleway_r"
android:gravity="center_vertical"
android:text="@string/extract"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/text_size_medium"/>
</LinearLayout>
<ProgressBar
android:id="@+id/progressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_marginBottom="36dp"
android:alpha="0.5"
android:elevation="1dp"
android:visibility="invisible" android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent" layout="@layout/layout_progress_horizontal"/>
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/> <!--<ProgressBar-->
<!--android:id="@+id/progressBar"-->
<!--style="@style/Widget.AppCompat.ProgressBar.Horizontal"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="16dp"-->
<!--android:layout_marginBottom="36dp"-->
<!--android:alpha="0.5"-->
<!--android:elevation="1dp"-->
<!--android:visibility="invisible"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintLeft_toLeftOf="parent"-->
<!--app:layout_constraintRight_toRightOf="parent"/>-->
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>