forked from upstream-mirrors/quik
Use ConstraintLayout for conversation list item
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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="wrap_content"
|
||||
@@ -33,48 +34,49 @@
|
||||
android:id="@+id/avatars"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="top" />
|
||||
android:layout_gravity="top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0" />
|
||||
|
||||
<LinearLayout
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
app:layout_constraintBottom_toTopOf="@id/snippet"
|
||||
app:layout_constraintStart_toEndOf="@id/avatars"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/snippet"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/title"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextTertiary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="100"
|
||||
app:layout_constraintStart_toEndOf="@id/title"
|
||||
tools:text="Oct 11" />
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextTertiary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Oct 11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/snippet"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
@@ -17,7 +17,7 @@
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
@@ -34,53 +34,53 @@
|
||||
android:id="@+id/avatars"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="top" />
|
||||
android:layout_gravity="top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0" />
|
||||
|
||||
<LinearLayout
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/snippet"
|
||||
app:layout_constraintStart_toEndOf="@id/avatars"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/snippet"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/title"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
app:textColor="primary"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:textStyle="bold"
|
||||
tools:text="Moez Bhatti" />
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextTertiary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="100"
|
||||
app:layout_constraintStart_toEndOf="@id/title"
|
||||
app:textColor="primary"
|
||||
tools:text="Oct 11" />
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextTertiary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
app:textColor="primary"
|
||||
tools:text="Oct 11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<presentation.common.widget.QkTextView
|
||||
android:id="@+id/snippet"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:textStyle="bold"
|
||||
app:textColor="primary"
|
||||
tools:text="Hey! How's it going?" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
Reference in New Issue
Block a user