mirror of
https://github.com/DanielPollithy/flashwifi.git
synced 2025-10-16 11:45:32 +00:00
Withdraw Initial UI
Basic Withdraw from wallet UI creation
This commit is contained in:
parent
01646644d1
commit
0a2b4c6326
@ -109,7 +109,7 @@ public class MainActivity extends AppCompatActivity
|
||||
} else if (id == R.id.nav_fund) {
|
||||
startFundWalletFragment();
|
||||
} else if (id == R.id.nav_withdraw) {
|
||||
|
||||
startWithdrawWalletFragment();
|
||||
} else if (id == R.id.nav_conditions) {
|
||||
|
||||
} else if (id == R.id.nav_settings) {
|
||||
@ -167,4 +167,18 @@ public class MainActivity extends AppCompatActivity
|
||||
.commit();
|
||||
}
|
||||
|
||||
}
|
||||
private void startWithdrawWalletFragment() {
|
||||
Fragment fragment = new WithdrawWalletFragment();
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("seed", seed);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setRetainInstance(true);
|
||||
|
||||
// Insert the fragment by replacing any existing fragment
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.content_frame, fragment)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.flashwifi.wifip2p;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link WithdrawWalletFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class WithdrawWalletFragment extends Fragment {
|
||||
|
||||
private String seed;
|
||||
|
||||
public WithdrawWalletFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @return A new instance of fragment WithdrawWalletFragment.
|
||||
*/
|
||||
|
||||
public static WithdrawWalletFragment newInstance() {
|
||||
WithdrawWalletFragment fragment = new WithdrawWalletFragment();
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Bundle bundle = this.getArguments();
|
||||
if (bundle != null) {
|
||||
seed = bundle.getString("seed");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_withdraw_wallet, container, false);
|
||||
}
|
||||
}
|
||||
8
app/src/main/res/drawable/qrcode_scan.xml
Normal file
8
app/src/main/res/drawable/qrcode_scan.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- drawable/qrcode-scan.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#000" android:pathData="M4,4H10V10H4V4M20,4V10H14V4H20M14,15H16V13H14V11H16V13H18V11H20V13H18V15H20V18H18V20H16V18H13V20H11V16H14V15M16,15V18H18V15H16M4,20V14H10V20H4M6,6V8H8V6H6M16,6V8H18V6H16M6,16V18H8V16H6M4,11H6V13H4V11M9,11H13V15H11V13H9V11M11,6H13V10H11V6M2,2V6H0V2A2,2 0 0,1 2,0H6V2H2M22,0A2,2 0 0,1 24,2V6H22V2H18V0H22M2,18V22H6V24H2A2,2 0 0,1 0,22V18H2M22,22V18H24V22A2,2 0 0,1 22,24H18V22H22Z" />
|
||||
</vector>
|
||||
203
app/src/main/res/layout/fragment_withdraw_wallet.xml
Normal file
203
app/src/main/res/layout/fragment_withdraw_wallet.xml
Normal file
@ -0,0 +1,203 @@
|
||||
<ScrollView 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"
|
||||
android:fillViewport="true"
|
||||
tools:context="com.flashwifi.wifip2p.WithdrawWalletFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#0D47A1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/WithdrawWalletBalanceLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="#0D47A1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/WithdarWalletBalanceLabel"
|
||||
android:textColor="#ffffff"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/WithdrawWalletBalanceValue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="#0D47A1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="40dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="0 i"
|
||||
android:textColor="#ffffff"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#1365E5"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/WithdrawWalletTransferLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="#1365E5"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/WithdrawWalletTransferLabel"
|
||||
android:textColor="#ffffff"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/WithdrawWalletQRScannerButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|center_vertical"
|
||||
android:background="#1365E5"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/QRScannerDescription"
|
||||
android:focusable="true"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:src="@drawable/qrcode_scan"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:tint="#ffffff" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#1570FF"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Address"
|
||||
android:inputType="textPersonName"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="Amount"
|
||||
android:inputType="number"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/FundWalletBalanceValue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="i"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Message (optional, A-Z and 9 only)"
|
||||
android:inputType="textPersonName"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Tag (optional, A-Z and 9 only)"
|
||||
android:inputType="textPersonName"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#1570FF">
|
||||
|
||||
<Button
|
||||
android:id="@+id/FloatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="#051c40"
|
||||
android:clickable="true"
|
||||
android:elevation="10dp"
|
||||
android:focusable="true"
|
||||
android:text=">"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -47,4 +47,9 @@
|
||||
<string name="FundWalletBalanceLabel">ACCOUNT BLANCE: </string>
|
||||
<string name="FundWalletQRCodeLabel">QR CODE: </string>
|
||||
|
||||
<!-- Withdar Wallet Fragment -->
|
||||
<string name="WithdarWalletBalanceLabel">ACCOUNT BLANCE: </string>
|
||||
<string name="WithdrawWalletTransferLabel">NEW TRANSFER: </string>
|
||||
<string name="QRScannerDescription">QR Code Scanner</string>
|
||||
|
||||
</resources>
|
||||
Loading…
Reference in New Issue
Block a user