add beginnings of new messages tab

This commit is contained in:
geeksville 2020-04-08 16:49:27 -07:00
parent 4074674c41
commit e157bb0140
7 changed files with 302 additions and 126 deletions

View file

@ -9,25 +9,46 @@
style="@style/Widget.App.CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:contentPadding="5dp">
android:layout_margin="8dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:contentDescription="@string/user_avatar"
android:scaleType="center"
android:scaleX="1.5"
android:scaleY="1.5"
app:layout_constraintEnd_toEndOf="@+id/distance_view"
app:layout_constraintStart_toStartOf="@+id/distance_view"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_twotone_person_24" />
<TextView
android:id="@+id/nodeNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="8dp"
android:text="@string/unknown_username"
app:layout_constraintStart_toEndOf="@+id/distance_view"
app:layout_constraintTop_toTopOf="@+id/imageView" />
<TextView
android:id="@+id/distance_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:text="@string/sample_distance"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View file

@ -0,0 +1,19 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/messageListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -9,4 +9,6 @@
<string name="connection_status">Connection status</string>
<string name="application_icon">application icon</string>
<string name="unknown_username">Unknown Username</string>
<string name="user_avatar">User avatar</string>
<string name="sample_distance">2.13 km</string>
</resources>