mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 23:50:02 +00:00
new layout
This commit is contained in:
parent
80a7e234ac
commit
028b8b79b6
2 changed files with 47 additions and 4 deletions
|
@ -56,7 +56,7 @@ public class SubaddressAdapter extends RecyclerView.Adapter<SubaddressAdapter.Vi
|
|||
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
||||
// Create a new view, which defines the UI of the list item
|
||||
View view = LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(R.layout.utxo_selection_item, viewGroup, false);
|
||||
.inflate(R.layout.address_item, viewGroup, false);
|
||||
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
@ -89,9 +89,8 @@ public class SubaddressAdapter extends RecyclerView.Adapter<SubaddressAdapter.Vi
|
|||
}
|
||||
|
||||
public void bind(Subaddress subaddress) {
|
||||
TextView pubKeyTextView = itemView.findViewById(R.id.utxo_pub_key_textview);
|
||||
pubKeyTextView.setText(subaddress.getAddress());
|
||||
|
||||
TextView addressTextView = itemView.findViewById(R.id.address_item_address_textview);
|
||||
addressTextView.setText(subaddress.getAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
44
app/src/main/res/layout/address_item.xml
Normal file
44
app/src/main/res/layout/address_item.xml
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.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="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
<TextView
|
||||
android:id="@+id/address_item_address_textview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Address"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/address_item_amount_textview"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<TextView
|
||||
android:id="@+id/address_item_amount_textview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Amount"
|
||||
android:textStyle="bold"
|
||||
android:ellipsize="middle"
|
||||
app:layout_constraintTop_toBottomOf="@id/address_item_address_textview"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/address_item_index_textview"
|
||||
android:singleLine="true" />
|
||||
<TextView
|
||||
android:id="@+id/address_item_index_textview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Idx"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="end"
|
||||
app:layout_constraintTop_toBottomOf="@id/address_item_address_textview"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/address_item_amount_textview"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:singleLine="true" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in a new issue