JunZhang
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
19 additions and
1 deletions
-
app/src/main/java/com/cobo/cold/ui/fragment/Constants.java
-
app/src/main/java/com/cobo/cold/ui/fragment/main/AddressFragment.java
-
app/src/main/java/com/cobo/cold/ui/fragment/main/ReceiveCoinFragment.java
-
app/src/main/res/layout/receive_fragment.xml
|
|
@ -23,6 +23,7 @@ public interface Constants { |
|
|
|
String KEY_ID = "id"; |
|
|
|
String KEY_ADDRESS = "address"; |
|
|
|
String KEY_ADDRESS_NAME = "address_name"; |
|
|
|
String KEY_ADDRESS_PATH = "address_path"; |
|
|
|
String KEY_TITLE = "title"; |
|
|
|
String KEY_NAV_ID = "nav_id"; |
|
|
|
String IS_FORCE = "is_force"; |
|
|
|
|
|
@ -39,6 +39,7 @@ import java.util.Objects; |
|
|
|
|
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS_NAME; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS_PATH; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_COIN_CODE; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_COIN_ID; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ID; |
|
|
@ -58,6 +59,7 @@ public class AddressFragment extends BaseFragment<AddressFragmentBinding> { |
|
|
|
data.putString(KEY_COIN_CODE, bundle.getString(KEY_COIN_CODE)); |
|
|
|
data.putString(KEY_ADDRESS, addr.getAddressString()); |
|
|
|
data.putString(KEY_ADDRESS_NAME, addr.getName()); |
|
|
|
data.putString(KEY_ADDRESS_PATH, addr.getPath()); |
|
|
|
navigate(R.id.action_to_receiveCoinFragment, data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
@ -28,6 +28,7 @@ import java.util.Objects; |
|
|
|
|
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS_NAME; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_ADDRESS_PATH; |
|
|
|
import static com.cobo.cold.ui.fragment.Constants.KEY_COIN_CODE; |
|
|
|
|
|
|
|
public class ReceiveCoinFragment extends BaseFragment<ReceiveFragmentBinding> { |
|
|
@ -44,6 +45,7 @@ public class ReceiveCoinFragment extends BaseFragment<ReceiveFragmentBinding> { |
|
|
|
mBinding.setAddress(data.getString(KEY_ADDRESS)); |
|
|
|
mBinding.setAddressName(data.getString(KEY_ADDRESS_NAME)); |
|
|
|
mBinding.setCoinCode(data.getString(KEY_COIN_CODE)); |
|
|
|
mBinding.setPath(data.getString(KEY_ADDRESS_PATH)); |
|
|
|
mBinding.qrcode.setData(data.getString(KEY_ADDRESS)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -33,6 +33,9 @@ |
|
|
|
<variable |
|
|
|
name="address" |
|
|
|
type="String" /> |
|
|
|
<variable |
|
|
|
name="path" |
|
|
|
type="String" /> |
|
|
|
</data> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
@ -87,13 +90,23 @@ |
|
|
|
android:textColor="@color/white40" |
|
|
|
android:textSize="12sp" |
|
|
|
tools:text="19zhQ 2rKq Xm5r y1pj Co83 JbBK 5zUr bdKgc" /> |
|
|
|
<TextView |
|
|
|
android:layout_width="148dp" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginTop="6dp" |
|
|
|
android:gravity="center_horizontal" |
|
|
|
android:lineSpacingExtra="5dp" |
|
|
|
android:text="@{'('+path+')'}" |
|
|
|
android:textColor="@color/white40" |
|
|
|
android:textSize="12sp" |
|
|
|
tools:text="m/49'/0'/0'" /> |
|
|
|
|
|
|
|
<com.cobo.cold.ui.views.qrcode.QrCodeView |
|
|
|
android:id="@+id/qrcode" |
|
|
|
android:layout_width="160dp" |
|
|
|
android:layout_height="160dp" |
|
|
|
android:layout_marginHorizontal="34dp" |
|
|
|
android:layout_marginTop="28dp" |
|
|
|
android:layout_marginTop="20dp" |
|
|
|
android:background="@color/white" |
|
|
|
android:padding="5dp" |
|
|
|
android:keepScreenOn="true"> |
|
|
|