From e562d322d7e9df4385217152bccf109d921185e0 Mon Sep 17 00:00:00 2001 From: dtvv Date: Tue, 30 Oct 2018 19:56:03 -0600 Subject: [PATCH 1/5] Test --- .../cy/agorise/bitsybitshareswallet/activities/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt index 6974b68..70df4e0 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt @@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity() { * {@link FragmentPagerAdapter} derivative, which will keep every * loaded fragment in memory. If this becomes too memory intensive, it * may be best to switch to a - * [android.support.v4.app.FragmentStatePagerAdapter]. + * [android.support.v4.app.FragmentStatePagerAdapter].. */ private var mSectionsPagerAdapter: SectionsPagerAdapter? = null From f4759abc7237c4e20ac77b6d6aa9bd7f433a4e8c Mon Sep 17 00:00:00 2001 From: dtvv Date: Wed, 31 Oct 2018 15:22:44 -0600 Subject: [PATCH 2/5] Convert Constants.java to kotlin --- .../agorise/bitsybitshareswallet/utils/Constants.java | 8 -------- .../cy/agorise/bitsybitshareswallet/utils/Constants.kt | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.java create mode 100644 app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.java b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.java deleted file mode 100644 index b5cbe19..0000000 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.java +++ /dev/null @@ -1,8 +0,0 @@ -package cy.agorise.bitsybitshareswallet.utils; - -public class Constants { - /** - * Key used to store the night mode setting into the shared preferences - */ - public static final String KEY_NIGHT_MODE_ACTIVATED = "key_night_mode_activated"; -} diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt new file mode 100644 index 0000000..728cbfb --- /dev/null +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt @@ -0,0 +1,10 @@ +package cy.agorise.bitsybitshareswallet.utils + + +object Constants { + + /** + * Key used to store the night mode setting into the shared preferences + */ + val KEY_NIGHT_MODE_ACTIVATED = "key_night_mode_activated" +} From 04191b309d4103832f905504a2acb4e3c3ff9a58 Mon Sep 17 00:00:00 2001 From: dtvv Date: Wed, 31 Oct 2018 15:25:36 -0600 Subject: [PATCH 3/5] QR code control --- .../utils/SquaredImageView.kt | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt new file mode 100644 index 0000000..8fd09e4 --- /dev/null +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt @@ -0,0 +1,30 @@ +package cy.agorise.crystalwallet.util + +import android.content.Context +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 + */ + +class SquaredImageView : AppCompatImageView { + constructor(context: Context) : super(context) {} + + constructor(context: Context, @Nullable attrs: AttributeSet) : super(context, attrs) {} + + constructor(context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int) : super( + context, + attrs, + defStyleAttr + ) { + } + + protected fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + + val size = Math.min(getMeasuredWidth(), getMeasuredHeight()) + setMeasuredDimension(size, size) + } +} From d8cd132c88402f8754200e0eb46619e69e1851a3 Mon Sep 17 00:00:00 2001 From: dtvv Date: Wed, 31 Oct 2018 16:52:53 -0600 Subject: [PATCH 4/5] Barcode qr library --- app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index aa8e224..8502e40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,6 +32,8 @@ dependencies { implementation 'android.arch.lifecycle:runtime:1.1.1' implementation 'android.arch.lifecycle:extensions:1.1.1' implementation 'android.arch.persistence.room:runtime:1.1.0' + implementation 'com.google.zxing:core:3.3.1' + implementation 'me.dm7.barcodescanner:zxing:1.9.8' kapt 'android.arch.persistence.room:runtime:1.1.0' annotationProcessor 'android.arch.lifecycle:compiler:1.1.1' From a2f696c3263c579fd0b0ddd427d334771af0574d Mon Sep 17 00:00:00 2001 From: dtvv Date: Wed, 31 Oct 2018 18:46:48 -0600 Subject: [PATCH 5/5] SendFragment and ReceiveFragment changes --- app/src/main/AndroidManifest.xml | 13 +++++- .../utils/SquaredImageView.kt | 3 +- app/src/main/res/values/colors.xml | 41 ++++++++++++++++--- app/src/main/res/values/dimens.xml | 3 ++ app/src/main/res/values/strings.xml | 27 ++++++++++++ 5 files changed, 79 insertions(+), 8 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6c23cf9..b9092f9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,7 +12,7 @@ android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"> @@ -25,6 +25,17 @@ android:name=".activities.SettingsActivity" android:label="@string/title_settings"> + + + + + \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt index 8fd09e4..b6f80b3 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/SquaredImageView.kt @@ -1,6 +1,7 @@ package cy.agorise.crystalwallet.util import android.content.Context +import android.support.annotation.Nullable import android.support.v7.widget.AppCompatImageView import android.util.AttributeSet @@ -21,7 +22,7 @@ class SquaredImageView : AppCompatImageView { ) { } - protected fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + protected override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { super.onMeasure(widthMeasureSpec, heightMeasureSpec) val size = Math.min(getMeasuredWidth(), getMeasuredHeight()) diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 7f68767..2a7fee2 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,10 +1,39 @@ - #009FE3 - #0071b1 - #D81B60 + #0099d6 + #0099d6 + #669900 + #d3d3d3 + #686767 + #ffffff + #f0006b - #000 - #669900 - #DC473A + #147b00 + + #000000 + #BFD1FF + #f2f6ff + #70882E + #ff0000 + #FF4081 + #DD4739 + + #FFFFFF + #FFFFFF + #000000 + + #dddddd + + #000000 + #ffffff + #669900 + #c5e1a5 + #DC473A + #ef9a9a + #BFE5F5 + #CCCCCC + + #000000 + #000000 + #ff56a9c7 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index cef3abc..9d518a5 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -4,4 +4,7 @@ 16dp 16dp 8dp + + 35sp + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7c1d12d..9d4109e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -9,4 +9,31 @@ Settings Night mode + + CANCEL + + to + from + + accountId + + language + + NEXT + + From + To + + Amount + + Loyalty Points + Backup Asset + Memo + Donate 2 BTS to the Support Developers at + Send + v 1.0 beta + block# ------- + No amount requested + Amount +