Merge pull request #5 from sjaramillo10/master

Add latest style changes I did on January
This commit is contained in:
Severiano Jaramillo Quintanar 2018-03-13 15:58:40 -06:00 committed by GitHub
commit 32a3f306af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1038 additions and 669 deletions

View file

@ -13,28 +13,38 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".activities.IntroActivity">
<activity android:name=".activities.IntroActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.BoardActivity"
android:theme="@style/AppTheme.NoActionBar"> <!-- Dirty trick to avoid toolbar error on balance -->
<activity android:name=".activities.BoardActivity"
android:theme="@style/AppTheme.NoActionBar" >
</activity>
<activity android:name=".activities.AccountSeedsManagementActivity" >
</activity>
<activity android:name=".activities.ImportSeedActivity" >
</activity>
<activity android:name=".activities.CreateSeedActivity" >
</activity>
<activity android:name=".activities.SendTransactionActivity" >
</activity>
<activity android:name=".activities.GeneralSettingsActivity" >
</activity>
<activity android:name=".activities.CryptoCoinTransactionReceiptActivity" >
</activity>
<activity android:name=".activities.BackupSeedActivity" >
</activity>
<activity android:name=".activities.PinRequestActivity">
</activity>
<activity android:name=".activities.AccountSeedsManagementActivity"></activity>
<activity android:name=".activities.ImportSeedActivity"></activity>
<activity android:name=".activities.CreateSeedActivity"></activity>
<activity android:name=".activities.SendTransactionActivity"></activity>
<activity android:name=".activities.GeneralSettingsActivity"></activity>
<activity android:name=".activities.CryptoCoinTransactionReceiptActivity"></activity>
<activity android:name=".activities.BackupSeedActivity"></activity>
<activity android:name=".activities.PinRequestActivity"></activity>
<activity
android:name=".activities.SettingsActivity"
android:theme="@style/AppTheme.NoActionBar"></activity>
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan">
</activity>
<activity
android:name=".activities.AccountsActivity"
android:parentActivityName=".activities.BoardActivity"

View file

@ -3,6 +3,8 @@ package cy.agorise.crystalwallet.activities;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
@ -39,23 +41,26 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
AccountSeedViewModel accountSeedViewModel;
CreateSeedValidator createSeedValidator;
@BindView(R.id.etPin)
EditText etPin;
@BindView(R.id.tvPinError)
TextView tvPinError;
@BindView(R.id.tilPin)
TextInputLayout tilPin;
@BindView(R.id.etPinConfirmation)
EditText etPinConfirmation;
@BindView(R.id.tvPinConfirmationError)
TextView tvPinConfirmationError;
@BindView(R.id.tietPin)
TextInputEditText tietPin;
@BindView(R.id.tilPinConfirmation)
TextInputLayout tilPinConfirmation;
@BindView(R.id.tietPinConfirmation)
TextInputEditText tietPinConfirmation;
//@BindView(R.id.tvSeedWords)
//TextView tvSeedWords;
@BindView (R.id.etAccountName)
EditText etAccountName;
@BindView(R.id.tvAccountNameError)
TextView tvAccountNameError;
@BindView(R.id.tilAccountName)
TextInputLayout tilAccountName;
@BindView (R.id.tietAccountName)
TextInputEditText tietAccountName;
@BindView(R.id.btnCreate)
Button btnCreate;
@ -69,19 +74,23 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
setContentView(R.layout.create_seed);
ButterKnife.bind(this);
tilPin.setErrorEnabled(true);
tilPinConfirmation.setErrorEnabled(true);
tilAccountName.setErrorEnabled(true);
btnCreate.setEnabled(false);
accountSeedViewModel = ViewModelProviders.of(this).get(AccountSeedViewModel.class);
createSeedValidator = new CreateSeedValidator(this.getApplicationContext(),etPin,etPinConfirmation,etAccountName);
createSeedValidator = new CreateSeedValidator(this.getApplicationContext(),tietPin,tietPinConfirmation,tietAccountName);
createSeedValidator.setListener(this);
}
@OnTextChanged(value = R.id.etPin,
@OnTextChanged(value = R.id.tietPin,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterPinChanged(Editable editable) {
this.createSeedValidator.validate();
}
@OnTextChanged(value = R.id.etPinConfirmation,
@OnTextChanged(value = R.id.tietPinConfirmation,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterPinConfirmationChanged(Editable editable) {
this.createSeedValidator.validate();
@ -94,7 +103,7 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
}
*/
@OnTextChanged(value = R.id.etAccountName,
@OnTextChanged(value = R.id.tietAccountName,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterAccountNameChanged(Editable editable) {
this.createSeedValidator.validate();
@ -110,7 +119,7 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
if (this.createSeedValidator.isValid()) {
// Make request to create a bitshare account
final ValidateCreateBitsharesAccountRequest request =
new ValidateCreateBitsharesAccountRequest(etAccountName.getText().toString(), getApplicationContext());
new ValidateCreateBitsharesAccountRequest(tietAccountName.getText().toString(), getApplicationContext());
//Makes dialog to tell the user that the account is been created
@ -168,12 +177,12 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
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("");
if (field.getView() == tietPin) {
tilPin.setError("");
} else if (field.getView() == tietPinConfirmation){
tilPinConfirmation.setError("");
} else if (field.getView() == tietAccountName){
tilAccountName.setError("");
} //else if (field.getView() == etSeedWords){
// tvSeedWordsError.setText("");
//}
@ -194,12 +203,12 @@ public class CreateSeedActivity extends AppCompatActivity implements UIValidator
@Override
public void run() {
if (field.getView() == etPin) {
tvPinError.setText(field.getMessage());
} else if (field.getView() == etPinConfirmation){
tvPinConfirmationError.setText(field.getMessage());
} else if (field.getView() == etAccountName){
tvAccountNameError.setText(field.getMessage());
if (field.getView() == tietPin) {
tilPin.setError(field.getMessage());
} else if (field.getView() == tietPinConfirmation){
tilPinConfirmation.setError(field.getMessage());
} else if (field.getView() == tietAccountName){
tilAccountName.setError(field.getMessage());
} //else if (field.getView() == etSeedWords){
// tvSeedWordsError.setText(field.getMessage());
//}

View file

@ -2,10 +2,33 @@ package cy.agorise.crystalwallet.activities;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.widget.Button;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.dao.CrystalDatabase;
import cy.agorise.crystalwallet.fragments.ImportAccountOptionsFragment;
import cy.agorise.crystalwallet.models.AccountSeed;
import cy.agorise.crystalwallet.models.CryptoCoinBalance;
import cy.agorise.crystalwallet.models.CryptoCoinTransaction;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
import cy.agorise.crystalwallet.randomdatagenerators.RandomCryptoCoinBalanceGenerator;
import cy.agorise.crystalwallet.randomdatagenerators.RandomCryptoNetAccountGenerator;
import cy.agorise.crystalwallet.randomdatagenerators.RandomSeedGenerator;
import cy.agorise.crystalwallet.randomdatagenerators.RandomTransactionsGenerator;
import cy.agorise.crystalwallet.application.CrystalSecurityMonitor;
import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel;
import cy.agorise.crystalwallet.viewmodels.TransactionListViewModel;
@ -16,29 +39,61 @@ public class IntroActivity extends AppCompatActivity {
TransactionListViewModel transactionListViewModel;
TransactionListView transactionListView;
@BindView(R.id.surface_view)
public SurfaceView mSurfaceView;
@BindView(R.id.btnCreateAccount)
public Button btnCreateAccount;
@BindView(R.id.btnImportAccount)
public Button btnImportAccount;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_intro);
ButterKnife.bind(this);
// Appbar animation
mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
@Override
public void surfaceCreated(SurfaceHolder surfaceHolder) {
//Log.d(TAG,"surfaceCreated");
MediaPlayer mediaPlayer = MediaPlayer.create(IntroActivity.this, R.raw.appbar_background);
mediaPlayer.setDisplay(mSurfaceView.getHolder());
mediaPlayer.setLooping(true);
mediaPlayer.start();
}
@Override
public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
//Log.d(TAG,"surfaceChanged");
}
@Override
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
//Log.d(TAG,"surfaceDestroyed");
}
});
this.getApplication().registerActivityLifecycleCallbacks(new CrystalSecurityMonitor(this));
//Checks if the user has any seed created
AccountSeedListViewModel accountSeedListViewModel = ViewModelProviders.of(this).get(AccountSeedListViewModel.class);
/*AccountSeedListViewModel accountSeedListViewModel = ViewModelProviders.of(this).get(AccountSeedListViewModel.class);
if (accountSeedListViewModel.accountSeedsCount() == 0){
//If the user doesn't have any seeds created, then
//send the user to create/import an account
//Intent intent = new Intent(this, AccountSeedsManagementActivity.class);
//Intent intent = new Intent(this, ImportSeedActivity.class);
Intent intent = new Intent(this, CreateSeedActivity.class);
startActivity(intent);
//Intent intent = new Intent(this, CreateSeedActivity.class);
//startActivity(intent);
} else {
//Intent intent = new Intent(this, CreateSeedActivity.class);
Intent intent = new Intent(this, BoardActivity.class);
startActivity(intent);
}
}*/
/*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext());
List<AccountSeed> seeds = RandomSeedGenerator.generateSeeds(2);
@ -75,4 +130,24 @@ public class IntroActivity extends AppCompatActivity {
}
});*/
}
@OnClick(R.id.btnCreateAccount)
public void createAccount() {
Intent intent = new Intent(this, CreateSeedActivity.class);
startActivity(intent);
}
@OnClick(R.id.btnImportAccount)
public void importAccount() {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag("importAccountOptions");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
// Create and show the dialog.
ImportAccountOptionsFragment newFragment = ImportAccountOptionsFragment.newInstance();
newFragment.show(ft, "importAccountOptions");
}
}

View file

@ -84,11 +84,6 @@ public class SettingsActivity extends AppCompatActivity{
mPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mPager));
// Automatically get build version from app information
String buildVersion = "v";
buildVersion += BuildConfig.VERSION_NAME;
tvBuildVersion.setText(buildVersion);
}
private class SettingsPagerAdapter extends FragmentStatePagerAdapter {

View file

@ -0,0 +1,72 @@
package cy.agorise.crystalwallet.fragments;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/25/18.
* Shows a dialog where the user can select how to import his/her existing account
*/
public class ImportAccountOptionsFragment extends DialogFragment {
@BindView(R.id.btnCancel)
Button btnClose;
public ImportAccountOptionsFragment() {
// Required empty public constructor
}
public static ImportAccountOptionsFragment newInstance() {
ImportAccountOptionsFragment fragment = new ImportAccountOptionsFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.fragment_import_account_options, null);
ButterKnife.bind(this, view);
return builder.setView(view).create();
}
@Override
public void onResume() {
super.onResume();
// Force dialog fragment to use the full width of the screen
Window dialogWindow = getDialog().getWindow();
assert dialogWindow != null;
dialogWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@OnClick(R.id.btnCancel)
public void cancel() {
dismiss();
}
}

View file

@ -0,0 +1,56 @@
package cy.agorise.crystalwallet.util;
import android.content.Context;
import android.support.constraint.ConstraintLayout;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.BuildConfig;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/24/18.
* Status bar that shows the app version, block number and connection status
*/
public class BottomStatusBar extends ConstraintLayout{
@BindView(R.id.tvBuildVersion)
TextView tvBuildVersion;
@BindView(R.id.tvBlockNumber)
TextView tvBlockNumber;
@BindView(R.id.ivSocketConnected)
ImageView ivSocketConnected;
public BottomStatusBar(Context context) {
super(context);
init();
}
public BottomStatusBar(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
private void init() {
LayoutInflater inflater = LayoutInflater.from(getContext());
inflater.inflate(R.layout.bottom_status_bar, this);
ButterKnife.bind(this);
// Automatically get build version from app information
String buildVersion = "v";
buildVersion += BuildConfig.VERSION_NAME;
tvBuildVersion.setText(buildVersion);
// TODO update block number
// TODO update socket connection status
}
}

View file

@ -0,0 +1,33 @@
package cy.agorise.crystalwallet.util;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
/**
* Created by xd on 1/24/18.
* ImageView which adjusts its size to always create a square
*/
public class SquaredImageView extends AppCompatImageView {
public SquaredImageView(Context context) {
super(context);
}
public SquaredImageView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public SquaredImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int size = Math.min(getMeasuredWidth(), getMeasuredHeight());
setMeasuredDimension(size, size);
}
}

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_intro"
@ -17,3 +18,108 @@
</cy.agorise.crystalwallet.views.TransactionListView>
</RelativeLayout>
-->
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_intro"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
tools:context="cy.agorise.crystalwallet.activities.IntroActivity">
<SurfaceView
android:id="@+id/surface_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="2:1.2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/colorPrimaryTransparent"
app:layout_constraintTop_toTopOf="@id/surface_view"
app:layout_constraintStart_toStartOf="@id/surface_view"
app:layout_constraintEnd_toEndOf="@id/surface_view"
app:layout_constraintBottom_toBottomOf="@id/surface_view"/>
<ImageView
android:id="@+id/ivLogo"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:contentDescription="@string/crystal_logo"
android:src="@drawable/crystal_logo"
tools:layout_editor_absoluteY="114dp"
app:layout_constraintTop_toTopOf="@id/surface_view"
app:layout_constraintBottom_toBottomOf="@id/surface_view"/>
<TextView
android:id="@+id/tvNewUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:text="@string/new_user"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/btnCreateAccount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_bias="0.4"
app:layout_constraintTop_toBottomOf="@id/surface_view"
app:layout_constraintVertical_chainStyle="packed" />
<Button
android:id="@+id/btnCreateAccount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:background="@color/colorPrimaryDark"
android:text="@string/create_account"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/tvExistingUser"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvNewUser" />
<TextView
android:id="@+id/tvExistingUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:text="@string/existing_user"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/btnImportAccount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnCreateAccount" />
<Button
android:id="@+id/btnImportAccount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:background="@color/colorPrimaryDark"
android:text="@string/import_account"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvExistingUser" />
</android.support.constraint.ConstraintLayout>

View file

@ -125,47 +125,13 @@
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/clBottomBanner"/>
android:layout_above="@id/bottomStatusBar"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/clBottomBanner"
<cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:background="@color/gray">
<TextView
android:id="@+id/tvBuildVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/version_placeholder"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/block_number_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:src="@drawable/icon_connecting"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
android:layout_alignParentBottom="true"/>
</RelativeLayout>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/bottomBarColor">
<TextView
android:id="@+id/tvBuildVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/version_placeholder"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvBlockNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/block_number_placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivSocketConnected"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:src="@drawable/icon_connecting"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:contentDescription="@string/connection_status" />
</android.support.constraint.ConstraintLayout>

View file

@ -1,108 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="@dimen/activity_vertical_margin">
tools:context=".activities.CreateSeedActivity">
<TextView
android:id="@+id/tvPin"
<android.support.design.widget.TextInputLayout
android:id="@+id/tilPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
app:layout_constraintBottom_toTopOf="@+id/tilPinConfirmation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintVertical_bias="0.1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed">
<android.support.design.widget.TextInputEditText
android:id="@+id/tietPin"
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:text="@string/txt_6_digits_pin"
android:textStyle="bold" />
<EditText
android:id="@+id/etPin"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="@drawable/edittext_bg"
android:hint="@string/txt_6_digits_pin"
android:inputType="number"
android:maxLines="1"
android:textColor="@color/black" />
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<TextView
android:id="@+id/tvPinError"
<android.support.design.widget.TextInputLayout
android:id="@+id/tilPinConfirmation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toTopOf="@+id/tilAccountName"
app:layout_constraintTop_toBottomOf="@+id/tilPin"
app:layout_constraintStart_toStartOf="@id/tilPin"
app:layout_constraintEnd_toEndOf="@id/tilPin">
<android.support.design.widget.TextInputEditText
android:id="@+id/tietPinConfirmation"
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:id="@+id/tvPinConfirmation"
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:text="@string/txt_6_digits_pin_confirm"
android:textStyle="bold" />
<EditText
android:id="@+id/etPinConfirmation"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="@drawable/edittext_bg"
android:hint="@string/txt_6_digits_pin_confirm"
android:inputType="number"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black" />
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/tilAccountName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toTopOf="@+id/btnCancel"
app:layout_constraintTop_toBottomOf="@+id/tilPinConfirmation"
app:layout_constraintStart_toStartOf="@id/tilPinConfirmation"
app:layout_constraintEnd_toEndOf="@id/tilPinConfirmation">
<TextView
android:id="@+id/tvPinConfirmationError"
<android.support.design.widget.TextInputEditText
android:id="@+id/tietAccountName"
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"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="10dp"
android:text="@string/txt_account_name"
android:textStyle="bold" />
<EditText
android:id="@+id/etAccountName"
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:background="@drawable/edittext_bg"
android:gravity="top"
android:hint="@string/txt_account_name"
android:inputType="textMultiLine"
android:textColor="@color/black" />
<TextView
android:id="@+id/tvAccountNameError"
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" />
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<!--
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -111,58 +76,44 @@
android:layout_marginTop="10dp"
android:text="@string/txt_brain_key_info"
android:textSize="15dp"
android:visibility="gone" />
<LinearLayout
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:gravity="center"
android:orientation="horizontal">
android:visibility="gone" /> -->
<Button
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:background="@color/pink"
android:layout_marginStart="24dp"
android:layout_marginTop="48dp"
android:background="@color/redcolor"
android:text="@string/cancel"
android:textColor="@color/white" />
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/bottomStatusBar"
app:layout_constraintStart_toStartOf="@id/tilAccountName"
app:layout_constraintTop_toBottomOf="@+id/tilAccountName" />
<Button
android:id="@+id/btnCreate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:background="@color/green"
android:layout_marginEnd="24dp"
android:background="@color/colorPrimary"
android:padding="10dp"
android:text="@string/create_wallet"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="bottom"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"></LinearLayout>
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@id/tilAccountName"
app:layout_constraintTop_toTopOf="@id/btnCancel" />
<!--
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/bottomBarColor"
android:gravity="bottom"
android:orientation="horizontal">
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:id="@+id/tvAppVersion_brain_key_activity"
@ -195,6 +146,10 @@
android:src="@drawable/icon_setting"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
-->
<cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp">
<TextView
android:id="@+id/tvDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/import_account_options_description"
android:textSize="18sp"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnImportBackup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:background="@color/colorPrimary"
android:text="@string/import_account_backup"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/tvDescription"
app:layout_constraintStart_toStartOf="@id/tvDescription"
app:layout_constraintEnd_toEndOf="@id/tvDescription"/>
<Button
android:id="@+id/btnImportSeed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@color/colorPrimary"
android:text="@string/import_account_seed"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/btnImportBackup"
app:layout_constraintStart_toStartOf="@id/btnImportBackup"
app:layout_constraintEnd_toEndOf="@id/btnImportBackup"/>
<Button
android:id="@+id/btnCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@color/redcolor"
android:text="@string/dialog_cancel"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/btnImportSeed"
app:layout_constraintStart_toStartOf="@id/btnImportSeed"
app:layout_constraintEnd_toEndOf="@id/btnImportSeed"/>
</android.support.constraint.ConstraintLayout>

View file

@ -99,7 +99,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/user_name_password_placeholder"
tools:layout_editor_absoluteY="8dp"
app:layout_constraintTop_toBottomOf="@id/tvPocketSecurity"
app:layout_constraintStart_toStartOf="@id/tvPocketSecurity"/>

View file

@ -1,14 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="@dimen/activity_vertical_margin">
tools:context=".activities.ImportSeedActivity">
<!--
<android.support.design.widget.TextInputLayout
android:id="@+id/tilPin"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/tietPin"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.TextInputLayout>
-->
<TextView
android:id="@+id/tvPin"
android:layout_width="match_parent"
@ -175,56 +185,9 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="bottom"
android:orientation="vertical">
<LinearLayout
<cy.agorise.crystalwallet.util.BottomStatusBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/bottomBarColor"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/tvAppVersion_brain_key_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_brain_key_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_brain_key_activity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.5" />
<ImageView
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="invisible" />
</LinearLayout>
</LinearLayout>
android:layout_gravity="bottom"/>
</LinearLayout>

View file

@ -1,9 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp">
<View
android:id="@+id/topView"
@ -64,8 +69,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="24dp"
android:inputType="textMultiLine"
android:textColor="@color/white"
android:inputType="numberDecimal"
android:textSize="20sp"
android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent"
@ -111,10 +115,10 @@
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset" />
<ImageView
<cy.agorise.crystalwallet.util.SquaredImageView
android:id="@+id/ivQrCode"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
@ -123,32 +127,32 @@
android:src="@color/gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
app:layout_constraintTop_toBottomOf="@+id/tvAmountError"/>
<TextView
android:id="@+id/tvShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/share_this_qr"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivQrCode" />
app:layout_constraintTop_toBottomOf="@id/ivQrCode"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/tvCancel"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:text="@string/close"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="@id/tvShare"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</ScrollView>

View file

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp">
<View
android:id="@+id/topView"
android:layout_width="match_parent"
@ -66,8 +71,7 @@
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:gravity="top"
android:inputType="textMultiLine"
android:textColor="@color/white"
android:inputType="text"
android:textSize="20sp"
android:hint="@string/to_capital"
app:layout_constraintEnd_toEndOf="parent"
@ -82,7 +86,8 @@
app:srcCompat="@drawable/ic_people"
android:layout_marginBottom="15dp"
app:layout_constraintEnd_toEndOf="@id/etTo"
app:layout_constraintBottom_toBottomOf="@id/etTo"/>
app:layout_constraintBottom_toBottomOf="@id/etTo"
android:contentDescription="@string/people_icon" />
<TextView
android:id="@+id/tvToError"
@ -99,8 +104,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="24dp"
android:inputType="textMultiLine"
android:textColor="@color/white"
android:inputType="numberDecimal"
android:textSize="20sp"
android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent"
@ -130,12 +134,12 @@
<View
android:id="@+id/viewSpinner"
android:layout_width="0dp"
android:layout_height="3dp"
android:layout_marginTop="5dp"
android:background="@color/gray"
android:layout_height="1dp"
android:layout_marginBottom="7dp"
android:background="@color/darkGray"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset"
app:layout_constraintTop_toBottomOf="@id/spAsset" />
app:layout_constraintBottom_toBottomOf="@id/etAmount" />
<TextView
android:id="@+id/tvAssetError"
@ -154,7 +158,6 @@
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:inputType="textMultiLine"
android:textColor="@color/white"
android:hint="@string/memo_capital"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
@ -189,9 +192,9 @@
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:src="#666"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvScan" />
app:layout_constraintTop_toBottomOf="@id/tvScan"
android:contentDescription="@string/camera_feed_to_scan_qr" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabCloseCamera"
@ -228,7 +231,6 @@
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:text="@string/cancel_capital"
android:textStyle="bold"
@ -236,4 +238,6 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</ScrollView>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#0099d6</color>
<color name="colorPrimaryDark">#0099d6</color>
<color name="colorPrimaryDark">#006fd6</color>
<color name="colorAccent">#0099d6</color>
<color name="gray">#d3d3d3</color>
<color name="darkGray">#686767</color>

View file

@ -496,4 +496,14 @@
<string name="none">None</string>
<string name="pin">Pin</string>
<string name="pattern">Pattern</string>
<string name="new_user">New user?</string>
<string name="existing_user">Existing user?</string>
<string name="connection_status">Connection status</string>
<string name="people_icon">People icon</string>
<string name="camera_feed_to_scan_qr">Camera feed to scan QR</string>
<string name="create_account">Create Account</string>
<string name="import_account">Import Account</string>
<string name="import_account_options_description">Select one option to import your existing account</string>
<string name="import_account_seed">Import Account Seed</string>
<string name="import_account_backup">Import Account Backup</string>
</resources>