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

Commit 2cdafc6b authored by Jason Monk's avatar Jason Monk
Browse files

Layout refinement for app lists

Make all app lists (or at least all current app lists) use the same
base layout for icon, label, and sizing/padding.  This way they
should look the same.

Bug: 21727125
Bug: 21726922
Bug: 21853632
Change-Id: I3cffadb9e7b5184d4209deacd4ea70ec1d4f71b4
parent edb7b0d9
Loading
Loading
Loading
Loading
+12 −24
Original line number Diff line number Diff line
@@ -17,19 +17,19 @@
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingTop="14dp"
    android:paddingBottom="14dp"
    android:minHeight="72dp"
    android:paddingTop="16dp"
    android:paddingBottom="16dp"
    android:columnCount="3">

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_width="@dimen/app_icon_size"
        android:layout_height="@dimen/app_icon_size"
        android:layout_gravity="center"
        android:scaleType="fitXY"
        android:layout_rowSpan="3"
        android:layout_marginEnd="8dip"
        android:layout_marginEnd="16dip"
        android:contentDescription="@null" />

    <TextView
@@ -44,30 +44,18 @@
        android:textAlignment="viewStart" />

    <TextView
        android:id="@android:id/text1"
        android:id="@android:id/summary"
        android:layout_marginStart="6dip"
        android:layout_marginTop="2dip"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:textAppearance="@android:style/TextAppearance.Material.Subhead"
        android:textColor="?android:attr/textColorSecondary" />

    <ProgressBar
        android:id="@android:id/progress"
    <FrameLayout
        android:id="@android:id/widget_frame"
        android:layout_height="wrap_content"
        android:layout_columnSpan="2"
        android:layout_gravity="fill_horizontal|top"
        android:layout_marginTop="4dip"
        android:max="100"
        android:progressBackgroundTint="@android:color/transparent"
        style="?android:attr/progressBarStyleHorizontal" />

    <TextView
        android:id="@android:id/summary"
        android:layout_width="0dip"
        android:layout_gravity="fill_horizontal|top"
        android:layout_columnSpan="2"
        android:layout_marginTop="6dip"
        android:visibility="gone"
        android:maxLines="2"
        android:textAppearance="?android:attr/textAppearanceSmall" />
        android:layout_gravity="fill_horizontal|top" />

</GridLayout>
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@

            <!-- Application snippet label, version and icon -->
            <include
                layout="@layout/manage_applications_item"
                layout="@layout/app_item"
                android:id="@+id/app_snippet" />

        </LinearLayout>
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,6 @@
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

    <include layout="@layout/app_percentage_item" />
    <include layout="@layout/app_item" />

</FrameLayout>
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@

        <!-- Application snippet label, version and icon -->
        <include
            layout="@layout/manage_applications_item"
            layout="@layout/app_item"
            android:id="@+id/app_snippet" />

        <Space
+0 −85
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2008, 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.
*/
-->

<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="72dp"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingTop="16dip"
    android:paddingBottom="16dip"
    android:columnCount="4">

    <ImageView
        android:id="@+id/app_icon"
        android:layout_width="@dimen/app_icon_size"
        android:layout_height="@dimen/app_icon_size"
        android:layout_rowSpan="2"
        android:layout_marginEnd="16dip"
        android:scaleType="centerInside"
        android:contentDescription="@null"
        android:duplicateParentState="true" />

    <TextView
        android:id="@+id/app_name"
        android:layout_width="0dip"
        android:layout_columnSpan="2"
        android:layout_gravity="fill_horizontal"
        android:layout_marginTop="2dip"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:textAppearance="@android:style/TextAppearance.Material.Subhead"
        android:textAlignment="viewStart"
        android:duplicateParentState="true" />

    <CheckBox android:id="@+id/app_on_sdcard"
        android:layout_marginStart="8dip"
        android:layout_gravity="center_vertical"
        android:layout_rowSpan="2"
        android:visibility="gone"
        android:clickable="false"
        android:focusable="false"
        android:duplicateParentState="true" />

    <TextView
        android:id="@+id/app_summary"
        android:layout_column="1"
        android:layout_row="1"
        android:layout_gravity="fill_horizontal|top"
        android:textAppearance="@android:style/TextAppearance.Material.Body1"
        android:textColor="?android:attr/textColorSecondary"
        android:textAlignment="viewStart"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:duplicateParentState="true" />

    <TextView
        android:id="@+id/app_disabled"
        android:layout_width="0dip"
        android:layout_marginStart="8dip"
        android:layout_gravity="fill_horizontal|top"
        android:textAppearance="@android:style/TextAppearance.Material.Body1"
        android:textColor="?android:attr/textColorSecondary"
        android:textAlignment="viewEnd"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:duplicateParentState="true" />

</GridLayout>
Loading