mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-23 06:08:52 +01:00
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
|
~ You should have received a copy of the GNU General Public License
|
||||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
~ 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"
|
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"
|
||||||
@@ -33,48 +34,49 @@
|
|||||||
android:id="@+id/avatars"
|
android:id="@+id/avatars"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="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_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:layout_weight="1"
|
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
|
<presentation.common.widget.QkTextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/snippet"
|
||||||
android:layout_height="wrap_content">
|
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
|
<presentation.common.widget.QkTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/date"
|
||||||
style="@style/TextPrimary"
|
style="@style/TextTertiary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginStart="16dp"
|
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||||
android:layout_weight="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="@tools:sample/full_names" />
|
app:layout_constraintHorizontal_bias="100"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/title"
|
||||||
|
tools:text="Oct 11" />
|
||||||
|
|
||||||
<presentation.common.widget.QkTextView
|
</android.support.constraint.ConstraintLayout>
|
||||||
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>
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
~ You should have received a copy of the GNU General Public License
|
~ You should have received a copy of the GNU General Public License
|
||||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
~ 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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -34,53 +34,53 @@
|
|||||||
android:id="@+id/avatars"
|
android:id="@+id/avatars"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="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_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:layout_weight="1"
|
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
|
<presentation.common.widget.QkTextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/snippet"
|
||||||
android:layout_height="wrap_content">
|
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
|
<presentation.common.widget.QkTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/date"
|
||||||
style="@style/TextPrimary"
|
style="@style/TextTertiary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginStart="16dp"
|
android:textStyle="bold"
|
||||||
android:layout_weight="1"
|
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||||
android:textStyle="bold"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="Moez Bhatti" />
|
app:layout_constraintHorizontal_bias="100"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/title"
|
||||||
|
app:textColor="primary"
|
||||||
|
tools:text="Oct 11" />
|
||||||
|
|
||||||
<presentation.common.widget.QkTextView
|
</android.support.constraint.ConstraintLayout>
|
||||||
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>
|
|
||||||
Reference in New Issue
Block a user