Merge pull request #4 from sjaramillo10/master

Include last UI/UX work on the main repo
This commit is contained in:
hvarona 2018-01-21 20:20:46 -04:00 committed by GitHub
commit b23ad68c27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1279 additions and 186 deletions

View file

@ -53,9 +53,10 @@ dependencies {
compile 'com.jakewharton:butterknife:8.8.1' compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.github.bilthon:graphenej:0.4.6-alpha1' compile 'com.github.bilthon:graphenej:0.4.6-alpha1'
compile 'com.google.zxing:core:3.3.1' compile 'com.google.zxing:core:3.3.1'
compile 'me.dm7.barcodescanner:zxing:1.9.8'; compile 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0' compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19' testCompile 'org.mockito:mockito-core:1.10.19'

View file

@ -37,6 +37,13 @@
<activity android:name=".activities.SettingsActivity" <activity android:name=".activities.SettingsActivity"
android:theme="@style/AppTheme.NoActionBar" > android:theme="@style/AppTheme.NoActionBar" >
</activity> </activity>
<activity android:name=".activities.AccountsActivity"
android:theme="@style/ActivityDialog"
android:parentActivityName=".activities.BoardActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.BoardActivity" />
</activity>
<service android:name=".service.CrystalWalletService" <service android:name=".service.CrystalWalletService"
android:exported="false"/> android:exported="false"/>

View file

@ -0,0 +1,46 @@
package cy.agorise.crystalwallet.activities;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/9/18.
*
*/
public class AccountsActivity extends AppCompatActivity {
@BindView(R.id.tvSettings)
TextView tvSettings;
@BindView(R.id.tvClose)
TextView tvClose;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_accounts);
ButterKnife.bind(this);
}
@OnClick(R.id.tvSettings)
public void onTvSettingsClick(){
onBackPressed();
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
}
@OnClick(R.id.tvClose)
public void cancel(){
onBackPressed();
}
}

View file

@ -1,29 +1,26 @@
package cy.agorise.crystalwallet.activities; package cy.agorise.crystalwallet.activities;
import android.app.ActivityOptions;
import android.arch.lifecycle.LiveData; import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.ViewModelProviders; import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.drawable.AnimationDrawable;
import android.media.MediaPlayer; import android.media.MediaPlayer;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.util.Log; import android.util.Pair;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;
import android.view.SurfaceView; import android.view.SurfaceView;
import android.view.View; import android.view.View;
import android.view.animation.LinearInterpolator; import android.view.animation.LinearInterpolator;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import java.util.List; import java.util.List;
@ -33,17 +30,18 @@ import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.fragments.AccountsFragment;
import cy.agorise.crystalwallet.fragments.BalanceFragment; import cy.agorise.crystalwallet.fragments.BalanceFragment;
import cy.agorise.crystalwallet.fragments.ContactsFragment; import cy.agorise.crystalwallet.fragments.ContactsFragment;
import cy.agorise.crystalwallet.fragments.ReceiveTransactionFragment; import cy.agorise.crystalwallet.fragments.ReceiveTransactionFragment;
import cy.agorise.crystalwallet.fragments.SendTransactionFragment; import cy.agorise.crystalwallet.fragments.SendTransactionFragment;
import cy.agorise.crystalwallet.fragments.TransactionsFragment; import cy.agorise.crystalwallet.fragments.TransactionsFragment;
import de.hdodenhof.circleimageview.CircleImageView;
import cy.agorise.crystalwallet.models.CryptoNetBalance; import cy.agorise.crystalwallet.models.CryptoNetBalance;
import cy.agorise.crystalwallet.viewmodels.CryptoNetBalanceListViewModel; import cy.agorise.crystalwallet.viewmodels.CryptoNetBalanceListViewModel;
/** /**
* Created by Henry Varona on 7/10/2017. * Created by Henry Varona on 7/10/2017.
*
*/ */
public class BoardActivity extends AppCompatActivity { public class BoardActivity extends AppCompatActivity {
@ -75,7 +73,13 @@ public class BoardActivity extends AppCompatActivity {
public SurfaceView mSurfaceView; public SurfaceView mSurfaceView;
@BindView(R.id.toolbar_user_img) @BindView(R.id.toolbar_user_img)
public ImageView userImage; public CircleImageView userImage;
@BindView(R.id.lightning)
public ImageView lightning;
@BindView(R.id.triangle)
public ImageView triangle;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -134,7 +138,7 @@ public class BoardActivity extends AppCompatActivity {
// Hide Add Contact fab, it won't hide until first page changed... // Hide Add Contact fab, it won't hide until first page changed...
// Convert 72dp to pixels (fab is 56dp in diameter + 16dp margin) // Convert 72dp to pixels (fab is 56dp in diameter + 16dp margin)
final int fabDistanceToHide = (int) (72 * Resources.getSystem().getDisplayMetrics().density);; final int fabDistanceToHide = (int) (72 * Resources.getSystem().getDisplayMetrics().density);
fabAddContact.animate().translationY(fabDistanceToHide) fabAddContact.animate().translationY(fabDistanceToHide)
.setInterpolator(new LinearInterpolator()).start(); .setInterpolator(new LinearInterpolator()).start();
@ -183,16 +187,21 @@ public class BoardActivity extends AppCompatActivity {
*/ */
@OnClick(R.id.toolbar_user_img) @OnClick(R.id.toolbar_user_img)
public void accounts() { public void accounts() {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); Intent intent = new Intent(this, AccountsActivity.class);
Fragment prev = getSupportFragmentManager().findFragmentByTag("AccountsDialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
// Create and show the dialog. // SharedElementTransition is only available from API level 21
AccountsFragment newFragment = AccountsFragment.newInstance(this.cryptoNetAccountId); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
newFragment.show(ft, "AccountsDialog"); Pair p1 = Pair.create(userImage, "gravatarTransition");
Pair p2 = Pair.create(lightning, "lightningTransition");
Pair p3 = Pair.create(triangle, "triangleTransition");
ActivityOptions options = ActivityOptions
.makeSceneTransitionAnimation(this, p1, p2, p3);
startActivity(intent, options.toBundle());
} else {
startActivity(intent);
}
} }
/* /*
@ -237,7 +246,7 @@ public class BoardActivity extends AppCompatActivity {
} }
private class BoardPagerAdapter extends FragmentStatePagerAdapter { private class BoardPagerAdapter extends FragmentStatePagerAdapter {
public BoardPagerAdapter(FragmentManager fm) { BoardPagerAdapter(FragmentManager fm) {
super(fm); super(fm);
} }

View file

@ -12,13 +12,18 @@ import android.support.v7.widget.Toolbar;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;
import android.view.SurfaceView; import android.view.SurfaceView;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import cy.agorise.crystalwallet.BuildConfig;
import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.fragments.AccountsSettingsFragment;
import cy.agorise.crystalwallet.fragments.BackupsSettingsFragment;
import cy.agorise.crystalwallet.fragments.BalanceFragment; import cy.agorise.crystalwallet.fragments.BalanceFragment;
import cy.agorise.crystalwallet.fragments.GeneralSettingsFragment; import cy.agorise.crystalwallet.fragments.GeneralSettingsFragment;
import cy.agorise.crystalwallet.fragments.SecuritySettingsFragment;
/** /**
* Created by seven on 12/28/17. * Created by seven on 12/28/17.
@ -38,6 +43,9 @@ public class SettingsActivity extends AppCompatActivity{
@BindView(R.id.surface_view) @BindView(R.id.surface_view)
public SurfaceView mSurfaceView; public SurfaceView mSurfaceView;
@BindView(R.id.tvBuildVersion)
public TextView tvBuildVersion;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -76,6 +84,11 @@ public class SettingsActivity extends AppCompatActivity{
mPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); mPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mPager)); 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 { private class SettingsPagerAdapter extends FragmentStatePagerAdapter {
@ -88,14 +101,12 @@ public class SettingsActivity extends AppCompatActivity{
switch (position){ switch (position){
case 0: case 0:
return new GeneralSettingsFragment(); return new GeneralSettingsFragment();
/*case 1:
return null;
case 2:
return null;*/
case 1: case 1:
return new SecuritySettingsFragment();
case 2: case 2:
return new BackupsSettingsFragment();
case 3: case 3:
return new BalanceFragment(); return new AccountsSettingsFragment();
} }

View file

@ -53,7 +53,7 @@ public class AccountsFragment extends DialogFragment {
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.AccountsTheme); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater(); LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.fragment_accounts, null); View view = inflater.inflate(R.layout.fragment_accounts, null);

View file

@ -0,0 +1,66 @@
package cy.agorise.crystalwallet.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/16/18.
*/
public class AccountsSettingsFragment extends Fragment {
public AccountsSettingsFragment() {
// Required empty public constructor
}
public static AccountsSettingsFragment newInstance() {
AccountsSettingsFragment fragment = new AccountsSettingsFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@BindView(R.id.tvUpgrade)
public TextView tvUpgrade;
@BindView(R.id.tvImport)
public TextView tvImport;
@BindView(R.id.tvRefresh)
public TextView tvRefresh;
@BindView(R.id.tvRemove)
public TextView tvRemove;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_accounts_settings, container, false);
ButterKnife.bind(this, v);
tvUpgrade.setText(makeFirstWordsBold(getResources().getString(R.string.upgrade_description)));
tvImport.setText(makeFirstWordsBold(getResources().getString(R.string.import_description)));
tvRefresh.setText(makeFirstWordsBold(getResources().getString(R.string.refresh_description)));
tvRemove.setText(makeFirstWordsBold(getResources().getString(R.string.remove_description)));
return v;
}
private SpannableStringBuilder makeFirstWordsBold(String str) {
SpannableStringBuilder ssb = new SpannableStringBuilder(str);
ssb.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
0, str.indexOf('.')+1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return ssb;
}
}

View file

@ -0,0 +1,62 @@
package cy.agorise.crystalwallet.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/11/18.
*/
public class BackupsSettingsFragment extends Fragment{
public BackupsSettingsFragment() {
// Required empty public constructor
}
public static BackupsSettingsFragment newInstance() {
BackupsSettingsFragment fragment = new BackupsSettingsFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@BindView(R.id.tvBinFile)
public TextView tvBinFile;
@BindView(R.id.tvBrainkey)
public TextView tvBrainkey;
@BindView(R.id.tvWIFKey)
public TextView tvWIFKey;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_backups_settings, container, false);
ButterKnife.bind(this, v);
tvBinFile.setText(makeFirstWordsBold(getResources().getString(R.string.bin_file_description)));
tvBrainkey.setText(makeFirstWordsBold(getResources().getString(R.string.brainkey_description)));
tvWIFKey.setText(makeFirstWordsBold(getResources().getString(R.string.wif_key_description)));
return v;
}
private SpannableStringBuilder makeFirstWordsBold(String str) {
SpannableStringBuilder ssb = new SpannableStringBuilder(str);
ssb.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
0, str.indexOf('.')+1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return ssb;
}
}

View file

@ -0,0 +1,38 @@
package cy.agorise.crystalwallet.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/18/18.
*/
public class NoneSecurityFragment extends Fragment {
public NoneSecurityFragment() {
// Required empty public constructor
}
public static NoneSecurityFragment newInstance() {
NoneSecurityFragment fragment = new NoneSecurityFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_none_security, container, false);
ButterKnife.bind(this, v);
return v;
}
}

View file

@ -0,0 +1,38 @@
package cy.agorise.crystalwallet.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.R;
/**
* Created by xd on 1/18/18.
*/
public class PinSecurityFragment extends Fragment {
public PinSecurityFragment() {
// Required empty public constructor
}
public static PinSecurityFragment newInstance() {
PinSecurityFragment fragment = new PinSecurityFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_pin_security, container, false);
ButterKnife.bind(this, v);
return v;
}
}

View file

@ -0,0 +1,83 @@
package cy.agorise.crystalwallet.fragments;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.BindView;
import butterknife.ButterKnife;
import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.util.ChildViewPager;
/**
* Created by xd on 1/17/18.
* In this fragment the user should be able to select its preferred security option.
*/
public class SecuritySettingsFragment extends Fragment {
public SecuritySettingsFragment() {
// Required empty public constructor
}
public static SecuritySettingsFragment newInstance() {
SecuritySettingsFragment fragment = new SecuritySettingsFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@BindView(R.id.pager)
public ChildViewPager mPager;
public SecurityPagerAdapter securityPagerAdapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_security_settings, container, false);
ButterKnife.bind(this, v);
securityPagerAdapter = new SecurityPagerAdapter(getChildFragmentManager());
mPager.setAdapter(securityPagerAdapter);
mPager.setSwipeLocked(true);
TabLayout tabLayout = v.findViewById(R.id.tabs);
mPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mPager));
return v;
}
private class SecurityPagerAdapter extends FragmentPagerAdapter {
SecurityPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position){
case 0:
return new NoneSecurityFragment();
case 1:
return new PinSecurityFragment();
case 2:
return new BackupsSettingsFragment();
}
return null; //new OnConstructionFragment();
}
@Override
public int getCount() {
return 3;
}
}
}

View file

@ -0,0 +1,49 @@
package cy.agorise.crystalwallet.util;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* Created by xd on 1/18/18.
* This ViewPager is intended to be used inside another ViewPager therefore it has the
* setSwipeLocked which disables or enables the swipe gesture.
*/
public class ChildViewPager extends ViewPager {
private boolean swipeLocked;
public ChildViewPager(Context context) {
super(context);
}
public ChildViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
public boolean getSwipeLocked() {
return swipeLocked;
}
public void setSwipeLocked(boolean swipeLocked) {
this.swipeLocked = swipeLocked;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
return !swipeLocked && super.onTouchEvent(event);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
return !swipeLocked && super.onInterceptTouchEvent(event);
}
@Override
public boolean canScrollHorizontally(int direction) {
return !swipeLocked && super.canScrollHorizontally(direction);
}
}

View file

@ -2,7 +2,7 @@
<set xmlns:android="http://schemas.android.com/apk/res/android" <set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"> android:shareInterpolator="false">
<scale <scale
android:interpolator="@android:anim/bounce_interpolator" android:interpolator="@android:anim/anticipate_overshoot_interpolator"
android:fromXScale="1.0" android:fromXScale="1.0"
android:toXScale="1.0" android:toXScale="1.0"
android:fromYScale="0.0" android:fromYScale="0.0"

View file

@ -0,0 +1,157 @@
<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:paddingStart="16dp"
android:paddingEnd="16dp">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<View
android:id="@+id/topView"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:layout_marginTop="45dp"
android:background="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/user_img"
android:layout_width="90dp"
android:layout_height="90dp"
android:src="@drawable/ken_code_gravatar"
android:transitionName="gravatarTransition"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="24dp"
android:layout_height="45dp"
android:transitionName="lightningTransition"
app:layout_constraintBottom_toBottomOf="@id/user_img"
app:layout_constraintStart_toStartOf="@id/user_img"
app:srcCompat="@drawable/ic_lightning_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/user_name_placeholder"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/topView"
app:layout_constraintEnd_toEndOf="@id/topView"
app:layout_constraintStart_toStartOf="@id/topView"
app:layout_constraintTop_toTopOf="@id/topView" />
<View
android:id="@+id/secondView"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/lightGray"
app:layout_constraintTop_toBottomOf="@id/topView" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:text="@string/my_accounts"
android:textColor="@color/darkGray"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/secondView"
app:layout_constraintStart_toStartOf="@id/secondView"
app:layout_constraintTop_toTopOf="@id/secondView" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabAddAccount"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="12dp"
app:backgroundTint="@color/colorPrimary"
app:fabSize="normal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/secondView"
app:srcCompat="@drawable/ic_add_24dp" />
<View
android:id="@+id/thirdView"
android:layout_width="match_parent"
android:layout_height="250dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/secondView" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="64dp"
android:layout_marginStart="64dp"
android:text="@string/dont_have_multiple_accounts"
android:textAlignment="center"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/thirdView"
app:layout_constraintEnd_toEndOf="@id/thirdView"
app:layout_constraintStart_toStartOf="@id/thirdView"
app:layout_constraintTop_toTopOf="@id/thirdView" />
<View
android:id="@+id/forthView"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/lightGray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/thirdView" />
<ImageView
android:id="@+id/ivSettings"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="24dp"
app:layout_constraintBottom_toBottomOf="@id/forthView"
app:layout_constraintStart_toStartOf="@id/forthView"
app:layout_constraintTop_toTopOf="@id/forthView"
app:srcCompat="@drawable/ic_settings_24dp" />
<TextView
android:id="@+id/tvSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@string/settings"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/forthView"
app:layout_constraintStart_toEndOf="@id/ivSettings"
app:layout_constraintTop_toTopOf="@id/forthView" />
<TextView
android:id="@+id/tvClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:text="@string/close"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/forthView"
app:layout_constraintEnd_toEndOf="@id/forthView"
app:layout_constraintTop_toTopOf="@id/forthView" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>

View file

@ -12,18 +12,12 @@
android:id="@+id/appbar" android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="120dp" android:layout_height="120dp"
android:fitsSystemWindows="true"
android:background="@color/colorPrimary" android:background="@color/colorPrimary"
app:theme="@style/AppTheme.AppBarOverlay"> app:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout <RelativeLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:fitsSystemWindows="true"
app:contentScrim="@color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:toolbarId="@+id/toolbar">
<SurfaceView <SurfaceView
android:id="@+id/surface_view" android:id="@+id/surface_view"
@ -41,7 +35,6 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/transparent" android:background="@color/transparent"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
app:layout_collapseMode="none"
app:popupTheme="@style/AppTheme.PopupOverlay"> app:popupTheme="@style/AppTheme.PopupOverlay">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
@ -84,15 +77,13 @@
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</android.support.v7.widget.Toolbar> </android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout <android.support.design.widget.TabLayout
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_gravity="bottom" android:layout_alignParentBottom="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_collapseMode="pin"
android:animateLayoutChanges="true"> android:animateLayoutChanges="true">
<android.support.design.widget.TabItem <android.support.design.widget.TabItem
@ -121,15 +112,61 @@
</android.support.design.widget.TabLayout> </android.support.design.widget.TabLayout>
</android.support.design.widget.CollapsingToolbarLayout> </RelativeLayout>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
<!-- change height --> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/pager" android:id="@+id/pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> android:layout_above="@id/clBottomBanner"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/clBottomBanner"
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>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -41,6 +41,7 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/transparent" android:background="@color/transparent"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="-20dp"
app:layout_collapseMode="none" app:layout_collapseMode="none"
app:popupTheme="@style/AppTheme.PopupOverlay"> app:popupTheme="@style/AppTheme.PopupOverlay">
@ -59,28 +60,33 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<cy.agorise.crystalwallet.util.CircularImageView <de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/toolbar_user_img" android:id="@+id/toolbar_user_img"
android:layout_width="?attr/actionBarSize" android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"
android:src="@drawable/ken_code_gravatar" android:src="@drawable/ken_code_gravatar"
android:transitionName="gravatarTransition"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/lightning"
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="30dp" android:layout_height="30dp"
app:srcCompat="@drawable/ic_lightning_24dp" app:srcCompat="@drawable/ic_lightning_24dp"
android:transitionName="lightningTransition"
android:contentDescription="@string/lightning_icon" android:contentDescription="@string/lightning_icon"
app:layout_constraintStart_toStartOf="@id/toolbar_user_img" app:layout_constraintStart_toStartOf="@id/toolbar_user_img"
app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/> app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/>
<ImageView <ImageView
android:id="@+id/triangle"
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
app:srcCompat="@drawable/ic_arrow_24dp" app:srcCompat="@drawable/ic_arrow_24dp"
android:transitionName="triangleTransition"
android:contentDescription="@string/small_triangle_icon" android:contentDescription="@string/small_triangle_icon"
app:layout_constraintEnd_toEndOf="@id/toolbar_user_img" app:layout_constraintEnd_toEndOf="@id/toolbar_user_img"
app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/> app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/>

View file

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp">
<TextView
android:id="@+id/tvUpgrade"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="32dp"
android:text="@string/upgrade_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:id="@+id/btnUpgrade"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/upgrade"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@id/tvUpgrade"
app:layout_constraintStart_toStartOf="@id/tvUpgrade" />
<TextView
android:id="@+id/tvImport"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/import_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="@id/tvUpgrade"
app:layout_constraintTop_toBottomOf="@id/btnUpgrade"
app:layout_constraintEnd_toEndOf="@id/tvUpgrade"/>
<Button
android:id="@+id/btnImport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/import_"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@id/tvImport"
app:layout_constraintStart_toStartOf="@id/btnUpgrade" />
<TextView
android:id="@+id/tvRefresh"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/refresh_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="@id/tvImport"
app:layout_constraintTop_toBottomOf="@id/btnImport"
app:layout_constraintEnd_toEndOf="@id/tvImport"/>
<Button
android:id="@+id/btnRefresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/refresh"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@id/tvRefresh"
app:layout_constraintStart_toStartOf="@id/btnImport" />
<TextView
android:id="@+id/tvRemove"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/remove_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="@id/tvRefresh"
app:layout_constraintTop_toBottomOf="@id/btnRefresh"
app:layout_constraintEnd_toEndOf="@id/tvRefresh"/>
<Button
android:id="@+id/btnRemove"
style="@style/Widget.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/redcolor"
android:text="@string/remove"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/btnRefresh"
app:layout_constraintTop_toBottomOf="@id/tvRemove" />
</android.support.constraint.ConstraintLayout>
</ScrollView>

View file

@ -0,0 +1,82 @@
<?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="match_parent">
<TextView
android:id="@+id/tvBinFile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="32dp"
android:text="@string/bin_file_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:id="@+id/btnBinFile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/create_a_backup"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@id/tvBinFile"
app:layout_constraintStart_toStartOf="@id/tvBinFile" />
<TextView
android:id="@+id/tvBrainkey"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/brainkey_description"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="@id/tvBinFile"
app:layout_constraintEnd_toEndOf="@id/tvBinFile"
app:layout_constraintTop_toBottomOf="@id/btnBinFile"/>
<Button
android:id="@+id/btnBrainkey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/view_and_copy"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="@id/btnBinFile"
app:layout_constraintTop_toBottomOf="@id/tvBrainkey"/>
<TextView
android:id="@+id/tvWIFKey"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/wif_key_description"
android:textSize="15sp"
app:layout_constraintTop_toBottomOf="@id/btnBrainkey"
app:layout_constraintStart_toStartOf="@id/tvBrainkey"
app:layout_constraintEnd_toEndOf="@id/tvBrainkey" />
<Button
android:id="@+id/btnWIFKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/view_and_copy"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="@id/btnBrainkey"
app:layout_constraintTop_toBottomOf="@id/tvWIFKey"/>
</android.support.constraint.ConstraintLayout>

View file

@ -1,11 +1,15 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp">
<TextView <TextView
android:id="@+id/tvBackupAsset" android:id="@+id/tvBackupAsset"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -150,4 +154,46 @@
app:layout_constraintStart_toStartOf="@id/vDisplayDateTime" app:layout_constraintStart_toStartOf="@id/vDisplayDateTime"
app:layout_constraintEnd_toEndOf="@id/vDisplayDateTime"/> app:layout_constraintEnd_toEndOf="@id/vDisplayDateTime"/>
<TextView
android:id="@+id/tvCloseWalletTimer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="Close wallet after 3 min. of inactivity"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/vSound"
app:layout_constraintStart_toStartOf="@id/spSound" />
<Switch
android:id="@+id/sCloseWalletTimer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@+id/tvCloseWalletTimer"
app:layout_constraintEnd_toEndOf="@id/vSound" />
<TextView
android:id="@+id/tvBugsErrors"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="Bugs or Errors? Let us know"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/tvCloseWalletTimer"
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:background="@color/colorPrimary"
android:text="CONTACT"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@id/sCloseWalletTimer"
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</ScrollView>

View file

@ -0,0 +1,20 @@
<?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="match_parent">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="It is recommended to use some kind of security."
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,57 @@
<?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="match_parent">
<TextView
android:id="@+id/tvCurrentPin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/current_pin"
app:layout_constraintBottom_toTopOf="@+id/etCurrentPin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<EditText
android:id="@+id/etCurrentPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberPassword"
app:layout_constraintBottom_toTopOf="@+id/etNewPin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvCurrentPin"
tools:ignore="LabelFor" />
<EditText
android:id="@+id/etNewPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/new_pin"
android:inputType="numberPassword"
app:layout_constraintBottom_toTopOf="@+id/etConfirmPin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etCurrentPin" />
<EditText
android:id="@+id/etConfirmPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/confirm_pin"
android:inputType="numberPassword"
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/etNewPin" />
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,116 @@
<?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="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="24dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/vPocketSecurity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/lightGray"
app:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabSelectedTextColor="@color/black"
app:tabTextColor="@color/black"
android:animateLayoutChanges="true">
<android.support.design.widget.TabItem
android:id="@+id/tabNone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/none" />
<android.support.design.widget.TabItem
android:id="@+id/tabPin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pin" />
<android.support.design.widget.TabItem
android:id="@+id/tabPattern"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pattern" />
</android.support.design.widget.TabLayout>
</android.support.design.widget.AppBarLayout>
<cy.agorise.crystalwallet.util.ChildViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
<View
android:id="@+id/vPocketSecurity"
android:layout_width="match_parent"
android:layout_height="140dp"
android:background="@color/lightGray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvPocketSecurity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="24dp"
android:text="@string/use_pocket_security"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="@+id/vPocketSecurity"
app:layout_constraintStart_toStartOf="@id/vPocketSecurity"/>
<Switch
android:id="@+id/sPocketSecurity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginTop="24dp"
app:layout_constraintTop_toTopOf="@+id/vPocketSecurity"
app:layout_constraintEnd_toEndOf="@id/vPocketSecurity" />
<TextView
android:id="@+id/tvPocketSecurityUser"
android:layout_width="wrap_content"
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"/>
<EditText
android:id="@+id/etPocketPassword"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberPassword"
app:layout_constraintTop_toBottomOf="@id/tvPocketSecurityUser"
app:layout_constraintStart_toStartOf="@id/tvPocketSecurity"
app:layout_constraintEnd_toEndOf="@id/sPocketSecurity"
tools:ignore="LabelFor" />
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<changeImageTransform/>
</transitionSet>

View file

@ -2,7 +2,7 @@
<resources> <resources>
<color name="colorPrimary">#0099d6</color> <color name="colorPrimary">#0099d6</color>
<color name="colorPrimaryDark">#0099d6</color> <color name="colorPrimaryDark">#0099d6</color>
<color name="colorAccent">#669900</color> <color name="colorAccent">#0099d6</color>
<color name="gray">#d3d3d3</color> <color name="gray">#d3d3d3</color>
<color name="darkGray">#686767</color> <color name="darkGray">#686767</color>
<color name="lightGray">#E3E3E3</color> <color name="lightGray">#E3E3E3</color>

View file

@ -473,4 +473,27 @@
<string name="go_back_arrow">Go back arrow</string> <string name="go_back_arrow">Go back arrow</string>
<string name="settings2">Settings</string> <string name="settings2">Settings</string>
<string name="info_icon">Info icon</string> <string name="info_icon">Info icon</string>
<string name="bin_file_description">Bin file. Always save your backup .bin file to a secret MicroSD card or USB Stick.</string>
<string name="brainkey_description">Brainkey. Account recovery words that can be captured or copied, but not edited.</string>
<string name="wif_key_description">WIF Key (Advanced). A long string of cryptic text that can be used with other Wallets.</string>
<string name="create_a_backup">CREATE A BACKUP</string>
<string name="view_and_copy"><![CDATA[View & Copy]]></string>
<string name="upgrade_description">Upgrade to LifeTime Membership (LTM). Bitshares\' LTM accounts pay near-zero fees, get 80% cashback and bonuses for referrals.</string>
<string name="upgrade">Upgrade</string>
<string name="import_description">Import Accounts. Import multiple accounts from blockchains such as Bitshares, Bitcoin, Steem, Dash and more.</string>
<string name="import_">Import</string>
<string name="refresh_description">Refresh keys. Ony for bitshares accounts.</string>
<string name="refresh">Refresh</string>
<string name="remove_description">Remove an account from this Wallet. The account removed will still reside on the blockchain.</string>
<string name="remove">Remove</string>
<string name="user_name_password_placeholder">user_name Password</string>
<string name="version_placeholder">v1.0</string>
<string name="block_number_placeholder">block# 14966596</string>
<string name="current_pin">Current PIN</string>
<string name="new_pin">New PIN</string>
<string name="confirm_pin">Confirm PIN</string>
<string name="use_pocket_security">Use \"Pocket\" Security</string>
<string name="none">None</string>
<string name="pin">Pin</string>
<string name="pattern">Pattern</string>
</resources> </resources>

View file

@ -32,6 +32,23 @@
<item name="android:colorButtonNormal">@color/white</item> <item name="android:colorButtonNormal">@color/white</item>
<item name="android:fontFamily">@font/opensans</item> <item name="android:fontFamily">@font/opensans</item>
<item name="fontFamily">@font/opensans</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat --> <item name="fontFamily">@font/opensans</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
<!-- enable window content transitions -->
<item name="android:windowContentTransitions">true</item>
<!-- specify shared element transitions
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform</item> -->
</style>
<style name="ActivityDialog" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style> </style>
<style name="AppTheme.NoActionBar" parent="AppTheme"> <style name="AppTheme.NoActionBar" parent="AppTheme">
@ -75,13 +92,17 @@
<item name="android:windowExitAnimation">@anim/receive_transaction_out</item> <item name="android:windowExitAnimation">@anim/receive_transaction_out</item>
</style> </style>
<style name="AccountsTheme" parent="Theme.AppCompat.DayNight.Dialog">
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowAnimationStyle">@style/AccountsAnimation.Window</item>
</style>
<style name="AccountsAnimation.Window" parent="@android:style/Animation.Activity"> <style name="AccountsAnimation.Window" parent="@android:style/Animation.Activity">
<item name="android:windowEnterAnimation">@anim/accounts_in</item> <item name="android:windowEnterAnimation">@anim/accounts_in</item>
<item name="android:windowExitAnimation">@anim/accounts_out</item> <item name="android:windowExitAnimation">@anim/accounts_out</item>
</style> </style>
<style name="Widget.Button" parent="android:Widget.Button">
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:minHeight">16dp</item>
<item name="android:textAllCaps">true</item>
</style>
</resources> </resources>