add bitpie cold introduction
ADD
bither-android/res/layout/dialog_bitpie_cold_info.xml
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_gravity="center"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:layout_marginTop="10dp"
+ android:layout_marginBottom="10dp"
+ android:textColor="@color/white"
+ android:text="@string/bitpie_cold_info_title"
+ android:textSize="17sp"/>
+
+ <TextView
+ android:id="@+id/tv"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minWidth="200dp"
+ android:layout_gravity="left"
+ android:layout_marginBottom="10dp"
+ android:gravity="left"
+ android:textColor="@color/white"
+ android:text="@string/bitpie_cold_info"
+ android:textSize="15sp"/>
+
+ <Button
+ android:id="@+id/btn_ok"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginLeft="10dp"
+ android:layout_marginRight="10dp"
+ android:layout_marginTop="10dp"
+ android:background="@drawable/dialog_btn_bg_selector"
+ android:gravity="center"
+ android:text="@string/OK"
+ android:textColor="@color/white"
+ android:textSize="14sp"/>
+</LinearLayout>
\ No newline at end of file

MODIFY
bither-android/res/layout/dialog_simple_qr.xml
bither-android/res/layout/dialog_simple_qr.xml
android:textColor="@color/white"/>
</FrameLayout>
+ <TextView
+ android:id="@+id/tv_scan_tip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/bitpie_scan_tip"
+ android:gravity="center"
+ android:textSize="17sp"
+ android:visibility="gone"
+ android:textColor="@color/white" />
+
<Button
android:id="@+id/btn_sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/bitpie_scan_sign_message_monitor"
+ android:text="@string/bitpie_scan_next"
android:layout_marginTop="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"

MODIFY
bither-android/res/layout/fragment_add_address_hot_hd_account.xml
bither-android/res/layout/fragment_add_address_hot_hd_account.xml
android:paddingRight="5dp"
android:paddingTop="25dp">
- <TextView
- android:id="@+id/tv_generate_label"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
- android:layout_marginTop="10dp"
+ android:orientation="horizontal" >
+
+ <ImageButton
+ android:id="@+id/ibtn_info"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="5dp"
+ android:background="@drawable/transparent"
+ android:visibility="gone"
+ android:src="@drawable/xrandom_info_icon_selector"/>
+
+ <TextView
+ android:id="@+id/tv_generate_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
android:text="@string/add_hd_account_label"
android:textColor="@color/text_field_text_color"
android:textSize="16sp"/>
+ </LinearLayout>
<LinearLayout
android:layout_width="match_parent"

MODIFY
bither-android/res/layout/fragment_add_address_hot_hd_account_view.xml
bither-android/res/layout/fragment_add_address_hot_hd_account_view.xml
android:paddingRight="5dp"
android:paddingTop="25dp">
- <TextView
- android:id="@+id/tv_account_label"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
+ android:orientation="horizontal" >
+
+ <ImageButton
+ android:id="@+id/ibtn_info"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="5dp"
+ android:background="@drawable/transparent"
+ android:visibility="gone"
+ android:src="@drawable/xrandom_info_icon_selector"/>
+
+ <TextView
+ android:id="@+id/tv_account_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
android:text="@string/add_hd_account_view_label"
android:textColor="@color/text_field_text_color"
android:textSize="16sp"/>
+ </LinearLayout>
<Button
android:id="@+id/btn_qr"

MODIFY
bither-android/res/values/strings.xml
bither-android/res/values/strings.xml
<string name="bitpie_signed_message_change_coin_confirm">Confirm to switch</string>
<string name="bitpie_signed_change_coin_qr_code_title">Use Bitpie scan to switch</string>
<string name="bitpie_no_support_coin">This coin hasn`t been supported yet, please update to the newest version</string>
+ <string name="bitpie_scan_tip">Please use bitpie to Scan this QR code</string>
+ <string name="bitpie_scan_next">Scanned, next</string>
+ <string name="bitpie_cold_info_title">Bitpie Cold introduction</string>
+ <string name="bitpie_cold_info" formatted="false">Bitpie Cold: it is a new efficient approach brought by us to manage more coins or tokens with cold storage solutions.\nBy using Bither Cold + Bitpie Cold, you are enabled to get access to more various types and categories of crypto assets management. However, the disadvantage of it hereof is that Bitpie (hot wallet side) is not open sourced despite the fact that both Bither and Bitpie are developed by Bither Team. Regardless that Bitpie is not 100% open sourced, the safety of Bither Cold+ Bitpie Cold solution is totally not affected since both Bither and the QR code specification of the Bitpie Cold protocol are 100% open source, viz., all the QR code data can be verified by the user themselves. More currency support is under development. You are free to choose the wallet solution provided by us.</string>
<string name="permissions_no_grant">Please go to Phone Setting->Apps->Bither->Permission to switch on relevant permissions, otherwise the function cannot be used.</string>

MODIFY
bither-android/src/net/bither/activity/hot/HotActivity.java
bither-android/src/net/bither/activity/hot/HotActivity.java
@@ -123,7 +123,7 @@ public class HotActivity extends BaseFragmentActivity {
if (!NetworkUtil.isConnected()) {
tvAlert.setText(R.string.tip_network_error);
llAlert.setVisibility(View.VISIBLE);
- } else if (PeerManager.instance().getConnectedPeers().size() == 0) {
+ } else if (!AddressManager.getInstance().noAddress() && PeerManager.instance().getConnectedPeers().size() == 0) {
tvAlert.setText(R.string.tip_no_peers_connected_scan);
pbAlert.setVisibility(View.VISIBLE);
llAlert.setVisibility(View.VISIBLE);

MODIFY
bither-android/src/net/bither/fragment/cold/AddAddressBitpieColdHDAccountFragment.java
bither-android/src/net/bither/fragment/cold/AddAddressBitpieColdHDAccountFragment.java
@@ -27,6 +27,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
+import android.widget.ImageButton;
import android.widget.TextView;
import net.bither.R;
@@ -42,6 +43,7 @@ import net.bither.runnable.ThreadNeedService;
import net.bither.service.BlockchainService;
import net.bither.ui.base.AddPrivateKeyActivity;
import net.bither.ui.base.DialogFragmentHDMSingularColdSeed;
+import net.bither.ui.base.dialog.DialogBitpieColdInfo;
import net.bither.ui.base.dialog.DialogConfirmTask;
import net.bither.ui.base.dialog.DialogPassword;
import net.bither.ui.base.dialog.DialogProgress;
@@ -61,6 +63,7 @@ public class AddAddressBitpieColdHDAccountFragment extends Fragment implements A
private CheckBox cbxXRandom;
private DialogProgress dp;
private BitpieHDAccountCold hdAccount;
+ private ImageButton ibtnInfo;
@Override
@@ -68,6 +71,7 @@ public class AddAddressBitpieColdHDAccountFragment extends Fragment implements A
savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_add_address_hot_hd_account, container, false);
cbxXRandom = v.findViewById(R.id.cbx_xrandom);
+ ibtnInfo = v.findViewById(R.id.ibtn_info);
cbxXRandom.setOnCheckedChangeListener(xRandomCheck);
v.findViewById(R.id.ibtn_xrandom_info).setOnClickListener(DialogXRandomInfo.GuideClick);
v.findViewById(R.id.btn_add).setOnClickListener(addClick);
@@ -75,6 +79,8 @@ public class AddAddressBitpieColdHDAccountFragment extends Fragment implements A
label.setText(R.string.bitpie_connector_add_account_label);
dp = new DialogProgress(v.getContext(), R.string.please_wait);
dp.setCancelable(false);
+ ibtnInfo.setOnClickListener(bitpieColdInfoClick);
+ ibtnInfo.setVisibility(View.VISIBLE);
return v;
}
@@ -209,4 +215,11 @@ public class AddAddressBitpieColdHDAccountFragment extends Fragment implements A
return dialog;
}
};
+
+ private View.OnClickListener bitpieColdInfoClick = new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ new DialogBitpieColdInfo(getActivity()).show();
+ }
+ };
}

MODIFY
bither-android/src/net/bither/fragment/cold/AddAddressBitpieColdHDAccountViewFragment.java
bither-android/src/net/bither/fragment/cold/AddAddressBitpieColdHDAccountViewFragment.java
@@ -23,6 +23,7 @@ import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.ImageButton;
import android.widget.TextView;
import net.bither.R;
@@ -30,6 +31,8 @@ import net.bither.bitherj.core.AddressManager;
import net.bither.bitherj.core.BitpieHDAccountCold;
import net.bither.bitherj.core.HDAccountCold;
import net.bither.bitherj.crypto.SecureCharSequence;
+import net.bither.ui.base.dialog.DialogBitpieColdInfo;
+import net.bither.ui.base.dialog.DialogConfirmTask;
import net.bither.ui.base.dialog.DialogHDMSeedWordList;
import net.bither.ui.base.dialog.DialogPassword;
import net.bither.ui.base.dialog.DialogProgress;
@@ -54,6 +57,9 @@ public class AddAddressBitpieColdHDAccountViewFragment extends Fragment implemen
btnQr.setText(R.string.bitpie_add_hd_account_seed_qr_code);
TextView btnPhrase = v.findViewById(R.id.btn_phrase);
btnPhrase.setText(R.string.bitpie_add_hd_account_seed_qr_phrase);
+ ImageButton ibtnInfo = v.findViewById(R.id.ibtn_info);
+ ibtnInfo.setOnClickListener(bitpieColdInfoClick);
+ ibtnInfo.setVisibility(View.VISIBLE);
btnQr.setOnClickListener(this);
btnPhrase.setOnClickListener(this);
return v;
@@ -133,4 +139,12 @@ public class AddAddressBitpieColdHDAccountViewFragment extends Fragment implemen
}
}).show();
}
+
+ private View.OnClickListener bitpieColdInfoClick = new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ new DialogBitpieColdInfo(getActivity()).show();
+ }
+ };
+
}

ADD
bither-android/src/net/bither/ui/base/dialog/DialogBitpieColdInfo.java
+package net.bither.ui.base.dialog;
+
+import android.content.Context;
+import android.view.View;
+
+import net.bither.R;
+
+public class DialogBitpieColdInfo extends CenterDialog implements View.OnClickListener {
+
+ public DialogBitpieColdInfo(Context context) {
+ super(context);
+ setContentView(R.layout.dialog_bitpie_cold_info);
+ findViewById(R.id.btn_ok).setOnClickListener(this);
+ }
+
+ @Override
+ public void dismiss() {
+ super.dismiss();
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v.getId() == R.id.btn_ok) {
+ dismiss();
+ }
+ }
+
+}

MODIFY
bither-android/src/net/bither/ui/base/dialog/DialogSimpleQr.java
bither-android/src/net/bither/ui/base/dialog/DialogSimpleQr.java
@@ -46,6 +46,7 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
private TextView tvSubtitle;
private Button btnSign;
private Context context;
+ private TextView tvScanTip;
public DialogSimpleQr(Context context, String content) {
this(context, content, null);
@@ -82,7 +83,9 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
TextView tvTitle = (TextView) findViewById(R.id.tv_title);
tvTitle.setText(title);
btnSign = findViewById(R.id.btn_sign);
+ tvScanTip = findViewById(R.id.tv_scan_tip);
if (title.equals(context.getString(R.string.add_bitpie_cold_hd_account_monitor_qr))) {
+ tvScanTip.setVisibility(View.VISIBLE);
btnSign.setVisibility(View.VISIBLE);
btnSign.setOnClickListener(toBitpieColdSignMessageActivityClickListener);
}

MODIFY
bitherj
bitherj
-Subproject commit 23c09f6d6ffd186ed8e4284a6de70902849ce232
+Subproject commit f2547f62b2399a4ff9ecdc217fc132d79ac22a0e

add bitpie cold introduction