update app mobile

This commit is contained in:
GME 2019-06-10 19:51:14 +02:00
parent 1c5dc15db3
commit 8248d5dd0b
4 changed files with 63 additions and 27 deletions

View file

@ -4,6 +4,7 @@ public class DisplayWallet {
private String user_name;
private String user_firstname;
private String wallet_hash;
private String wallet_id;
public DisplayWallet() {
}
@ -14,6 +15,13 @@ public class DisplayWallet {
this.wallet_hash = wallet_hash;
}
public DisplayWallet(String user_name, String user_firstname, String wallet_hash, String wallet_id) {
this.user_name = user_name;
this.user_firstname = user_firstname;
this.wallet_hash = wallet_hash;
this.wallet_id = wallet_id;
}
public String getUser_name() {
return user_name;
}
@ -37,4 +45,7 @@ public class DisplayWallet {
public void setWallet_hash(String wallet_hash) {
this.wallet_hash = wallet_hash;
}
public String getWallet_id(){return wallet_id;}
public void setWallet_id(String wallet_id){this.wallet_id=wallet_id;}
}

View file

@ -26,14 +26,16 @@ public class DisplayWalletAdapter extends ArrayAdapter<DisplayWallet> {
TextView user_name = convertView.findViewById(R.id.userNameSearch);
TextView wallet_hash = convertView.findViewById(R.id.walletHashSearch);
TextView wallet_id = convertView.findViewById(R.id.walletIdSearch);
ViewGroup.LayoutParams params = convertView.getLayoutParams();
params.height = 300;
//params.height = 400;
convertView.setLayoutParams(params);
String userFullName = dWallet.getUser_name()+" "+dWallet.getUser_firstname();
user_name.setText(userFullName);
wallet_hash.setText(dWallet.getWallet_hash());
wallet_id.setText(dWallet.getWallet_id());
return convertView;
}

View file

@ -38,7 +38,7 @@ public class DisplayWalletSearch extends AppCompatActivity {
ArrayList<DisplayWallet> displayWallets = new ArrayList<>();
for(Wallet w : userWallets){
displayWallets.add(new DisplayWallet(user_name,user_firstname,w.getWallet_hash()));
displayWallets.add(new DisplayWallet(user_name,user_firstname,w.getWallet_hash(),w.getType()));
}
DisplayWalletAdapter adapter = new DisplayWalletAdapter(this,displayWallets);
listView.setAdapter(adapter);

View file

@ -11,58 +11,81 @@
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<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:layout_marginStart="25dp"
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:layout_marginStart="10dp"
android:text="u_n"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:text="Wallet :"
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:layout_marginStart="10dp"
android:singleLine="false"
android:text="w_h"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
</RelativeLayout>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:text="Wallet type :"
android:textSize="12sp" />
<TextView
android:id="@+id/walletIdSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:layout_marginStart="10dp"
android:text="w_id"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>