Merge change Ib2c6429d into eclair
* changes: border for the non-badge case
This commit is contained in:
@@ -33,6 +33,7 @@ import android.provider.ContactsContract.CommonDataKinds.Email;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import com.android.internal.R;
|
||||
|
||||
/**
|
||||
* Widget used to show an image with the standard fasttrack badge
|
||||
@@ -48,6 +49,7 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
private int mMode;
|
||||
private QueryHandler mQueryHandler;
|
||||
private Drawable mBadgeBackground;
|
||||
private Drawable mNoBadgeBackground;
|
||||
|
||||
protected String[] mExcludeMimes = null;
|
||||
|
||||
@@ -119,7 +121,10 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
|
||||
private void onContactUriChanged() {
|
||||
if (mContactUri == null && mContactEmail == null && mContactPhone == null) {
|
||||
setBackgroundDrawable(null);
|
||||
if (mNoBadgeBackground == null) {
|
||||
mNoBadgeBackground = getResources().getDrawable(R.drawable.fasttrack_nobadge);
|
||||
}
|
||||
setBackgroundDrawable(mNoBadgeBackground);
|
||||
} else {
|
||||
setBackgroundDrawable(mBadgeBackground);
|
||||
}
|
||||
|
||||
26
core/res/res/drawable/fasttrack_nobadge.xml
Normal file
26
core/res/res/drawable/fasttrack_nobadge.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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/fasttrack_nobadge_pressed" />
|
||||
<item android:state_selected="true" android:drawable="@drawable/fasttrack_nobadge_highlight" />
|
||||
<item android:state_focused="true" android:drawable="@drawable/fasttrack_nobadge_highlight" />
|
||||
<item android:state_enabled="false" android:drawable="@drawable/fasttrack_nobadge_normal" />
|
||||
<item android:drawable="@drawable/fasttrack_nobadge_normal" />
|
||||
</selector>
|
||||
BIN
core/res/res/drawable/fasttrack_nobadge_highlight.9.png
Normal file
BIN
core/res/res/drawable/fasttrack_nobadge_highlight.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 675 B |
BIN
core/res/res/drawable/fasttrack_nobadge_normal.9.png
Normal file
BIN
core/res/res/drawable/fasttrack_nobadge_normal.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 390 B |
BIN
core/res/res/drawable/fasttrack_nobadge_pressed.9.png
Normal file
BIN
core/res/res/drawable/fasttrack_nobadge_pressed.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 675 B |
Reference in New Issue
Block a user