Add content to the BalancesFragment, mostly copied fron the old wallet.

This commit is contained in:
Severiano Jaramillo 2018-10-30 15:27:20 -06:00
parent ad2b22a96c
commit 418c0b4ddd
13 changed files with 186 additions and 18 deletions

View file

@ -22,7 +22,7 @@ class BalancesFragment : Fragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.balances_fragment, container, false)
return inflater.inflate(R.layout.fragment_balances, container, false)
}
override fun onActivityCreated(savedInstanceState: Bundle?) {

View file

@ -22,7 +22,7 @@ class MerchantsFragment : Fragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.merchants_fragment, container, false)
return inflater.inflate(R.layout.fragment_merchants, container, false)
}
override fun onActivityCreated(savedInstanceState: Bundle?) {

View file

@ -22,7 +22,7 @@ class TransactionsFragment : Fragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.transactions_fragment, container, false)
return inflater.inflate(R.layout.fragment_transactions, container, false)
}
override fun onActivityCreated(savedInstanceState: Bundle?) {

View file

@ -0,0 +1,6 @@
<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="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="#FF000000" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1"
android:toDegrees="360" >
<shape
android:innerRadiusRatio="3"
android:shape="ring"
android:thicknessRatio="8"
android:useLevel="false" >
<size
android:height="48dip"
android:width="48dip" />
<gradient
android:centerColor="#000"
android:centerY="0.50"
android:endColor="#ff56a9c7"
android:startColor="#000"
android:type="sweep"
android:useLevel="false" />
</shape>
</rotate>

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.BalancesFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Balances"/>
</FrameLayout>

View file

@ -0,0 +1,146 @@
<ScrollView
android:id="@+id/scrollViewBalances"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:focusable="false"
android:nestedScrollingEnabled="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_horizontal_margin"
android:orientation="vertical"
android:weightSum="3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:orientation="vertical">
<LinearLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:gravity="center">
<ImageView
android:id="@+id/receivebtn"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/icon_receive"
android:visibility="visible" />
</LinearLayout>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:gravity="center"
android:src="@drawable/icon_receive"
android:visibility="gone"/>
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="Receive"/>
</LinearLayout>
<ImageView
android:id="@+id/qrCamera"
android:layout_width="0dp"
android:layout_height="75dp"
android:layout_gravity="center"
android:layout_weight="0.6"
android:src="@drawable/icon_camera"/>
<View android:id="@+id/backLine"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginLeft="-14dp"
android:layout_weight="0.3"
android:background="#dc473a"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="-31dp"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center">
<ImageView
android:id="@+id/sendbtn"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/icon_send"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Send"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:background="#BFE5F5"
android:weightSum="3">
<TextView
android:id="@+id/tvBalances"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_weight="3"
android:gravity="center_vertical"
android:text="Balances"
android:textColor="@color/black"
android:textSize="17dp"
android:textStyle="bold"/>
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:layout_marginRight="20dp"
android:indeterminateDrawable="@drawable/loader_homescreen"
android:visibility="gone"
style="?android:attr/progressBarStyleLarge">
</ProgressBar>
</LinearLayout>
<LinearLayout
android:id="@+id/llBalances"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/whiteSpaceAfterBalances"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="#FFF"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
</ScrollView>

View file

@ -4,5 +4,7 @@
<color name="colorPrimaryDark">#0071b1</color>
<color name="colorAccent">#D81B60</color>
<color name="dark">#000</color>
<color name="black">#000</color>
<color name="colorReceive">#669900</color>
<color name="colorSend">#DC473A</color>
</resources>