support bitpie cold signature bitpie login
MODIFY
bither-android/AndroidManifest.xml
bither-android/AndroidManifest.xml
android:name=".activity.cold.BitpieSignTxActivity"
android:screenOrientation="portrait"
android:theme="@style/BitherTransparentBgTheme" />
+ <activity
+ android:name=".activity.cold.BitpieColdSignMessageActivity"
+ android:screenOrientation="portrait"
+ android:theme="@style/BitherTransparentBgTheme" />
<activity
android:name="net.bither.activity.hot.SelectAddressToSendActivity"
android:configChanges="orientation|keyboard|keyboardHidden"

MODIFY
bither-android/res/layout/activity_sign_tx.xml
bither-android/res/layout/activity_sign_tx.xml
android:paddingLeft="6dp"
android:paddingRight="6dp">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:text="@string/bitpie_activity_send_coins_label"
+ android:textColor="@color/text_field_light_text_color"
+ android:textSize="14sp"
+ android:textStyle="bold"/>
+
+ <TextView
+ android:id="@+id/tv_coin_type"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="5dp"
+ android:layout_marginTop="5dp"
+ android:singleLine="true"
+ android:text="@string/bitpie_activity_send_coins_hint"
+ android:textColor="@color/text_field_text_color"
+ android:textSize="12sp"/>
+
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

MODIFY
bither-android/res/layout/dialog_simple_qr.xml
bither-android/res/layout/dialog_simple_qr.xml
android:textColor="@color/white"/>
</FrameLayout>
+ <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:layout_marginTop="5dp"
+ android:paddingLeft="15dp"
+ android:paddingRight="15dp"
+ android:paddingTop="10dp"
+ android:paddingBottom="10dp"
+ android:layout_marginBottom="15dp"
+ android:textSize="17sp"
+ android:background="@drawable/entry_keyboard_key_btn_bg"
+ android:visibility="gone"
+ android:layout_gravity="center"/>
+
</LinearLayout>
\ No newline at end of file

MODIFY
bither-android/res/values/strings.xml
bither-android/res/values/strings.xml
<string name="bitpie_scan_unsigned_transaction_title">Scan QR Code on Bitpie</string>
<string name="bitpie_scan_message_title">Scan QR Code on Bitpie</string>
+ <string name="bitpie_scan_sign_message_monitor">Bitpie connection signature</string>
+ <string name="bitpie_signed_message_qr_code_title">Scan with Bitpie to connect</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/cold/SignTxActivity.java
bither-android/src/net/bither/activity/cold/SignTxActivity.java
@@ -62,6 +62,7 @@ import javax.annotation.Nullable;
public class SignTxActivity extends SwipeRightActivity implements
IDialogPasswordListener {
+ private TextView tvCoinType;
private TextView tvFrom;
private TextView tvTo;
private TextView tvAmount;
@@ -91,6 +92,7 @@ public class SignTxActivity extends SwipeRightActivity implements
private void initView() {
findViewById(R.id.ibtn_cancel).setOnClickListener(
new IBackClickListener(0, R.anim.slide_out_right));
+ tvCoinType = findViewById(R.id.tv_coin_type);
tvFrom = (TextView) findViewById(R.id.tv_address_from);
tvTo = (TextView) findViewById(R.id.tv_address_to);
tvAmount = (TextView) findViewById(R.id.tv_amount);

MODIFY
bither-android/src/net/bither/qrcode/BitherQRCodeActivity.java
bither-android/src/net/bither/qrcode/BitherQRCodeActivity.java
@@ -43,6 +43,8 @@ import net.bither.ui.base.listener.IBackClickListener;
import java.util.ArrayList;
import java.util.List;
+import static net.bither.bitherj.qrcode.QRCodeUtil.BITPIE_COLD_MONITOR_QR_SING_MESSAGE_PREFIX;
+
public class BitherQRCodeActivity extends SwipeRightFragmentActivity implements DialogQRCodeOption.ISwitchQRCode {
private List<String> contents;
private List<String> oldContents;
@@ -83,7 +85,12 @@ public class BitherQRCodeActivity extends SwipeRightFragmentActivity implements
overridePendingTransition(0, 0);
} else {
isNewVerion = true;
+ if (codeString.startsWith(BITPIE_COLD_MONITOR_QR_SING_MESSAGE_PREFIX)) {
+ this.contents = new ArrayList<>();
+ contents.add(codeString);
+ } else {
this.contents = QRCodeUtil.getQrCodeStringList(QRCodeUtil.encodeQrCodeString(codeString));
+ }
initView();
String title = getTitleString();
if (!Utils.isEmpty(title)) {

MODIFY
bither-android/src/net/bither/ui/base/dialog/DialogSimpleQr.java
bither-android/src/net/bither/ui/base/dialog/DialogSimpleQr.java
@@ -20,15 +20,18 @@ package net.bither.ui.base.dialog;
import android.app.Dialog;
import android.content.Context;
+import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.view.View;
import android.view.WindowManager;
+import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import net.bither.R;
+import net.bither.activity.cold.BitpieColdSignMessageActivity;
import net.bither.bitherj.utils.Utils;
import net.bither.runnable.FancyQrCodeThread;
import net.bither.util.UIUtil;
@@ -41,7 +44,8 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
private ImageView ivQr;
private ProgressBar pb;
private TextView tvSubtitle;
-
+ private Button btnSign;
+ private Context context;
public DialogSimpleQr(Context context, String content) {
this(context, content, null);
@@ -69,6 +73,7 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
public DialogSimpleQr(Context context, String content, String title, String subtitle) {
super(context, R.style.tipsDialog);
+ this.context = context;
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().getAttributes().dimAmount = 0.8f;
setCanceledOnTouchOutside(true);
@@ -76,6 +81,11 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
if (!Utils.isEmpty(title)) {
TextView tvTitle = (TextView) findViewById(R.id.tv_title);
tvTitle.setText(title);
+ btnSign = findViewById(R.id.btn_sign);
+ if (title.equals(context.getString(R.string.add_bitpie_cold_hd_account_monitor_qr))) {
+ btnSign.setVisibility(View.VISIBLE);
+ btnSign.setOnClickListener(toBitpieColdSignMessageActivityClickListener);
+ }
}
ivQr = (ImageView) findViewById(R.id.iv_qrcode);
pb = (ProgressBar) findViewById(R.id.pb);
@@ -96,6 +106,16 @@ public class DialogSimpleQr extends Dialog implements FancyQrCodeThread.FancyQrC
this, false).start();
}
+ private View.OnClickListener toBitpieColdSignMessageActivityClickListener = new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(context, BitpieColdSignMessageActivity.class);
+ context.startActivity(intent);
+ dismiss();
+ }
+ };
+
@Override
public void generated(Bitmap bmp) {
pb.setVisibility(View.GONE);

MODIFY
bitherj
bitherj
-Subproject commit 6bef6fe04a255c2db637c982d3cac34ba9ffb8ba
+Subproject commit e7fd75d066915acad9f5f26252ca8001d42e36af

support bitpie cold signature bitpie login