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

Commit f82dcf41 authored by Evan Millar's avatar Evan Millar Committed by Android (Google) Code Review
Browse files

Merge "Clean up the fallback state of QuickContact"

parents e54de6da 9a20aa74
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -206418,6 +206418,17 @@
<parameter name="excludeMimes" type="java.lang.String[]">
</parameter>
</method>
<method name="setImageToDefault"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="setMode"
 return="void"
 abstract="false"
+11 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
    private QueryHandler mQueryHandler;
    private Drawable mBadgeBackground;
    private Drawable mNoBadgeBackground;
    private Drawable mDefaultAvatar;

    protected String[] mExcludeMimes = null;

@@ -118,6 +119,16 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
        mMode = size;
    }
    
    /**
     * Resets the contact photo to the default state.
     */
    public void setImageToDefault() {
        if (mDefaultAvatar == null) {
            mDefaultAvatar = getResources().getDrawable(R.drawable.ic_contact_picture);
        }
        setImageDrawable(mDefaultAvatar);
    }

    /**
     * Assign the contact uri that this QuickContactBadge should be associated
     * with. Note that this is only used for displaying the QuickContact window and
+1019 B
Loading image diff...
+1016 B
Loading image diff...
+0 −26
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* bubble_with_chats.xml
**
** Copyright 2009, Google Inc.
**
** 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.
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@drawable/quickcontact_nobadge_pressed" />
    <item android:state_selected="true" android:drawable="@drawable/quickcontact_nobadge_highlight" />
    <item android:state_focused="true" android:drawable="@drawable/quickcontact_nobadge_highlight" />
    <item android:state_enabled="false" android:drawable="@drawable/quickcontact_nobadge_normal" />
    <item android:drawable="@drawable/quickcontact_nobadge_normal" />
</selector>
Loading