- Now the seed import creates the bitshares account associated

- The balance view is more readable
This commit is contained in:
Javier Varona 2017-10-22 14:17:09 -04:00
parent 811d0d24a3
commit 4434ad40a5
11 changed files with 814 additions and 21 deletions

View file

@ -1,5 +1,6 @@
package cy.agorise.crystalwallet.activities;
import android.app.Activity;
import android.arch.lifecycle.ViewModelProviders;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
@ -13,11 +14,18 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.OnTextChanged;
import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.enums.CryptoNet;
import cy.agorise.crystalwallet.enums.SeedType;
import cy.agorise.crystalwallet.models.AccountSeed;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
import cy.agorise.crystalwallet.models.GrapheneAccount;
import cy.agorise.crystalwallet.models.GrapheneAccountInfo;
import cy.agorise.crystalwallet.viewmodels.AccountSeedViewModel;
import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountViewModel;
import cy.agorise.crystalwallet.viewmodels.validators.ImportSeedValidator;
import cy.agorise.crystalwallet.viewmodels.validators.UIValidatorListener;
import cy.agorise.crystalwallet.viewmodels.validators.ValidationField;
import cy.agorise.crystalwallet.views.CryptoNetBalanceListView;
public class ImportSeedActivity extends AppCompatActivity implements UIValidatorListener {
@ -36,6 +44,8 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
@BindView(R.id.etSeedWords)
EditText etSeedWords;
@BindView(R.id.tvSeedWordsError)
TextView tvSeedWordsError;
@BindView (R.id.etAccountName)
EditText etAccountName;
@ -45,6 +55,9 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
@BindView(R.id.btnImport)
Button btnImport;
@BindView(R.id.btnCancel)
Button btnCancel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -70,41 +83,74 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
this.importSeedValidator.validate();
}
@OnTextChanged(value = R.id.etSeedWords,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterSeedWordsChanged(Editable editable) {
this.importSeedValidator.validate();
}
@OnTextChanged(value = R.id.etAccountName,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterAccountNameChanged(Editable editable) {
this.importSeedValidator.validate();
}
@OnClick(R.id.btnCancel)
public void cancel(){
this.finish();
}
@OnClick(R.id.btnImport)
public void importSeed(){
if (this.importSeedValidator.isValid()) {
AccountSeed seed = new AccountSeed();
//TODO verify if PIN and PIN confirmation are not null and are the same
//TODO verify if words are already in the db
//TODO check if name has been asigned to other seed
seed.setMasterSeed(etSeedWords.getText().toString());
seed.setName(etAccountName.getText().toString());
seed.setType(SeedType.BRAINKEY);
accountSeedViewModel.addSeed(seed);
//TODO get back to the previous activity
CryptoNetAccountViewModel cryptoNetAccountViewModel = ViewModelProviders.of(this).get(CryptoNetAccountViewModel.class);
CryptoNetAccount cryptoNetAccount = new CryptoNetAccount();
cryptoNetAccount.setSeedId(seed.getId());
cryptoNetAccount.setAccountIndex(0);
cryptoNetAccount.setCryptoNet(cy.agorise.crystalwallet.enums.CryptoNet.BITSHARES);
cryptoNetAccountViewModel.addCryptoNetAccount(cryptoNetAccount);
GrapheneAccountInfo grapheneAccountInfo = new GrapheneAccountInfo(cryptoNetAccount.getId());
this.finish();
}
}
@Override
public void onValidationSucceeded(ValidationField field) {
if (field.getView() == etPin) {
tvPinError.setText("");
} else if (field.getView() == etPinConfirmation){
tvPinConfirmationError.setText("");
} else if (field.getView() == etAccountName){
tvAccountNameError.setText("");
}
public void onValidationSucceeded(final ValidationField field) {
final ImportSeedActivity activity = this;
if (this.importSeedValidator.isValid()){
btnImport.setEnabled(true);
}
activity.runOnUiThread(new Runnable() {
public void run() {
if (field.getView() == etPin) {
tvPinError.setText("");
} else if (field.getView() == etPinConfirmation){
tvPinConfirmationError.setText("");
} else if (field.getView() == etAccountName){
tvAccountNameError.setText("");
} else if (field.getView() == etSeedWords){
tvSeedWordsError.setText("");
}
if (activity.importSeedValidator.isValid()){
btnImport.setEnabled(true);
} else {
btnImport.setEnabled(false);
}
}
});
}
@Override
@ -115,6 +161,8 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
tvPinConfirmationError.setText(field.getMessage());
} else if (field.getView() == etAccountName){
tvAccountNameError.setText(field.getMessage());
} else if (field.getView() == etSeedWords){
tvSeedWordsError.setText(field.getMessage());
}
}
}

View file

@ -21,7 +21,7 @@ import cy.agorise.crystalwallet.models.CryptoNetBalance;
public interface CryptoNetAccountDao {
@Query("SELECT * FROM crypto_net_account")
List<CryptoNetAccount> getAll();
LiveData<List<CryptoNetAccount>> getAll();
@Query("SELECT * FROM crypto_net_account WHERE id = :accountId")
LiveData<CryptoNetAccount> getById( long accountId);
@ -31,5 +31,4 @@ public interface CryptoNetAccountDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
public long[] insertCryptoNetAccount(CryptoNetAccount... accounts);
}

View file

@ -55,7 +55,7 @@ public class BalanceFragment extends Fragment {
vCryptoNetBalanceListView.setData(null, this);
final Fragment fragment = this;
cryptoNetBalanceData.observe(this, new Observer<List<CryptoNetBalance>>() {
@Override
public void onChanged(List<CryptoNetBalance> cryptoNetBalances) {

View file

@ -2,15 +2,22 @@ package cy.agorise.crystalwallet.service;
import android.app.Service;
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.Observer;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.support.annotation.Nullable;
import android.util.Log;
import java.util.List;
import cy.agorise.crystalwallet.cryptonetinforequests.CryptoNetInfoRequests;
import cy.agorise.crystalwallet.dao.CrystalDatabase;
import cy.agorise.crystalwallet.manager.BitsharesAccountManager;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
/**
* Created by Henry Varona on 3/10/2017.
@ -43,17 +50,32 @@ public class CrystalWalletService extends Service {
}
public void loadAccountTransactions(){
this.keepLoadingAccountTransactions = true;
/*this.keepLoadingAccountTransactions = true;
final CrystalWalletService thisService = this;
while(this.keepLoadingAccountTransactions){
CrystalDatabase db = CrystalDatabase.getAppDatabase(this);
final LiveData<List<CryptoNetAccount>> cryptoNetAccountList = db.cryptoNetAccountDao().getAll();
cryptoNetAccountList.observe(this, new Observer<List<CryptoNetAccount>>() {
@Override
public void onChanged(@Nullable List<CryptoNetAccount> cryptoNetAccounts) {
for(CryptoNetAccount nextAccount : cryptoNetAccountList.getValue()) {
bitsharesAccountManager.loadAccountFromDB(nextAccount,thisService);
}
}
});*/
/*while(this.keepLoadingAccountTransactions){
try{
Log.i("Crystal Service","Searching for transactions...");
this.bitsharesAccountManager.loadAccountFromDB();
Thread.sleep(60000);//Sleep for 1 minutes
// TODO search for accounts and make managers find new transactions
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}*/
}
@Override

View file

@ -34,7 +34,8 @@ public class AccountSeedViewModel extends AndroidViewModel {
}
public void addSeed(AccountSeed seed){
this.db.accountSeedDao().insertAccountSeed(seed);
long newId = this.db.accountSeedDao().insertAccountSeed(seed);
seed.setId(newId);
}
public LiveData<AccountSeed> getAccountSeed(){

View file

@ -0,0 +1,40 @@
package cy.agorise.crystalwallet.viewmodels;
import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LiveData;
import java.util.List;
import cy.agorise.crystalwallet.dao.CrystalDatabase;
import cy.agorise.crystalwallet.models.AccountSeed;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
/**
* Created by Henry Varona on 21/10/2017.
*/
public class CryptoNetAccountViewModel extends AndroidViewModel {
private LiveData<CryptoNetAccount> cryptoNetAccount;
private CrystalDatabase db;
public CryptoNetAccountViewModel(Application application) {
super(application);
this.db = CrystalDatabase.getAppDatabase(application.getApplicationContext());
}
public void loadCryptoNetAccount(int accountId){
this.cryptoNetAccount = this.db.cryptoNetAccountDao().getById(accountId);
}
public void addCryptoNetAccount(CryptoNetAccount account){
long newId = this.db.cryptoNetAccountDao().insertCryptoNetAccount(account)[0];
account.setId(newId);
}
public LiveData<CryptoNetAccount> getCryptoNetAccount(){
return this.cryptoNetAccount;
}
}

View file

@ -0,0 +1,40 @@
package cy.agorise.crystalwallet.viewmodels;
import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LiveData;
import cy.agorise.crystalwallet.dao.CrystalDatabase;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
import cy.agorise.crystalwallet.models.GrapheneAccount;
import cy.agorise.crystalwallet.models.GrapheneAccountInfo;
/**
* Created by Henry Varona on 21/10/2017.
*/
public class GrapheneAccountInfoViewModel extends AndroidViewModel {
private LiveData<GrapheneAccountInfo> grapheneAccountInfo;
private CrystalDatabase db;
public GrapheneAccountInfoViewModel(Application application) {
super(application);
this.db = CrystalDatabase.getAppDatabase(application.getApplicationContext());
}
public void loadGrapheneAccountInfo(int accountId){
this.grapheneAccountInfo = this.db.grapheneAccountInfoDao().getGrapheneAccountInfo(accountId);
}
public void addGrapheneAccountInfo(GrapheneAccountInfo account){
this.db.cryptoNetAccountDao().insertCryptoNetAccount();
this.db.grapheneAccountInfoDao().insertGrapheneAccountInfo(account);
}
public LiveData<GrapheneAccountInfo> getGrapheneAccountInfo(){
return this.grapheneAccountInfo;
}
}

View file

@ -15,6 +15,7 @@
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/cryptoNetBalanceTitleBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
@ -32,10 +33,12 @@
android:ems="10"
android:text="unknown coin" />
</LinearLayout>
<cy.agorise.crystalwallet.views.CryptoCoinBalanceListView
android:id="@+id/cryptoCoinBalancesListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cryptoCoinBalancesListView">
android:layout_below="@+id/cryptoNetBalanceTitleBarLayout">
</cy.agorise.crystalwallet.views.CryptoCoinBalanceListView>

View file

@ -25,6 +25,7 @@
android:id="@+id/tvCryptoCoinBalanceAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:ems="10"
android:text="0.00000000" />
</RelativeLayout>

View file

@ -93,6 +93,16 @@
android:inputType="textMultiLine"
android:textColor="@color/black" />
<TextView
android:id="@+id/tvSeedWordsError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="10dp"
android:textColor="@color/red"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -0,0 +1,629 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60sp"
android:background="#0099D5"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:visibility="gone">
<Button
android:layout_width="30sp"
android:layout_height="30sp"
android:layout_gravity="center"
android:background="@drawable/righticon"
android:onClick="backbutton" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/logoicon" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">
<LinearLayout
android:id="@+id/FirstChild"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5sp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="10">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/from_capital"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" :"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40sp"
android:orientation="horizontal"
android:weightSum="5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/rl_webviewFrom"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_alignParentLeft="true"
android:background="@drawable/rounded_corners">
<WebView
android:id="@+id/webviewFrom"
android:layout_width="34sp"
android:layout_height="34sp"
android:layout_centerInParent="true"
android:gravity="center" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5sp"
android:layout_marginRight="5sp"
android:layout_toRightOf="@+id/rl_webviewFrom"
android:background="@drawable/edittext_background_layer"
android:orientation="vertical">
<Spinner
android:id="@+id/spinnerFrom"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#000"
android:textSize="15sp"
android:visibility="gone"></Spinner>
<TextView
android:id="@+id/tvFrom"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left|center"
android:paddingLeft="10dp"
android:textColor="#000"
android:textSize="16sp"
android:visibility="gone" />
<!--<View android:layout_width="wrap_content"-->
<!--android:layout_height="2dp"-->
<!--android:background="@drawable/edittext_background_layer">-->
<!--</View>-->
</LinearLayout>
</RelativeLayout>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:background="@null" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/SecChild"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/FirstChild"
android:layout_marginTop="5sp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="10">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/to_capital"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=":"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40sp"
android:orientation="horizontal"
android:weightSum="5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/rl_webviewTo"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_alignParentLeft="true"
android:background="@drawable/rounded_corners">
<WebView
android:id="@+id/webviewTo"
android:layout_width="34sp"
android:layout_height="34sp"
android:layout_centerInParent="true"
android:gravity="center" />
</RelativeLayout>
<EditText
android:id="@+id/etReceiverAccount"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5sp"
android:layout_marginRight="5sp"
android:layout_toLeftOf="@+id/contactActivity"
android:layout_toRightOf="@+id/rl_webviewTo"
android:background="@drawable/edittext_background_layer"
android:maxLines="1"
android:paddingLeft="10dp"
android:textColor="#000"
android:textSize="16sp" />
<RelativeLayout
android:id="@+id/contactActivity"
android:layout_width="50sp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<ImageButton
android:id="@+id/contactButton"
android:layout_width="25dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/share_group" />
</RelativeLayout>
</RelativeLayout>
<ImageButton
android:id="@+id/scanning"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:background="@null"
android:src="@drawable/photo_icon" />
</LinearLayout>
<TextView
android:id="@+id/tvErrorRecieverAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:text=""
android:textColor="@android:color/holo_red_dark"
android:textSize="15sp"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ThirdChild"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/SecChild"
android:layout_marginTop="5sp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/amount"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=":"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer"
android:orientation="horizontal"
android:weightSum="1">
<EditText
android:id="@+id/etAmount"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="@null"
android:gravity="center|end"
android:inputType="numberDecimal"
android:maxLines="1"
android:paddingRight="5dp"
android:singleLine="true"
android:text=""
android:textColor="@color/blackColor" />
<Spinner
android:id="@+id/spAssets"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:dropDownWidth="wrap_content"></Spinner>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvAmountStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ThirdChild"
android:gravity="right"
android:text=""
android:textSize="15sp" />
<LinearLayout
android:id="@+id/llLoyalty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tvAmountStatus"
android:layout_marginTop="5sp"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loyalty_points"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=":"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer"
android:orientation="horizontal"
android:weightSum="4">
<EditText
android:id="@+id/etLoyalty"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:layout_weight="3"
android:background="@null"
android:gravity="center|right"
android:inputType="numberDecimal"
android:maxLines="1"
android:paddingRight="5dp"
android:singleLine="true"
android:text="" />
<TextView
android:id="@+id/tvLoyalty"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="17sp" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/tvLoyaltyStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/llLoyalty"
android:gravity="right"
android:text="nn FABLES is available"
android:textColor="@android:color/holo_red_dark"
android:textSize="15sp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/llBackupAsset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tvLoyaltyStatus"
android:layout_marginTop="5sp"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/backup_asset"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=":"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer"
android:orientation="horizontal"
android:weightSum="4">
<EditText
android:id="@+id/etBackupAsset"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:layout_weight="3"
android:background="@null"
android:gravity="center|right"
android:inputType="numberDecimal"
android:maxLines="1"
android:paddingRight="5dp"
android:text="" />
<TextView
android:id="@+id/tvBackupAsset"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="BTS"
android:textSize="17sp" />
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/tvBackupAssetBalanceValidate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text=""
android:textSize="15dp" />
</LinearLayout>
<TextView
android:id="@+id/StatusThree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/llBackupAsset"
android:gravity="right"
android:text="nn OBITS is available"
android:textColor="@android:color/holo_red_dark"
android:textSize="15sp"
android:visibility="gone" />
<TextView
android:id="@+id/tvTotalStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/StatusThree"
android:gravity="center"
android:text="(nn BTS + n.nn OBITS = nnnn BTS )"
android:textColor="#000"
android:textSize="15sp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/llMemo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tvTotalStatus"
android:layout_marginTop="5sp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/memo_capital"
android:textColor="#00060A"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text=":"
android:textColor="#00060A"
android:textSize="15sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:background="@drawable/edittext_background_layer">
<EditText
android:id="@+id/etMemo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:gravity="left"
android:text=""
android:textSize="15sp"
/>
</RelativeLayout>
</LinearLayout>
<CheckBox
android:id="@+id/cbAlwaysDonate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/llMemo"
android:layout_marginBottom="10dp"
android:layout_marginTop="20dp"
android:text="@string/checkbox_donate" />
<Button
android:id="@+id/btnSend"
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:weightSum="4"
android:background="@drawable/send_button_background"
android:gravity="center"
android:text="@string/send_capital"
android:drawableRight="@drawable/ic_send_button"
android:paddingLeft="40dp"
android:textColor="#fff"
android:textSize="17sp"
android:textStyle="bold"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:paddingEnd="100dp"
android:drawablePadding="-60dp"
android:layout_below="@id/cbAlwaysDonate"
android:enabled="false">
</Button>
</RelativeLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@color/bottomBarColor"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/tvAppVersion_send_screen_activity"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/v_1_0_beta" />
<TextView
android:id="@+id/tvBlockNumberHead_send_screen_activity"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:text="@string/block_number" />
<ImageView
android:id="@+id/ivSocketConnected_send_screen_activity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.5" />
<ImageView
android:id="@+id/OnClickSettings_send_screen_activity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.5"
android:src="@drawable/icon_setting"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>