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

Commit 25594d6d authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Performance improvements for contact card with social updates

- Use background color with alpha hex color instead of
alpha attribute of View
- Instead of posting a runnable in onMeasure, move it
to setCurrentPage / setFragments methods

Bug: 5161205

Change-Id: Ib1ad3b11c359d8fdc1e9143ab9d64c39aa914b91
parent 4d4b82bc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@android:color/black"
        android:visibility="gone"/>

    <View
+0 −1
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@android:color/black"
        android:visibility="gone"/>

    <View
+1 −4
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
    class="com.android.contacts.detail.CarouselTab"
    android:layout_width="0dip"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:background="@color/detail_tab_background">
    android:layout_weight="1">

    <ImageView android:id="@+id/photo"
        android:scaleType="centerCrop"
@@ -45,8 +44,6 @@
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginBottom="@dimen/detail_tab_carousel_tab_label_height"
        android:background="@android:color/black"
        android:alpha="0"
        android:visibility="gone"/>

    <TextView
+0 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
        android:layout_alignParentLeft="true"
        android:visibility="gone" />


    <!-- Transparent view to overlay on the update photo
    (to allow white text to appear over a white photo). -->
    <View
@@ -65,8 +64,6 @@
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginBottom="@dimen/detail_tab_carousel_tab_label_height"
        android:background="@android:color/black"
        android:alpha="0"
        android:visibility="gone"/>

    <TextView
+1 −3
Original line number Diff line number Diff line
@@ -94,8 +94,6 @@ public class CarouselTab extends RelativeLayout implements ViewOverlay {

    @Override
    public void setAlphaLayerValue(float alpha) {
        if (mAlphaLayer != null) {
            mAlphaLayer.setAlpha(alpha);
        }
        ContactDetailDisplayUtils.setAlphaOnViewBackground(mAlphaLayer, alpha);
    }
}
Loading