From 2ae5656c5ce6a97e230540f0ab56623feb689fdc Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Mon, 29 Oct 2018 20:30:53 -0600 Subject: [PATCH] Created MainActivity's Tabs with the first tab having the bitshares logo and the other two their corresponding text names. --- app/build.gradle | 2 +- .../ExampleInstrumentedTest.kt | 4 +- app/src/main/AndroidManifest.xml | 2 +- .../activities/MainActivity.kt | 22 ++++++--- app/src/main/res/layout/activity_main.xml | 45 ++++++------------- app/src/main/res/menu/menu_main.xml | 2 +- .../ExampleUnitTest.kt | 2 +- 7 files changed, 34 insertions(+), 45 deletions(-) rename app/src/androidTest/java/cy/agorise/{bitsywallet => bitsybitshareswallet}/ExampleInstrumentedTest.kt (81%) rename app/src/main/java/cy/agorise/{bitsywallet => bitsybitshareswallet}/activities/MainActivity.kt (88%) rename app/src/test/java/cy/agorise/{bitsywallet => bitsybitshareswallet}/ExampleUnitTest.kt (88%) diff --git a/app/build.gradle b/app/build.gradle index bd21692..6fa24b9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 28 defaultConfig { - applicationId "cy.agorise.bitsywallet" + applicationId "cy.agorise.bitsybitshareswallet" minSdkVersion 21 targetSdkVersion 28 versionCode 1 diff --git a/app/src/androidTest/java/cy/agorise/bitsywallet/ExampleInstrumentedTest.kt b/app/src/androidTest/java/cy/agorise/bitsybitshareswallet/ExampleInstrumentedTest.kt similarity index 81% rename from app/src/androidTest/java/cy/agorise/bitsywallet/ExampleInstrumentedTest.kt rename to app/src/androidTest/java/cy/agorise/bitsybitshareswallet/ExampleInstrumentedTest.kt index 5c28fe1..c4aebfd 100644 --- a/app/src/androidTest/java/cy/agorise/bitsywallet/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/cy/agorise/bitsybitshareswallet/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package cy.agorise.bitsywallet +package cy.agorise.bitsybitshareswallet import android.support.test.InstrumentationRegistry import android.support.test.runner.AndroidJUnit4 @@ -19,6 +19,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getTargetContext() - assertEquals("cy.agorise.bitsywallet", appContext.packageName) + assertEquals("cy.agorise.bitsybitshareswallet", appContext.packageName) } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 70ffedf..a3b1ec3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools" package="cy.agorise.bitsybitshareswallet"> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) @@ -89,6 +89,14 @@ class MainActivity : AppCompatActivity() { // Show 3 total pages. return 3 } + + override fun getPageTitle(position: Int): CharSequence? { + return when (position) { + 0 -> "" + 1 -> "Transactions" + else -> "Merchants" + } + } } /** diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d2636e9..7389f67 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -16,46 +16,27 @@ android:paddingTop="@dimen/appbar_padding_top" android:theme="@style/AppTheme.AppBarOverlay"> - + + + + + + + + + - + + android:layout_height="wrap_content" /> - - - - - - - diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 4994849..0af865e 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -1,7 +1,7 @@ + tools:context="cy.agorise.bitsybitshareswallet.activities.MainActivity">