User Card updated

This commit is contained in:
mohamedkaif356
2023-09-25 12:45:44 +05:30
parent be78cff112
commit 8a2b0374e3
3 changed files with 68 additions and 49 deletions

View File

@@ -34,7 +34,6 @@
</provider> </provider>
<activity <activity
android:name="com.example.hposregistration.ui.activities.MainActivity" android:name="com.example.hposregistration.ui.activities.MainActivity"
android:screenOrientation="portrait"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@@ -27,8 +27,8 @@ class UserListOnlineAdapter(options: FirestoreRecyclerOptions<UserData>, private
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: OrderItemViewHolder, position: Int, model: UserData) { override fun onBindViewHolder(holder: OrderItemViewHolder, position: Int, model: UserData) {
holder.binding.apply { holder.binding.apply {
userName.text = model.name userName.text = "Name: ${model.name}"
userId.text = model._id userId.text = "User ID: ${model._id}"
Glide.with(view).load(model.userImageURL).into(userImage) Glide.with(view).load(model.userImageURL).into(userImage)
} }
} }

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/newPaperCard" android:id="@+id/userCard"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
@@ -23,38 +24,57 @@
android:id="@+id/userImage" android:id="@+id/userImage"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="100dp" android:layout_height="100dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_qr_code_scanner" />
<TextView <TextView
android:id="@+id/userName" android:id="@+id/userName"
style="@style/title1_1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/poppins_bold" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:gravity="start"
android:gravity="center"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@id/userImage" /> app:layout_constraintTop_toTopOf="@+id/userImage"
tools:text="Name: MohamedKaif" />
<TextView <TextView
android:id="@+id/userId" android:id="@+id/userId"
style="@style/title1_1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/poppins_bold" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="4dp"
android:gravity="center" android:gravity="start"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@id/userName" /> app:layout_constraintTop_toBottomOf="@id/userName"
tools:text="UserID: MohamedKaif" />
<TextView
android:id="@+id/teststatus"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/title1_1"
android:layout_marginTop="4dp"
android:layout_marginStart="16dp"
android:gravity="start"
android:textColor="@color/black"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/userImage"
app:layout_constraintTop_toBottomOf="@id/userId"
tools:text="Test Status: Completed"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>