Merge branch 'features/search' into develop
This commit is contained in:
commit
f9801997f5
Binary file not shown.
|
@ -40,7 +40,9 @@
|
|||
<activity android:name="monnethic.mobile.transaction.ApprovePayementActivity" />
|
||||
<activity android:name="monnethic.mobile.wallet.HomeWalletActivity" />
|
||||
<activity android:name="monnethic.mobile.wallet.CreateWalletActivity" />
|
||||
<activity android:name="monnethic.mobile.wallet.SelectWalletActivity"></activity>
|
||||
<activity android:name="monnethic.mobile.wallet.SelectWalletActivity" />
|
||||
<activity android:name="monnethic.mobile.search.SearchUser" />
|
||||
<activity android:name="monnethic.mobile.search.DisplayWalletSearch"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -2,8 +2,8 @@ package monnethic.mobile.restApi;
|
|||
|
||||
public class Config {
|
||||
//BASE
|
||||
static private String BASE_URL = "http://37.187.101.44:10053/";
|
||||
//static private String BASE_URL = "http://10.0.2.2:10053/";
|
||||
//static private String BASE_URL = "http://37.187.101.44:10053/";
|
||||
static private String BASE_URL = "http://10.0.2.2:10053/";
|
||||
//static private String BASE_URL = "http://localhost:10053/";
|
||||
static private String BASE_URL_USER = BASE_URL+"api/rest/user/";
|
||||
static private String BASE_URL_TRANSACTION = BASE_URL+"api/rest/transaction/";
|
||||
|
@ -13,6 +13,10 @@ public class Config {
|
|||
static public String USER_LOGIN = BASE_URL_USER+"login";
|
||||
static public String USER_REGISTER = BASE_URL_USER+"register";
|
||||
static public String USER_GET = BASE_URL_USER+"get";
|
||||
//Search
|
||||
static public String FIND_BY_EMAIL= BASE_URL_USER+"findByEmail";
|
||||
static public String FIND_BY_PHONE = BASE_URL_USER+"findByPhone";
|
||||
static public String FIND_BY_EMAIL_AND_PHONE = BASE_URL_USER+"findByEmailAndPhone";
|
||||
|
||||
//TRANSACTION
|
||||
static public String TRANSACTION_SEND = BASE_URL_TRANSACTION+"send";
|
||||
|
|
|
@ -85,4 +85,37 @@ public class UserApiHandler {
|
|||
return response;
|
||||
}
|
||||
|
||||
|
||||
public User getUser(int method, String email, String phone){
|
||||
HttpCallHandler httpCallHandler = new HttpCallHandler();
|
||||
User returnUser = new User();
|
||||
try{
|
||||
String responseCall="";
|
||||
if(method==1){
|
||||
String url = Config.FIND_BY_EMAIL+"?email="+email;
|
||||
responseCall = httpCallHandler.getHttp(new URL(url));
|
||||
}else if(method==2){
|
||||
String url = Config.FIND_BY_PHONE+"?phone="+phone;
|
||||
responseCall = httpCallHandler.getHttp(new URL(url));
|
||||
} else {
|
||||
String url = Config.FIND_BY_EMAIL_AND_PHONE+"?email="+email+"&phone="+phone;
|
||||
responseCall = httpCallHandler.getHttp(new URL(url));
|
||||
}
|
||||
|
||||
if(responseCall!=""){
|
||||
JSONObject jsonObject = new JSONObject(responseCall);
|
||||
returnUser.setName(jsonObject.getString("name"));
|
||||
returnUser.setFirstname(jsonObject.getString("firstname"));
|
||||
returnUser.setUser_hash(jsonObject.getString("user_hash"));
|
||||
|
||||
return returnUser;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
40
app/src/main/java/monnethic/mobile/search/DisplayWallet.java
Normal file
40
app/src/main/java/monnethic/mobile/search/DisplayWallet.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package monnethic.mobile.search;
|
||||
|
||||
public class DisplayWallet {
|
||||
private String user_name;
|
||||
private String user_firstname;
|
||||
private String wallet_hash;
|
||||
|
||||
public DisplayWallet() {
|
||||
}
|
||||
|
||||
public DisplayWallet(String user_name, String user_firstname, String wallet_hash) {
|
||||
this.user_name = user_name;
|
||||
this.user_firstname = user_firstname;
|
||||
this.wallet_hash = wallet_hash;
|
||||
}
|
||||
|
||||
public String getUser_name() {
|
||||
return user_name;
|
||||
}
|
||||
|
||||
public void setUser_name(String user_name) {
|
||||
this.user_name = user_name;
|
||||
}
|
||||
|
||||
public String getUser_firstname() {
|
||||
return user_firstname;
|
||||
}
|
||||
|
||||
public void setUser_firstname(String user_firstname) {
|
||||
this.user_firstname = user_firstname;
|
||||
}
|
||||
|
||||
public String getWallet_hash() {
|
||||
return wallet_hash;
|
||||
}
|
||||
|
||||
public void setWallet_hash(String wallet_hash) {
|
||||
this.wallet_hash = wallet_hash;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package monnethic.mobile.search;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.monnthic.monnethicmobile.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DisplayWalletAdapter extends ArrayAdapter<DisplayWallet> {
|
||||
public DisplayWalletAdapter(Context context, ArrayList<DisplayWallet> dWallets){
|
||||
super(context,0,dWallets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
DisplayWallet dWallet = getItem(position);
|
||||
|
||||
if(convertView == null){
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.wallet_search_template, parent, false);
|
||||
}
|
||||
|
||||
TextView user_name = convertView.findViewById(R.id.userNameSearch);
|
||||
TextView wallet_hash = convertView.findViewById(R.id.walletHashSearch);
|
||||
|
||||
ViewGroup.LayoutParams params = convertView.getLayoutParams();
|
||||
params.height = 300;
|
||||
convertView.setLayoutParams(params);
|
||||
|
||||
String userFullName = dWallet.getUser_name()+" "+dWallet.getUser_firstname();
|
||||
user_name.setText(userFullName);
|
||||
wallet_hash.setText(dWallet.getWallet_hash());
|
||||
|
||||
return convertView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package monnethic.mobile.search;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.example.monnthic.monnethicmobile.R;
|
||||
import java.util.ArrayList;
|
||||
import monnethic.mobile.restApi.WalletApiHandler;
|
||||
import monnethic.mobile.wallet.Wallet;
|
||||
|
||||
public class DisplayWalletSearch extends AppCompatActivity {
|
||||
private ArrayList<Wallet> userWallets;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_display_wallet_search);
|
||||
|
||||
ListView listView = (ListView) findViewById(R.id.listViewWalletSearch);
|
||||
Intent intent = getIntent();
|
||||
String user_name = intent.getStringExtra("user_name");
|
||||
String user_firstname = intent.getStringExtra("user_firstname");
|
||||
String user_hash = intent.getStringExtra("user_hash");
|
||||
|
||||
try {
|
||||
userWallets = new SearchWalletTask().execute(user_hash).get();
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ArrayList<DisplayWallet> displayWallets = new ArrayList<>();
|
||||
for(Wallet w : userWallets){
|
||||
displayWallets.add(new DisplayWallet(user_name,user_firstname,w.getWallet_hash()));
|
||||
}
|
||||
DisplayWalletAdapter adapter = new DisplayWalletAdapter(this,displayWallets);
|
||||
listView.setAdapter(adapter);
|
||||
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
DisplayWallet dW = (DisplayWallet) listView.getItemAtPosition(i);
|
||||
Intent intent1 = new Intent();
|
||||
intent1.putExtra("walletHash",dW.getWallet_hash());
|
||||
setResult(1,intent1);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private class SearchWalletTask extends AsyncTask<String,String,ArrayList<Wallet>> {
|
||||
@Override
|
||||
protected ArrayList<Wallet> doInBackground(String... strings) {
|
||||
ArrayList<Wallet> walletsList = new ArrayList<>();
|
||||
try{
|
||||
WalletApiHandler walletApiHandler = new WalletApiHandler();
|
||||
walletsList = walletApiHandler.getUserWallets(strings);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return walletsList;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
118
app/src/main/java/monnethic/mobile/search/SearchUser.java
Normal file
118
app/src/main/java/monnethic/mobile/search/SearchUser.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
package monnethic.mobile.search;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.monnthic.monnethicmobile.R;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.j256.ormlite.stmt.query.In;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import monnethic.mobile.database.User;
|
||||
import monnethic.mobile.homepage.InputController;
|
||||
import monnethic.mobile.restApi.UserApiHandler;
|
||||
import monnethic.mobile.restApi.WalletApiHandler;
|
||||
import monnethic.mobile.wallet.Wallet;
|
||||
|
||||
public class SearchUser extends AppCompatActivity {
|
||||
EditText emailAddress;
|
||||
EditText phoneNumber;
|
||||
Button buttonCancel;
|
||||
Button buttonOk;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search_user);
|
||||
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView(){
|
||||
emailAddress = findViewById(R.id.inputEmailSearch);
|
||||
phoneNumber = findViewById(R.id.inputPhoneSearch);
|
||||
buttonCancel = findViewById(R.id.buttonCancelSearch);
|
||||
buttonOk = findViewById(R.id.buttonOkSearch);
|
||||
|
||||
buttonCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
setResult(2);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
buttonOk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
search();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void search(){
|
||||
String uEmail = emailAddress.getText().toString();
|
||||
String uPhone = phoneNumber.getText().toString();
|
||||
|
||||
if(InputController.isEmptyEdit(emailAddress) && InputController.isEmptyEdit(phoneNumber)){
|
||||
Toast.makeText(this, "Enter an email or phone number", Toast.LENGTH_SHORT).show();
|
||||
} else if(InputController.isEmptyEdit(emailAddress)){
|
||||
new SearchUserTask(this).execute(null,uPhone);
|
||||
} else if(InputController.isEmptyEdit(phoneNumber)){
|
||||
new SearchUserTask(this).execute(uEmail,null);
|
||||
} else {
|
||||
new SearchUserTask(this).execute(uEmail,uPhone);
|
||||
}
|
||||
}
|
||||
|
||||
private class SearchUserTask extends AsyncTask<String,Void,User> {
|
||||
Context mContext;
|
||||
private SearchUserTask(final Context context){mContext=context;}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(User user) {
|
||||
try{
|
||||
Intent displayWalletIntent = new Intent(SearchUser.this, DisplayWalletSearch.class);
|
||||
displayWalletIntent.putExtra("user_name",user.getName());
|
||||
displayWalletIntent.putExtra("user_firstname",user.getFirstname());
|
||||
displayWalletIntent.putExtra("user_hash",user.getUser_hash());
|
||||
displayWalletIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
|
||||
SearchUser.this.startActivity(displayWalletIntent);
|
||||
finish();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected User doInBackground(String... strings) {
|
||||
try {
|
||||
UserApiHandler userApiHandler = new UserApiHandler();
|
||||
User u = new User();
|
||||
if(strings[0]!=null && strings[1]==null){
|
||||
u = userApiHandler.getUser(1,strings[0],null);
|
||||
} else if(strings[0]==null && strings[1]!=null){
|
||||
u = userApiHandler.getUser(2,null,strings[1]);
|
||||
} else {
|
||||
u = userApiHandler.getUser(3,strings[0],strings[1]);
|
||||
}
|
||||
return u;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -13,6 +13,7 @@ import com.example.monnthic.monnethicmobile.R;
|
|||
|
||||
import monnethic.mobile.homepage.InputController;
|
||||
import monnethic.mobile.restApi.TransactionApiHandler;
|
||||
import monnethic.mobile.search.SearchUser;
|
||||
|
||||
public class TransactionActivity extends AppCompatActivity {
|
||||
private String wallet_hash;
|
||||
|
@ -30,6 +31,7 @@ public class TransactionActivity extends AppCompatActivity {
|
|||
amountEditText = findViewById(R.id.amount);
|
||||
Button buttonCancel = findViewById(R.id.btn_cancel);
|
||||
Button buttonOk = findViewById(R.id.btn_send);
|
||||
Button buttonSearch = findViewById(R.id.buttonSearch);
|
||||
|
||||
Intent intent = getIntent();
|
||||
user_hash = intent.getStringExtra("USER_HASH");
|
||||
|
@ -55,6 +57,14 @@ public class TransactionActivity extends AppCompatActivity {
|
|||
sendTransaction();
|
||||
}
|
||||
});
|
||||
|
||||
buttonSearch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
launchSearchActivity();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void sendTransaction(){
|
||||
|
@ -86,6 +96,20 @@ public class TransactionActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
public void launchSearchActivity(){
|
||||
Intent searchIntent = new Intent(TransactionActivity.this, SearchUser.class);
|
||||
startActivityForResult(searchIntent,1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data){
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(requestCode==1){
|
||||
String walletHash = data.getStringExtra("walletHash");
|
||||
addressDestination.setText(walletHash);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop(); // Always call the superclass method first
|
||||
|
|
23
app/src/main/res/layout/activity_display_wallet_search.xml
Normal file
23
app/src/main/res/layout/activity_display_wallet_search.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="monnethic.mobile.search.DisplayWalletSearch">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:fillViewport="true">
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listViewWalletSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:dividerHeight="5dp" />
|
||||
</ScrollView>
|
||||
</android.support.constraint.ConstraintLayout>
|
80
app/src/main/res/layout/activity_search_user.xml
Normal file
80
app/src/main/res/layout/activity_search_user.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SEARCH"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/inputEmailSearch"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView9"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:ems="10"
|
||||
android:hint="Email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:singleLine="false" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/inputPhoneSearch"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/inputEmailSearch"
|
||||
android:layout_alignStart="@+id/inputEmailSearch"
|
||||
android:layout_marginTop="30dp"
|
||||
android:ems="10"
|
||||
android:hint="Phone"
|
||||
android:inputType="phone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="40dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonOkSearch"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="65dp"
|
||||
android:text="OK" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonCancelSearch"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="65dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:text="Cancel" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,66 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/destination_address"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/buttonSearch"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:ems="10"
|
||||
android:hint="Destination address"
|
||||
android:singleLine="false"
|
||||
android:inputType="text" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_above="@+id/amount"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="Search" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/amount"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Amount"
|
||||
android:inputType="numberDecimal" />
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="40dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@+id/amount"
|
||||
android:layout_below="@+id/amount"
|
||||
android:layout_marginTop="77dp"
|
||||
android:text="SEND"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_cancel"
|
||||
app:layout_constraintHorizontal_bias="0.543"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="67dp"
|
||||
android:text="SEND" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@+id/btn_send"
|
||||
android:layout_alignBottom="@+id/btn_send"
|
||||
android:layout_alignStart="@+id/amount"
|
||||
android:text="CANCEL"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="67dp"
|
||||
android:text="CANCEL" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:ems="10"
|
||||
android:hint="Amount"
|
||||
android:inputType="numberDecimal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.503"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/destination_address" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/destination_address"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/amount"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="67dp"
|
||||
android:ems="10"
|
||||
android:hint="Destination address"
|
||||
android:inputType="text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
69
app/src/main/res/layout/wallet_search_template.xml
Normal file
69
app/src/main/res/layout/wallet_search_template.xml
Normal file
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/userNameSearch"
|
||||
android:layout_marginEnd="-85dp"
|
||||
android:layout_toStartOf="@+id/walletHashSearch"
|
||||
android:text="User :"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@+id/textView"
|
||||
android:layout_alignTop="@+id/walletHashSearch"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:text="Wallet :"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userNameSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@+id/walletHashSearch"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:text="u_n"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/walletHashSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginTop="39dp"
|
||||
android:singleLine="false"
|
||||
android:text="w_h"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in a new issue