mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 22:15:41 +03:00
list item styling
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e33870ab77
commit
ba6b88b5a9
3 changed files with 41 additions and 36 deletions
|
@ -22,17 +22,16 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout 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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="@dimen/item_height">
|
||||||
|
|
||||||
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
||||||
android:id="@+id/avatar_image_invisible"
|
android:id="@+id/avatar_image_invisible"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_width="48dp"
|
android:layout_width="@dimen/avatar_size"
|
||||||
android:layout_height="48dp"
|
android:layout_height="@dimen/avatar_size"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="@dimen/padding_between_elements"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:aiv_CornerRadius="20dp"
|
app:aiv_CornerRadius="20dp"
|
||||||
app:aiv_ShowBoarder="false"
|
app:aiv_ShowBoarder="false"
|
||||||
|
@ -40,35 +39,39 @@
|
||||||
|
|
||||||
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
||||||
android:id="@+id/avatar_image"
|
android:id="@+id/avatar_image"
|
||||||
android:layout_width="48dp"
|
android:layout_width="@dimen/avatar_size"
|
||||||
android:layout_height="48dp"
|
android:layout_height="@dimen/avatar_size"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="@dimen/padding_between_elements"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:aiv_CornerRadius="20dp"
|
app:aiv_CornerRadius="20dp"
|
||||||
app:aiv_ShowBoarder="false"
|
app:aiv_ShowBoarder="false"
|
||||||
app:aiv_TextSizeRatio="0.5"/>
|
app:aiv_TextSizeRatio="0.5"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_toEndOf="@id/avatar_image"
|
||||||
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name_text"
|
android:id="@+id/name_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignTop="@id/avatar_image"
|
android:ellipsize="middle"
|
||||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
android:singleLine="true"
|
||||||
android:layout_marginStart="@dimen/padding_between_elements"
|
android:textAppearance="?android:attr/textAppearanceListItem"/>
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
||||||
android:layout_toEndOf="@id/avatar_image"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/timestamp_text"
|
android:id="@+id/timestamp_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/name_text"
|
android:singleLine="true"
|
||||||
android:layout_toEndOf="@id/avatar_image"
|
android:textColor="?android:attr/textColorSecondary"/>
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
|
||||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
</LinearLayout>
|
||||||
android:layout_marginStart="@dimen/padding_between_elements"
|
|
||||||
android:layout_marginTop="@dimen/padding_between_elements"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -22,18 +22,17 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout 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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/item_height"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
||||||
android:id="@+id/avatar_image_invisible"
|
android:id="@+id/avatar_image_invisible"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_width="48dp"
|
android:layout_width="@dimen/avatar_size"
|
||||||
android:layout_height="48dp"
|
android:layout_height="@dimen/avatar_size"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="@dimen/padding_between_elements"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:aiv_CornerRadius="20dp"
|
app:aiv_CornerRadius="20dp"
|
||||||
app:aiv_ShowBoarder="false"
|
app:aiv_ShowBoarder="false"
|
||||||
|
@ -41,12 +40,11 @@
|
||||||
|
|
||||||
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
<cn.carbs.android.avatarimageview.library.AvatarImageView
|
||||||
android:id="@+id/avatar_image"
|
android:id="@+id/avatar_image"
|
||||||
android:layout_width="48dp"
|
android:layout_width="@dimen/avatar_size"
|
||||||
android:layout_height="48dp"
|
android:layout_height="@dimen/avatar_size"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="@dimen/padding_between_elements"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:aiv_CornerRadius="20dp"
|
app:aiv_CornerRadius="20dp"
|
||||||
app:aiv_ShowBoarder="false"
|
app:aiv_ShowBoarder="false"
|
||||||
|
@ -57,10 +55,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
android:ellipsize="end"
|
||||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:layout_marginStart="@dimen/padding_between_elements"
|
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||||
android:layout_toEndOf="@id/avatar_image"/>
|
android:layout_toEndOf="@id/avatar_image"/>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -3,11 +3,16 @@
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="item_height">72dp</dimen>
|
||||||
|
|
||||||
<dimen name="display_target_image_size">200dp</dimen>
|
<dimen name="display_target_image_size">200dp</dimen>
|
||||||
<dimen name="display_target_image_margin">24dp</dimen>
|
<dimen name="display_target_image_margin">24dp</dimen>
|
||||||
|
|
||||||
<!-- Custom transition dimensions -->
|
<!-- Custom transition dimensions -->
|
||||||
<dimen name="padding_normal">16dp</dimen>
|
<dimen name="padding_normal">16dp</dimen>
|
||||||
|
<dimen name="margin_normal">16dp</dimen>
|
||||||
<dimen name="padding_between_elements">8dp</dimen>
|
<dimen name="padding_between_elements">8dp</dimen>
|
||||||
|
<dimen name="margin_between_elements">8dp</dimen>
|
||||||
|
<dimen name="avatar_size">40dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue