Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7a2c8bd authored by Anna Zappone's avatar Anna Zappone Committed by Android (Google) Code Review
Browse files

Merge "Implement 2x2 layout and text resizing" into sc-dev

parents e446e84b ac9e0f91
Loading
Loading
Loading
Loading
+67 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/item"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:gravity="center"
        android:background="@drawable/people_space_tile_view_card"
        android:orientation="vertical"
        android:paddingHorizontal="16dp"
        android:paddingVertical="16dp">

        <ImageView
            android:id="@+id/person_icon"
            android:layout_gravity="center"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/name"
            android:layout_gravity="center"
            android:paddingTop="14dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:singleLine="true"
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="16sp" />
        <TextView
            android:id="@+id/last_interaction"
            android:layout_gravity="center"
            android:text="@string/empty_status"
            android:textColor="?android:attr/textColorSecondary"
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
            android:textSize="14sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:singleLine="true"/>
        <ImageView
            android:id="@+id/availability"
            android:layout_gravity="center"
            android:layout_width="10dp"
            android:layout_height="26dp"
            android:paddingTop="16dp"
            android:background="@drawable/circle_green_10dp"/>
    </LinearLayout>
</FrameLayout>
 No newline at end of file
+109 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
 ~ Copyright (C) 2021 The Android Open Source Project
 ~
 ~ Licensed under the Apache License, Version 2.0 (the "License");
 ~ you may not use this file except in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~      http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing, software
 ~ distributed under the License is distributed on an "AS IS" BASIS,
 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ~ See the License for the specific language governing permissions and
 ~ limitations under the License.
 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/item"
    android:background="@drawable/people_space_tile_view_card"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:padding="16dp"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start|top"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/person_icon"
            android:layout_marginStart="-2dp"
            android:layout_marginTop="-2dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

        <ImageView
            android:id="@+id/availability"
            android:layout_marginStart="-2dp"
            android:layout_width="10dp"
            android:layout_height="10dp"
            android:background="@drawable/circle_green_10dp" />
    </LinearLayout>

    <TextView
        android:layout_gravity="center"
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="12dp"
        android:gravity="start"
        android:singleLine="true"
        android:ellipsize="end"
        android:text="@string/empty_user_name"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="14sp" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="4dp"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/predefined_icon"
            android:gravity="start|center_vertical"
            android:paddingEnd="6dp"
            android:layout_width="24dp"
            android:layout_height="18dp" />

        <TextView
            android:layout_gravity="center"
            android:id="@+id/subtext"
            android:gravity="center_vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:singleLine="true"
            android:text="@string/empty_user_name"
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
            android:textColor="?android:attr/textColorSecondary"
            android:textSize="12sp" />
    </LinearLayout>

    <ImageView
        android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/people_space_content_background"
        android:gravity="center"
        android:scaleType="centerCrop" />

    <TextView
        android:layout_gravity="center"
        android:id="@+id/text_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="2"
        android:singleLine="false"
        android:text="@string/empty_status"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="12sp" />
</LinearLayout>
+4 −3
Original line number Diff line number Diff line
@@ -35,16 +35,17 @@
            android:layout_height="match_parent">
            <ImageView
                android:id="@+id/person_icon"
                android:layout_width="60dp"
                android:layout_height="60dp"/>
                android:layout_width="64dp"
                android:layout_height="64dp"/>
            <ImageView
                android:id="@+id/availability"
                android:layout_marginStart="-2dp"
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:background="@drawable/circle_green_10dp"/>
            <LinearLayout
                android:orientation="vertical"
                android:paddingStart="4dp"
                android:paddingStart="6dp"
                android:gravity="top"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
+40 −32
Original line number Diff line number Diff line
@@ -27,28 +27,37 @@
        android:layout_gravity="center"
        android:padding="8dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        android:layout_height="match_parent">

        <LinearLayout
            android:orientation="horizontal"
            android:gravity="top"
            android:layout_weight="1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            android:layout_height="0dp">

            <ImageView
                android:gravity="start"
                android:id="@+id/person_icon"
                    android:layout_width="56dp"
                    android:layout_height="56dp"/>
                android:layout_marginStart="-2dp"
                android:layout_marginTop="-2dp"
                android:layout_width="52dp"
                android:layout_height="52dp" />

            <ImageView
                android:id="@+id/availability"
                android:layout_marginStart="-2dp"
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:background="@drawable/circle_green_10dp" />

            <LinearLayout
                android:orientation="vertical"
                android:gravity="top|start"
                android:paddingStart="12dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:id="@+id/subtext"
                    android:text="@string/empty_user_name"
@@ -58,20 +67,17 @@
                    android:paddingBottom="4dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:singleLine="true"
                    android:ellipsize="end" />
            <LinearLayout
                android:id="@+id/content_background"
                android:background="@drawable/people_space_content_background"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <ImageView
                    android:id="@+id/image"
                    android:gravity="center"
                    android:background="@drawable/people_space_content_background"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_height="match_parent"
                    android:scaleType="centerCrop" />
            </LinearLayout>

                <TextView
                    android:id="@+id/text_content"
                    android:text="@string/empty_status"
@@ -85,11 +91,12 @@
                    android:ellipsize="end" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:gravity="bottom"
            android:layout_gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingTop="4dp"
            android:layout_weight="1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

@@ -101,13 +108,14 @@
                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="14sp"
                android:maxLines="1"
                android:singleLine="true"
                android:ellipsize="end"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <ImageView
                android:id="@+id/predefined_icon"
                android:gravity="end"
                android:gravity="end|center_vertical"
                android:paddingStart="6dp"
                android:layout_width="24dp"
                android:layout_height="18dp" />
+3 −2
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@
        android:background="@drawable/people_space_tile_view_card"
        android:orientation="vertical"
        android:paddingHorizontal="4dp"
        android:paddingVertical="8dp">
        android:paddingTop="6dp"
        android:paddingBottom="8dp">

        <ImageView
            android:id="@+id/person_icon"
@@ -51,7 +52,7 @@
            android:layout_weight="1"
            android:ellipsize="end"
            android:maxLines="1"
            android:paddingHorizontal="8dp"
            android:paddingHorizontal="4dp"
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="14sp" />
Loading