From 79a0a5fc799c775a0074350c5e8d51ac8b4a8a11 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Tue, 30 Oct 2018 10:04:05 -0600 Subject: [PATCH] Add MainActivity's bottom status bar that shows app version, current BitShares block number, node connection status and the icon to open the Settings. --- app/build.gradle | 2 +- .../activities/MainActivity.kt | 3 ++ app/src/main/res/drawable/ic_connected.xml | 10 ++++ app/src/main/res/drawable/ic_disconnected.xml | 10 ++++ app/src/main/res/drawable/ic_settings.xml | 14 +++++ app/src/main/res/layout/activity_main.xml | 53 +++++++++++++++++++ 6 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/ic_connected.xml create mode 100644 app/src/main/res/drawable/ic_disconnected.xml create mode 100644 app/src/main/res/drawable/ic_settings.xml diff --git a/app/build.gradle b/app/build.gradle index 9cbc32d..a830c30 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { minSdkVersion 21 targetSdkVersion 28 versionCode 1 - versionName "1.0" + versionName "0.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { 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 d93fea7..b4c7747 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/MainActivity.kt @@ -8,6 +8,7 @@ import android.support.v4.app.FragmentPagerAdapter import android.os.Bundle import android.view.Menu import android.view.MenuItem +import cy.agorise.bitsybitshareswallet.BuildConfig import cy.agorise.bitsybitshareswallet.R import cy.agorise.bitsybitshareswallet.fragments.BalancesFragment import cy.agorise.bitsybitshareswallet.fragments.MerchantsFragment @@ -42,6 +43,8 @@ class MainActivity : AppCompatActivity() { // Force first tab to show BTS icon tabLayout.getTabAt(0)?.setIcon(R.drawable.tab_home_selector) + + tvBuildVersion.text = String.format("v%s", BuildConfig.VERSION_NAME) } diff --git a/app/src/main/res/drawable/ic_connected.xml b/app/src/main/res/drawable/ic_connected.xml new file mode 100644 index 0000000..800434a --- /dev/null +++ b/app/src/main/res/drawable/ic_connected.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/drawable/ic_disconnected.xml b/app/src/main/res/drawable/ic_disconnected.xml new file mode 100644 index 0000000..c3eea77 --- /dev/null +++ b/app/src/main/res/drawable/ic_disconnected.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml new file mode 100644 index 0000000..369d00b --- /dev/null +++ b/app/src/main/res/drawable/ic_settings.xml @@ -0,0 +1,14 @@ + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 10c3844..364e067 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -43,4 +43,57 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"/> + + + + + + + + + + + + \ No newline at end of file