Merge "Clean up the fallback state of QuickContact"
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -117,6 +118,16 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
|
||||
public void setMode(int size) {
|
||||
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
|
||||
|
||||
BIN
core/res/res/drawable-hdpi/quickcontact_nobadge.9.png
Normal file
BIN
core/res/res/drawable-hdpi/quickcontact_nobadge.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1019 B |
BIN
core/res/res/drawable-mdpi/quickcontact_nobadge.9.png
Normal file
BIN
core/res/res/drawable-mdpi/quickcontact_nobadge.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1016 B |
@@ -1,26 +0,0 @@
|
||||
<?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>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 675 B |
Binary file not shown.
|
Before Width: | Height: | Size: 390 B |
Binary file not shown.
|
Before Width: | Height: | Size: 675 B |
@@ -552,6 +552,7 @@
|
||||
<item name="android:background">@android:drawable/quickcontact_badge</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:src">@android:drawable/ic_contact_picture</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.QuickContactBadgeSmall">
|
||||
|
||||
Reference in New Issue
Block a user