Browse Source

Merge branch 'master' of https://github.com/MyHush/SilentDragonAndroid

chat v0.3.3-beta
Jonathan "Duke" Leto 5 years ago
parent
commit
290518436b
  1. 33
      README.md
  2. 23
      app/build.gradle
  3. BIN
      app/src/main/connect-web.png
  4. BIN
      app/src/main/connectimg2-web.png
  5. 7
      app/src/main/java/org/myhush/silentdragon/MainActivity.kt
  6. BIN
      app/src/main/logo-web.png
  7. 5
      app/src/main/res/color/white_text_selector.xml
  8. BIN
      app/src/main/res/drawable-hdpi/ic_send_icon.png
  9. BIN
      app/src/main/res/drawable-mdpi/ic_send_icon.png
  10. BIN
      app/src/main/res/drawable-xhdpi/ic_send_icon.png
  11. BIN
      app/src/main/res/drawable-xxhdpi/ic_send_icon.png
  12. BIN
      app/src/main/res/drawable-xxxhdpi/ic_send_icon.png
  13. 5
      app/src/main/res/drawable/balance_selector.xml
  14. 5
      app/src/main/res/drawable/ic_account_balance_white_24dp.xml
  15. 5
      app/src/main/res/drawable/ic_account_balance_white_24dp_unselected.xml
  16. 5
      app/src/main/res/drawable/ic_file_download_white_24dp.xml
  17. 5
      app/src/main/res/drawable/ic_file_download_white_24dp_unselected.xml
  18. 5
      app/src/main/res/drawable/ic_send_white_24dp.xml
  19. 5
      app/src/main/res/drawable/ic_send_white_24dp_unselected.xml
  20. 18
      app/src/main/res/drawable/layout_border.xml
  21. 5
      app/src/main/res/drawable/receive_selector.xml
  22. 5
      app/src/main/res/drawable/send_selector.xml
  23. 9
      app/src/main/res/layout/content_main.xml
  24. 6
      app/src/main/res/menu/menu_nav.xml
  25. 5
      app/src/main/res/mipmap-anydpi-v26/connect.xml
  26. 5
      app/src/main/res/mipmap-anydpi-v26/connect_round.xml
  27. BIN
      app/src/main/res/mipmap-hdpi/connect.png
  28. BIN
      app/src/main/res/mipmap-hdpi/connect_round.png
  29. BIN
      app/src/main/res/mipmap-hdpi/connectfg.png
  30. BIN
      app/src/main/res/mipmap-mdpi/connect.png
  31. BIN
      app/src/main/res/mipmap-mdpi/connect_round.png
  32. BIN
      app/src/main/res/mipmap-mdpi/connectfg.png
  33. BIN
      app/src/main/res/mipmap-xhdpi/connect.png
  34. BIN
      app/src/main/res/mipmap-xhdpi/connect_round.png
  35. BIN
      app/src/main/res/mipmap-xhdpi/connectfg.png
  36. BIN
      app/src/main/res/mipmap-xxhdpi/connect.png
  37. BIN
      app/src/main/res/mipmap-xxhdpi/connect_round.png
  38. BIN
      app/src/main/res/mipmap-xxhdpi/connectfg.png
  39. BIN
      app/src/main/res/mipmap-xxxhdpi/connect.png
  40. BIN
      app/src/main/res/mipmap-xxxhdpi/connect_round.png
  41. BIN
      app/src/main/res/mipmap-xxxhdpi/connectfg.png
  42. BIN
      app/src/main/res/mipmap/ic_silent_dragon_round.png
  43. 10
      app/src/main/res/values/colors.xml
  44. 4
      app/src/main/res/values/styles.xml
  45. 4
      build.gradle
  46. 8
      gradle/wrapper/gradle-wrapper.properties

33
README.md

@ -27,3 +27,36 @@ If you're installing the APK directly, you'll need to allow `Install from untrus
You can file issues in the [issues tab](https://github.com/MyHush/SilentDragonAndroid/issues).
## Release Build Process
The first time you create a release build you'll need to create two files. The release keystore is used for app signing and a properties file is used to store sensitive information about the keystore. These files should not be committed to git. Once you have both of these files you can create a release build for the Google Play Store.
### Creating a release keystore
* With Android Studio IDE open, on the system bar click Build -> Generate Signed Bundle/APK
* Select the APK option instead of the Bundle option
* On the next screen select app as the module and click "Create new"
* Set the Key Store Name to silent_dragon_keystore.jks and the path to that of the project, create a password for the keystore path, a Key alias, and a key password. The store password and key password should be the same. Fill out some basic organization information and click Ok.
* On the next screen make sure the build variant "release" is selected and click Finish.
### Creating a properties file
Within the projects main directory create a file secrets.properties The contents of the file are below and filled in with the release keystore alias, key password, and store password from when you created the release keystore.
```
store_file_location=../silent_dragon_keystore.jks
key_alias=<alias>
key_password=<key_password>
store_password=<store_password>
```
### Building a release APK
Before creating each build you should increment the version code & version name in the build.gradle file. These must be incremented for each release otherwise the Play Store will reject the build.
To create a release build navigate to the project directory in terminal and run
`./gradlew clean assembleRelease`
This will produce an apk file in the following directory.
SilentDragonAndroid/app/build/output/apk/release/app-release.apk
This build can be directly uploaded to Google Play.

23
app/build.gradle

@ -2,19 +2,38 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream((secretsPropertiesFile)))
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "org.myhush.silentdragon"
minSdkVersion 19
targetSdkVersion 28
versionCode 6
versionName "0.3.2"
versionCode 1
versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
signingConfigs {
release {
storeFile file(secretProperties["store_file_location"])
keyAlias secretProperties["key_alias"]
keyPassword secretProperties["key_password"]
storePassword secretProperties["store_password"]
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

BIN
app/src/main/connect-web.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
app/src/main/connectimg2-web.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

7
app/src/main/java/org/myhush/silentdragon/MainActivity.kt

@ -19,11 +19,11 @@ import android.widget.Button
import android.widget.ScrollView
import android.widget.TextView
import android.widget.Toast
import org.myhush.silentdragon.DataModel.ConnectionStatus
import org.myhush.silentdragon.DataModel.connStatus
import com.beust.klaxon.Klaxon
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.content_main.*
import org.myhush.silentdragon.DataModel.ConnectionStatus
import org.myhush.silentdragon.DataModel.connStatus
import java.text.DecimalFormat
@ -104,7 +104,8 @@ class MainActivity : AppCompatActivity(),
runOnUiThread {
Log.i(TAG, "Updating UI $updateTxns")
bottomNav.menu.findItem(R.id.action_bal).isChecked = true
bottomNav.itemIconTintList = null
bottomNav.menu.findItem(R.id.action_bal)?.isChecked = true
when (connStatus) {
ConnectionStatus.DISCONNECTED -> {
setMainStatus("No Connection")

BIN
app/src/main/logo-web.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

5
app/src/main/res/color/white_text_selector.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white_selected" android:state_checked="true" />
<item android:color="@color/white_unselected" />
</selector>

BIN
app/src/main/res/drawable-hdpi/ic_send_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 B

BIN
app/src/main/res/drawable-mdpi/ic_send_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

BIN
app/src/main/res/drawable-xhdpi/ic_send_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
app/src/main/res/drawable-xxhdpi/ic_send_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
app/src/main/res/drawable-xxxhdpi/ic_send_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

5
app/src/main/res/drawable/balance_selector.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_account_balance_white_24dp" android:state_checked="true" />
<item android:drawable="@drawable/ic_account_balance_white_24dp_unselected" android:state_checked="false" />
</selector>

5
app/src/main/res/drawable/ic_account_balance_white_24dp.xml

@ -0,0 +1,5 @@
<vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M4,10v7h3v-7L4,10zM10,10v7h3v-7h-3zM2,22h19v-3L2,19v3zM16,10v7h3v-7h-3zM11.5,1L2,6v2h19L21,6l-9.5,-5z"/>
</vector>

5
app/src/main/res/drawable/ic_account_balance_white_24dp_unselected.xml

@ -0,0 +1,5 @@
<vector android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#66FFFFFF" android:pathData="M4,10v7h3v-7L4,10zM10,10v7h3v-7h-3zM2,22h19v-3L2,19v3zM16,10v7h3v-7h-3zM11.5,1L2,6v2h19L21,6l-9.5,-5z"/>
</vector>

5
app/src/main/res/drawable/ic_file_download_white_24dp.xml

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

5
app/src/main/res/drawable/ic_file_download_white_24dp_unselected.xml

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#66FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

5
app/src/main/res/drawable/ic_send_white_24dp.xml

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
</vector>

5
app/src/main/res/drawable/ic_send_white_24dp_unselected.xml

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#66FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
</vector>

18
app/src/main/res/drawable/layout_border.xml

@ -3,18 +3,18 @@
<item>
<shape
android:shape="rectangle">
<stroke android:width="1dp" android:color="#E3E3E3" />
<solid android:color="#FFF" />
<stroke android:width="1dp" android:color="#0f0" />
<solid android:color="#0ff" />
</shape>
</item>
<item android:top="1dp">
<shape
android:shape="rectangle">
<stroke android:width="1dp" android:color="#FFF" />
<solid android:color="#00000000" />
</shape>
</item>
<!-- <item android:top="1dp">-->
<!-- <shape-->
<!-- android:shape="rectangle">-->
<!-- <stroke android:width="1dp" android:color="@color/colorPrimary" />-->
<!-- <solid android:color="#00000000" />-->
<!-- </shape>-->
<!-- </item>-->
</layer-list>

5
app/src/main/res/drawable/receive_selector.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_file_download_white_24dp" android:state_checked="true" />
<item android:drawable="@drawable/ic_file_download_white_24dp_unselected" android:state_checked="false" />
</selector>

5
app/src/main/res/drawable/send_selector.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_send_white_24dp" android:state_checked="true" />
<item android:drawable="@drawable/ic_send_white_24dp_unselected" android:state_checked="false" />
</selector>

9
app/src/main/res/layout/content_main.xml

@ -95,8 +95,9 @@
android:id="@+id/layoutConnect">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content" app:srcCompat="@mipmap/connect_round"
android:layout_width="72dp"
android:layout_height="72dp"
android:src="@mipmap/ic_silent_dragon_round"
android:id="@+id/imageView5" app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
@ -134,7 +135,9 @@
android:layout_width="match_parent"
android:layout_height="0dp" app:menu="@menu/menu_nav"
android:id="@+id/bottomNav"
app:itemIconTint="@null"
app:itemTextColor="@color/white_text_selector"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintBottom_toBottomOf="parent" android:background="@drawable/layout_border"/>
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>

6
app/src/main/res/menu/menu_nav.xml

@ -5,9 +5,9 @@
<item android:id="@+id/action_send"
android:title="Send"
android:orderInCategory="300"
app:showAsAction="never" android:icon="@drawable/ic_send_icon"/>
<item android:title="Balance" android:id="@+id/action_bal" android:icon="@android:drawable/ic_dialog_dialer"
app:showAsAction="never" android:icon="@drawable/send_selector"/>
<item android:title="Balance" android:id="@+id/action_bal" android:icon="@drawable/balance_selector"
android:orderInCategory="200"/>
<item android:title="Receive" android:id="@+id/action_recieve" android:icon="@android:drawable/stat_sys_download"
<item android:title="Receive" android:id="@+id/action_recieve" android:icon="@drawable/receive_selector"
android:orderInCategory="100"/>
</menu>

5
app/src/main/res/mipmap-anydpi-v26/connect.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/connectbg"/>
<foreground android:drawable="@mipmap/connectfg"/>
</adaptive-icon>

5
app/src/main/res/mipmap-anydpi-v26/connect_round.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/connectbg"/>
<foreground android:drawable="@mipmap/connectfg"/>
</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
app/src/main/res/mipmap-hdpi/connect_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
app/src/main/res/mipmap-hdpi/connectfg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
app/src/main/res/mipmap-mdpi/connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
app/src/main/res/mipmap-mdpi/connect_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
app/src/main/res/mipmap-mdpi/connectfg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
app/src/main/res/mipmap-xhdpi/connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
app/src/main/res/mipmap-xhdpi/connect_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

BIN
app/src/main/res/mipmap-xhdpi/connectfg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
app/src/main/res/mipmap-xxhdpi/connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
app/src/main/res/mipmap-xxhdpi/connect_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

BIN
app/src/main/res/mipmap-xxhdpi/connectfg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/connect_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/connectfg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

BIN
app/src/main/res/mipmap/ic_silent_dragon_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

10
app/src/main/res/values/colors.xml

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
<color name="colorPrimary">#292B2F</color>
<color name="colorPrimaryDark">#1D1F21</color>
<color name="colorAccent">#4CD0C3</color>
<color name="windowBackground">#2F3237</color>
<color name="light_grey">#E3E3E3</color>
<color name="white_selected">#E0FFFFFF</color>
<color name="white_unselected">#66FFFFFF</color>
</resources>

4
app/src/main/res/values/styles.xml

@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@ -12,6 +12,6 @@
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark"/>
</resources>

4
build.gradle

@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.10'
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong

8
gradle/wrapper/gradle-wrapper.properties

@ -1,6 +1,6 @@
#Tue Jan 15 15:58:53 PST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
#Wed Aug 28 16:05:17 MDT 2019
distributionBase=PROJECT
distributionPath=.gradle/wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip

Loading…
Cancel
Save