Create empty SendTransactionActivity and ReceiveTransactionActivity which are called from BalancesFragment

This commit is contained in:
Severiano Jaramillo 2018-10-30 19:32:06 -06:00
parent 1693ad145d
commit b0d4c0a930
6 changed files with 68 additions and 0 deletions

View file

@ -25,6 +25,10 @@
android:name=".activities.SettingsActivity" android:name=".activities.SettingsActivity"
android:label="@string/title_settings"> android:label="@string/title_settings">
</activity> </activity>
<activity android:name=".activities.SendTransactionActivity">
</activity>
<activity android:name=".activities.ReceiveTransactionActivity">
</activity>
</application> </application>
</manifest> </manifest>

View file

@ -0,0 +1,13 @@
package cy.agorise.bitsybitshareswallet.activities
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import cy.agorise.bitsybitshareswallet.R
class ReceiveTransactionActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_receive_transaction)
}
}

View file

@ -0,0 +1,13 @@
package cy.agorise.bitsybitshareswallet.activities
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import cy.agorise.bitsybitshareswallet.R
class SendTransactionActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_send_transaction)
}
}

View file

@ -1,6 +1,7 @@
package cy.agorise.bitsybitshareswallet.fragments package cy.agorise.bitsybitshareswallet.fragments
import android.arch.lifecycle.ViewModelProviders import android.arch.lifecycle.ViewModelProviders
import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
import android.view.LayoutInflater import android.view.LayoutInflater
@ -8,7 +9,10 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import cy.agorise.bitsybitshareswallet.R import cy.agorise.bitsybitshareswallet.R
import cy.agorise.bitsybitshareswallet.activities.ReceiveTransactionActivity
import cy.agorise.bitsybitshareswallet.activities.SendTransactionActivity
import cy.agorise.bitsybitshareswallet.viewmodels.BalancesViewModel import cy.agorise.bitsybitshareswallet.viewmodels.BalancesViewModel
import kotlinx.android.synthetic.main.fragment_balances.*
class BalancesFragment : Fragment() { class BalancesFragment : Fragment() {
@ -31,4 +35,18 @@ class BalancesFragment : Fragment() {
// TODO: Use the ViewModel // TODO: Use the ViewModel
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
btnReceive.setOnClickListener {
val intent = Intent(view.context, ReceiveTransactionActivity::class.java)
startActivity(intent)
}
btnSend.setOnClickListener {
val intent = Intent(view.context, SendTransactionActivity::class.java)
startActivity(intent)
}
}
} }

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.ReceiveTransactionActivity">
</android.support.constraint.ConstraintLayout>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.SendTransactionActivity">
</android.support.constraint.ConstraintLayout>