45 lines
1.6 KiB
Java
45 lines
1.6 KiB
Java
package com.example.monnthic.monnthicmobile;
|
|
|
|
import android.content.Intent;
|
|
import android.support.v7.app.AppCompatActivity;
|
|
import android.os.Bundle;
|
|
import android.view.View;
|
|
import android.widget.Button;
|
|
|
|
public class DemoActivity extends AppCompatActivity {
|
|
private static final String WALLET_A = "0x5421c79d465a288c28e10aa43f9b7dff1b313c8e";
|
|
private static final String WALLET_B = "";
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_demo_wallet);
|
|
Button bWalletA = findViewById(R.id.walletA);
|
|
Button bWalletB = findViewById(R.id.walletB);
|
|
|
|
bWalletA.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View view) {
|
|
launchWalletPresenterActivity(0);
|
|
}
|
|
});
|
|
bWalletB.setOnClickListener(new View.OnClickListener() {
|
|
public void onClick(View view) {
|
|
launchWalletPresenterActivity(1);
|
|
}
|
|
});
|
|
}
|
|
|
|
public void launchWalletPresenterActivity(int idWallet) {
|
|
if (idWallet == 0) {
|
|
Intent demoWalletIntent = new Intent(DemoActivity.this, WalletPresenterActivity.class);
|
|
demoWalletIntent.putExtra("WALLET_ADDRESS",WALLET_A);
|
|
DemoActivity.this.startActivity(demoWalletIntent);
|
|
} else {
|
|
Intent demoWalletIntent = new Intent(DemoActivity.this, WalletPresenterActivity.class);
|
|
demoWalletIntent.putExtra("WALLET_ADDRESS","WALLET B");
|
|
DemoActivity.this.startActivity(demoWalletIntent);
|
|
}
|
|
}
|
|
}
|