Improved ReceiveTransactionFragment using SquaredImageView and ScrollView
This commit is contained in:
parent
902d2c77ef
commit
ff971ee492
2 changed files with 142 additions and 137 deletions
|
@ -54,7 +54,7 @@ public class IntroActivity extends AppCompatActivity {
|
||||||
//Checks if the user has any seed created
|
//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 (accountSeedListViewModel.accountSeedsCount() == 0){
|
||||||
//If the user doesn't have any seeds created, then
|
//If the user doesn't have any seeds created, then
|
||||||
//send the user to create/import an account
|
//send the user to create/import an account
|
||||||
//Intent intent = new Intent(this, AccountSeedsManagementActivity.class);
|
//Intent intent = new Intent(this, AccountSeedsManagementActivity.class);
|
||||||
|
@ -65,7 +65,7 @@ public class IntroActivity extends AppCompatActivity {
|
||||||
//Intent intent = new Intent(this, CreateSeedActivity.class);
|
//Intent intent = new Intent(this, CreateSeedActivity.class);
|
||||||
Intent intent = new Intent(this, BoardActivity.class);
|
Intent intent = new Intent(this, BoardActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext());
|
/*CrystalDatabase db = CrystalDatabase.getAppDatabase(getApplicationContext());
|
||||||
List<AccountSeed> seeds = RandomSeedGenerator.generateSeeds(2);
|
List<AccountSeed> seeds = RandomSeedGenerator.generateSeeds(2);
|
||||||
|
|
|
@ -1,154 +1,159 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<ScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<View
|
<android.support.constraint.ConstraintLayout
|
||||||
android:id="@+id/topView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@drawable/receive_transaction_top_view"
|
|
||||||
android:layout_height="120dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:paddingBottom="24dp">
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="@string/receive_assets"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<cy.agorise.crystalwallet.util.CircularImageView
|
<View
|
||||||
android:id="@+id/gravatar"
|
android:id="@+id/topView"
|
||||||
android:layout_width="60dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:background="@drawable/receive_transaction_top_view"
|
||||||
android:src="@drawable/ken_code_gravatar"
|
android:layout_height="120dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_marginTop="90dp"
|
android:layout_marginStart="0dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_marginTop="0dp"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<Spinner
|
<TextView
|
||||||
android:id="@+id/spTo"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_marginStart="16dp"
|
android:text="@string/receive_assets"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintStart_toEndOf="@id/gravatar"
|
android:textSize="20sp"
|
||||||
app:layout_constraintTop_toTopOf="@id/gravatar" />
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<cy.agorise.crystalwallet.util.CircularImageView
|
||||||
android:id="@+id/tvFromError"
|
android:id="@+id/gravatar"
|
||||||
android:layout_width="0dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="60dp"
|
||||||
android:textColor="@color/red"
|
android:src="@drawable/ken_code_gravatar"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/spTo"
|
android:layout_marginStart="32dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/spTo"
|
android:layout_marginTop="90dp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/topView" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<EditText
|
<Spinner
|
||||||
android:id="@+id/etAmount"
|
android:id="@+id/spTo"
|
||||||
android:layout_width="150dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="16dp"
|
||||||
android:inputType="textMultiLine"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:textColor="@color/white"
|
app:layout_constraintStart_toEndOf="@id/gravatar"
|
||||||
android:textSize="20sp"
|
app:layout_constraintTop_toTopOf="@id/gravatar" />
|
||||||
android:hint="@string/amount"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/gravatar" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAmountError"
|
android:id="@+id/tvFromError"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/red"
|
android:textColor="@color/red"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/etAmount"
|
app:layout_constraintEnd_toEndOf="@+id/spTo"
|
||||||
app:layout_constraintStart_toStartOf="@+id/etAmount"
|
app:layout_constraintStart_toStartOf="@+id/spTo"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/etAmount" />
|
app:layout_constraintTop_toBottomOf="@+id/topView" />
|
||||||
|
|
||||||
<Spinner
|
<EditText
|
||||||
android:id="@+id/spAsset"
|
android:id="@+id/etAmount"
|
||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginStart="24dp"
|
||||||
android:gravity="top"
|
android:inputType="textMultiLine"
|
||||||
android:inputType="textMultiLine"
|
android:textColor="@color/white"
|
||||||
android:textColor="@color/white"
|
android:textSize="20sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:hint="@string/amount"
|
||||||
app:layout_constraintTop_toTopOf="@+id/etAmount" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/gravatar" />
|
||||||
|
|
||||||
<View
|
<TextView
|
||||||
android:id="@+id/viewSpinner"
|
android:id="@+id/tvAmountError"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="3dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:textColor="@color/red"
|
||||||
android:background="@color/gray"
|
app:layout_constraintEnd_toEndOf="@+id/etAmount"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/spAsset"
|
app:layout_constraintStart_toStartOf="@+id/etAmount"
|
||||||
app:layout_constraintStart_toStartOf="@+id/spAsset"
|
app:layout_constraintTop_toBottomOf="@+id/etAmount" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/spAsset" />
|
|
||||||
|
|
||||||
<TextView
|
<Spinner
|
||||||
android:id="@+id/tvAssetError"
|
android:id="@+id/spAsset"
|
||||||
android:layout_width="0dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/red"
|
android:layout_marginEnd="24dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tvAmountError"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/spAsset"
|
android:gravity="top"
|
||||||
app:layout_constraintStart_toStartOf="@+id/spAsset" />
|
android:inputType="textMultiLine"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/etAmount" />
|
||||||
|
|
||||||
<ImageView
|
<View
|
||||||
android:id="@+id/ivQrCode"
|
android:id="@+id/viewSpinner"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="300dp"
|
android:layout_height="3dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginStart="24dp"
|
android:background="@color/gray"
|
||||||
android:layout_marginTop="8dp"
|
app:layout_constraintEnd_toEndOf="@+id/spAsset"
|
||||||
android:adjustViewBounds="true"
|
app:layout_constraintStart_toStartOf="@+id/spAsset"
|
||||||
android:contentDescription="@string/qr_code"
|
app:layout_constraintTop_toBottomOf="@id/spAsset" />
|
||||||
android:src="@color/gray"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvShare"
|
android:id="@+id/tvAssetError"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:textColor="@color/red"
|
||||||
android:layout_marginStart="24dp"
|
app:layout_constraintBottom_toBottomOf="@+id/tvAmountError"
|
||||||
android:layout_marginTop="24dp"
|
app:layout_constraintEnd_toEndOf="@+id/spAsset"
|
||||||
android:text="@string/share_this_qr"
|
app:layout_constraintStart_toStartOf="@+id/spAsset" />
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/ivQrCode" />
|
|
||||||
|
|
||||||
<TextView
|
<cy.agorise.crystalwallet.util.SquaredImageView
|
||||||
android:id="@+id/tvCancel"
|
android:id="@+id/ivQrCode"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:text="@string/close"
|
android:layout_marginTop="8dp"
|
||||||
android:textSize="18sp"
|
android:adjustViewBounds="true"
|
||||||
android:textStyle="bold"
|
android:contentDescription="@string/qr_code"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:src="@color/gray"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvAmountError"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
<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:text="@string/share_this_qr"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
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_marginEnd="24dp"
|
||||||
|
android:text="@string/close"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tvShare"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
Loading…
Reference in a new issue