Change create account

pull/2/head
MadCake 7 years ago
parent 85f75336ef
commit 534135d41b
  1. 2
      app/build.gradle
  2. 18
      app/src/main/java/com/wallet/crypto/trustapp/ui/AddAccountActivity.java
  3. 8
      app/src/main/java/com/wallet/crypto/trustapp/viewmodel/CreateAccountViewModel.java
  4. 19
      app/src/main/java/com/wallet/crypto/trustapp/viewmodel/CreateAccountViewModelFactory.java
  5. 8
      app/src/main/java/com/wallet/crypto/trustapp/views/CreateAccountActivity.java
  6. 10
      app/src/main/res/drawable/bg_ripple_primary_color.xml
  7. 2
      app/src/main/res/drawable/splash_background.xml
  8. 41
      app/src/main/res/layout/activity_add_account.xml
  9. 2
      app/src/main/res/values/colors.xml
  10. 3
      app/src/main/res/values/dimens.xml
  11. 1
      app/src/main/res/values/strings.xml

@ -6,7 +6,7 @@ android {
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.wallet.crypto.trustapp"
minSdkVersion 16
minSdkVersion 23
targetSdkVersion 27
versionCode 12
versionName "1.3.8"

@ -0,0 +1,18 @@
package com.wallet.crypto.trustapp.ui;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.wallet.crypto.trustapp.R;
public class AddAccountActivity extends BaseActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_account);
}
}

@ -0,0 +1,8 @@
package com.wallet.crypto.trustapp.viewmodel;
public class CreateAccountViewModel extends BaseViewModel {
public CreateAccountViewModel() {
}
}

@ -0,0 +1,19 @@
package com.wallet.crypto.trustapp.viewmodel;
import android.arch.lifecycle.ViewModel;
import android.arch.lifecycle.ViewModelProvider;
import android.support.annotation.NonNull;
public class CreateAccountViewModelFactory implements ViewModelProvider.Factory {
public CreateAccountViewModelFactory() {
}
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new CreateAccountViewModel();
}
}

@ -22,7 +22,7 @@ public class CreateAccountActivity extends AppCompatActivity {
private Controller mController;
// Constant
private static final int MIN_PASSWORD_LENGTH = 4;
// private static final int MIN_PASSWORD_LENGTH = 4;
// UI references.
private Button mImportButton;
@ -108,9 +108,9 @@ public class CreateAccountActivity extends AppCompatActivity {
}
}
private boolean isPasswordLongEnough(String password) {
return password.length() >= MIN_PASSWORD_LENGTH;
}
// private boolean isPasswordLongEnough(String password) {
// return password.length() >= MIN_PASSWORD_LENGTH;
// }
@Override
public boolean onOptionsItemSelected(MenuItem item) {

@ -0,0 +1,10 @@
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorPrimary"
>
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimaryDark" />
</shape>
</item>
</ripple>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/colorWhite" />
<item android:drawable="@color/white" />
<item>
<bitmap
android:gravity="center"

@ -0,0 +1,41 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<include layout="@layout/layout_simple_toolbar" />
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:padding="@dimen/big_padding"
android:layout_marginTop="?actionBarSize"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<Button
android:id="@+id/create_account_action"
android:text="@string/action_sign_in"
android:background="@drawable/bg_ripple_primary_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:text="@string/already_have_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_margin"
/>
<Button
android:id="@+id/import_account_action"
style="@style/Widget.AppCompat.Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/action_import"
/>
</LinearLayout>
</FrameLayout>

@ -5,7 +5,7 @@
<color name="colorAccent">#2e91db</color>
<color name="green">#2fbb4f</color>
<color name="red">#f7506c</color>
<color name="colorWhite">#FFFFFFFF</color>
<color name="white">#ffffff</color>
<color name="semitransparentWhite">#AAFFFFFF</color>
<color name="QRCodeBlackColor">#FF000000</color>
<color name="QRCodeWhiteColor">#FFFFFFFF</color>

@ -2,7 +2,8 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="app_bar_height">200dp</dimen>
<dimen name="item_width">200dp</dimen>
<dimen name="text_margin">16dp</dimen>

@ -111,5 +111,6 @@
<string name="action_transaction_detail">More details</string>
<string name="empty"/>
<string name="try_again">Try again</string>
<string name="already_have_account">Already have a wallet?</string>
</resources>

Loading…
Cancel
Save