OSDN Git Service

Change FasttrackBadgeWidget->QuickContactBadge and make public.
authorEvan Millar <emillar@google.com>
Wed, 30 Sep 2009 01:02:06 +0000 (18:02 -0700)
committerEvan Millar <emillar@google.com>
Wed, 30 Sep 2009 15:33:31 +0000 (08:33 -0700)
Change-Id: I9d12beeba16c2f64742b4a99d0da4ceb73525b5b

22 files changed:
api/current.xml
core/java/android/widget/QuickContactBadge.java [moved from core/java/android/widget/FasttrackBadgeWidget.java with 91% similarity]
core/java/com/android/internal/widget/ContactHeaderWidget.java
core/res/res/drawable-hdpi/quickcontact_badge_pressed.9.png [moved from core/res/res/drawable-hdpi/fasttrack_badge_pressed.9.png with 100% similarity]
core/res/res/drawable-hdpi/quickcontact_badge_small_pressed.9.png [moved from core/res/res/drawable-hdpi/fasttrack_badge_small_pressed.9.png with 100% similarity]
core/res/res/drawable-hdpi/quickcontact_badge_small_unpressed.9.png [moved from core/res/res/drawable-hdpi/fasttrack_badge_small_unpressed.9.png with 100% similarity]
core/res/res/drawable-hdpi/quickcontact_badge_unpressed.9.png [moved from core/res/res/drawable-hdpi/fasttrack_badge_unpressed.9.png with 100% similarity]
core/res/res/drawable-mdpi/quickcontact_badge_pressed.9.png [moved from core/res/res/drawable-mdpi/fasttrack_badge_pressed.9.png with 100% similarity]
core/res/res/drawable-mdpi/quickcontact_badge_small_pressed.9.png [moved from core/res/res/drawable-mdpi/fasttrack_badge_small_pressed.9.png with 100% similarity]
core/res/res/drawable-mdpi/quickcontact_badge_small_unpressed.9.png [moved from core/res/res/drawable-mdpi/fasttrack_badge_small_unpressed.9.png with 100% similarity]
core/res/res/drawable-mdpi/quickcontact_badge_unpressed.9.png [moved from core/res/res/drawable-mdpi/fasttrack_badge_unpressed.9.png with 100% similarity]
core/res/res/drawable/quickcontact_badge.xml [moved from core/res/res/drawable/fasttrack_badge.xml with 87% similarity]
core/res/res/drawable/quickcontact_badge_small.xml [moved from core/res/res/drawable/fasttrack_badge_small.xml with 86% similarity]
core/res/res/drawable/quickcontact_nobadge.xml [moved from core/res/res/drawable/fasttrack_nobadge.xml with 82% similarity]
core/res/res/drawable/quickcontact_nobadge_highlight.9.png [moved from core/res/res/drawable/fasttrack_nobadge_highlight.9.png with 100% similarity]
core/res/res/drawable/quickcontact_nobadge_normal.9.png [moved from core/res/res/drawable/fasttrack_nobadge_normal.9.png with 100% similarity]
core/res/res/drawable/quickcontact_nobadge_pressed.9.png [moved from core/res/res/drawable/fasttrack_nobadge_pressed.9.png with 100% similarity]
core/res/res/layout/contact_header.xml
core/res/res/values/attrs.xml
core/res/res/values/styles.xml
core/res/res/values/themes.xml
preloaded-classes

index 0389da5..3ef93c5 100644 (file)
 </parameter>
 </method>
 </class>
+<class name="QuickContactBadge"
+ extends="android.widget.ImageView"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.view.View.OnClickListener">
+</implements>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</constructor>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+</constructor>
+<constructor name="QuickContactBadge"
+ type="android.widget.QuickContactBadge"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="defStyle" type="int">
+</parameter>
+</constructor>
+<method name="assignContactFromEmail"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="emailAddress" type="java.lang.String">
+</parameter>
+<parameter name="lazyLookup" type="boolean">
+</parameter>
+</method>
+<method name="assignContactFromPhone"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="phoneNumber" type="java.lang.String">
+</parameter>
+<parameter name="lazyLookup" type="boolean">
+</parameter>
+</method>
+<method name="assignContactUri"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="contactUri" type="android.net.Uri">
+</parameter>
+</method>
+<method name="onClick"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="v" type="android.view.View">
+</parameter>
+</method>
+<method name="setExcludeMimes"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="setMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
+<field name="mExcludeMimes"
+ type="java.lang.String[]"
+ transient="false"
+ volatile="false"
+ value="null"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</field>
+</class>
 <class name="RadioButton"
  extends="android.widget.CompoundButton"
  abstract="false"
@@ -36,12 +36,10 @@ import android.view.View.OnClickListener;
 import com.android.internal.R;
 
 /**
- * Widget used to show an image with the standard fasttrack badge
+ * Widget used to show an image with the standard QuickContact badge
  * and on-click behavior.
- *
- * @hide
  */
-public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
+public class QuickContactBadge extends ImageView implements OnClickListener {
 
     private Uri mContactUri;
     private String mContactEmail;
@@ -74,22 +72,22 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
 
 
 
-    public FasttrackBadgeWidget(Context context) {
+    public QuickContactBadge(Context context) {
         this(context, null);
     }
 
-    public FasttrackBadgeWidget(Context context, AttributeSet attrs) {
+    public QuickContactBadge(Context context, AttributeSet attrs) {
         this(context, attrs, 0);
     }
 
-    public FasttrackBadgeWidget(Context context, AttributeSet attrs, int defStyle) {
+    public QuickContactBadge(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
 
         TypedArray a =
             context.obtainStyledAttributes(attrs,
-                    com.android.internal.R.styleable.FasttrackBadgeWidget, defStyle, 0);
+                    com.android.internal.R.styleable.QuickContactBadge, defStyle, 0);
 
-        mMode = a.getInt(com.android.internal.R.styleable.FasttrackBadgeWidget_fasttrackWindowSize,
+        mMode = a.getInt(com.android.internal.R.styleable.QuickContactBadge_quickContactWindowSize,
                 FastTrack.MODE_MEDIUM);
 
         a.recycle();
@@ -105,8 +103,8 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
     }
 
     /**
-     * Assign the contact uri that this fasttrack badge should be associated
-     * with. Note that this is only used for displaying the fasttrack window and
+     * Assign the contact uri that this QuickContactBadge should be associated
+     * with. Note that this is only used for displaying the QuickContact window and
      * won't bind the contact's photo for you.
      *
      * @param contactUri Either a {@link Contacts#CONTENT_URI} or
@@ -122,7 +120,7 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
     private void onContactUriChanged() {
         if (mContactUri == null && mContactEmail == null && mContactPhone == null) {
             if (mNoBadgeBackground == null) {
-                mNoBadgeBackground = getResources().getDrawable(R.drawable.fasttrack_nobadge);
+                mNoBadgeBackground = getResources().getDrawable(R.drawable.quickcontact_nobadge);
             }
             setBackgroundDrawable(mNoBadgeBackground);
         } else {
@@ -173,7 +171,7 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
     }
 
     /**
-     * Set the fasttrack window mode. Options are {@link FastTrack#MODE_SMALL},
+     * Set the QuickContact window mode. Options are {@link FastTrack#MODE_SMALL},
      * {@link FastTrack#MODE_MEDIUM}, {@link FastTrack#MODE_LARGE}.
      * @param size
      */
index 0d25728..b98794b 100644 (file)
@@ -47,7 +47,7 @@ import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.CheckBox;
-import android.widget.FasttrackBadgeWidget;
+import android.widget.QuickContactBadge;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.TextView;
@@ -68,7 +68,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
     private View mAggregateBadge;
     private TextView mPhoneticNameView;
     private CheckBox mStarredView;
-    private FasttrackBadgeWidget mPhotoView;
+    private QuickContactBadge mPhotoView;
     private ImageView mPresenceView;
     private TextView mStatusView;
     private TextView mStatusAttributionView;
@@ -171,7 +171,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
         mStarredView = (CheckBox)findViewById(R.id.star);
         mStarredView.setOnClickListener(this);
 
-        mPhotoView = (FasttrackBadgeWidget) findViewById(R.id.photo);
+        mPhotoView = (QuickContactBadge) findViewById(R.id.photo);
 
         mPresenceView = (ImageView) findViewById(R.id.presence);
 
similarity index 87%
rename from core/res/res/drawable/fasttrack_badge.xml
rename to core/res/res/drawable/quickcontact_badge.xml
index c6c9a93..bd5aeb6 100644 (file)
         android:state_focused="false"
         android:state_selected="false"
         android:state_pressed="false"
-        android:drawable="@drawable/fasttrack_badge_unpressed" />
+        android:drawable="@drawable/quickcontact_badge_unpressed" />
 
     <item
         android:state_pressed="true"
-        android:drawable="@drawable/fasttrack_badge_pressed" />
+        android:drawable="@drawable/quickcontact_badge_pressed" />
 
 </selector>
         android:state_focused="false"
         android:state_selected="false"
         android:state_pressed="false"
-        android:drawable="@drawable/fasttrack_badge_small_unpressed" />
+        android:drawable="@drawable/quickcontact_badge_small_unpressed" />
 
     <item
         android:state_pressed="true"
-        android:drawable="@drawable/fasttrack_badge_small_pressed" />
+        android:drawable="@drawable/quickcontact_badge_small_pressed" />
 
 </selector>
similarity index 82%
rename from core/res/res/drawable/fasttrack_nobadge.xml
rename to core/res/res/drawable/quickcontact_nobadge.xml
index 538e165..922fa0e 100644 (file)
@@ -18,9 +18,9 @@
 */
 -->
 <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" />
+    <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>
index 2dbc311..b2bc845 100644 (file)
     android:background="@drawable/title_bar_medium"
     android:paddingRight="5dip">
 
-    <android.widget.FasttrackBadgeWidget android:id="@+id/photo"
+    <android.widget.QuickContactBadge android:id="@+id/photo"
         android:layout_alignParentLeft="true"
         android:layout_gravity="center_vertical"
         android:layout_marginRight="10dip"
         android:layout_marginLeft="10dip"
-        style="@*android:style/Widget.FasttrackBadgeWidget.WindowSmall" />
+        style="@*android:style/Widget.QuickContactBadge.WindowSmall" />
     />
 
     <LinearLayout
index f1ef6df..bfb25b8 100644 (file)
         <attr name="spinnerItemStyle" format="reference" />
         <!-- Default MapView style. -->
         <attr name="mapViewStyle" format="reference" />
-        <!-- Default Fasttrack badge style. -->
-        <attr name="fasttrackBadgeWidgetStyle" format="reference" />
-        <!-- Default Fasttrack badge style with small fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleWindowSmall" format="reference" />
-        <!-- Default Fasttrack badge style with medium fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleWindowMedium" format="reference" />
-        <!-- Default Fasttrack badge style with large fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleWindowLarge" format="reference" />
-        <!-- Default Fasttrack badge style with small fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleSmallWindowSmall" format="reference" />
-        <!-- Default Fasttrack badge style with medium fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleSmallWindowMedium" format="reference" />
-        <!-- Default Fasttrack badge style with large fasttrack window. -->
-        <attr name="fasttrackBadgeWidgetStyleSmallWindowLarge" format="reference" />
+        <!-- Default quickcontact badge style. -->
+        <attr name="quickContactBadgeStyle" format="reference" />
+        <!-- Default quickcontact badge style with small quickcontact window. -->
+        <attr name="quickContactBadgeStyleWindowSmall" format="reference" />
+        <!-- Default quickcontact badge style with medium quickcontact window. -->
+        <attr name="quickContactBadgeStyleWindowMedium" format="reference" />
+        <!-- Default quickcontact badge style with large quickcontact window. -->
+        <attr name="quickContactBadgeStyleWindowLarge" format="reference" />
+        <!-- Default quickcontact badge style with small quickcontact window. -->
+        <attr name="quickContactBadgeStyleSmallWindowSmall" format="reference" />
+        <!-- Default quickcontact badge style with medium quickcontact window. -->
+        <attr name="quickContactBadgeStyleSmallWindowMedium" format="reference" />
+        <!-- Default quickcontact badge style with large quickcontact window. -->
+        <attr name="quickContactBadgeStyleSmallWindowLarge" format="reference" />
 
         <!-- =================== -->
         <!-- Preference styles   -->
         <attr name="orientation" />
     </declare-styleable>
 
-    <declare-styleable name="FasttrackBadgeWidget">
-        <attr name="fasttrackWindowSize">
+    <declare-styleable name="QuickContactBadge">
+        <attr name="quickContactWindowSize">
             <enum name="modeSmall" value="1" />
             <enum name="modeMedium" value="2" />
             <enum name="modeLarge" value="3" />
index e071e99..6e38138 100644 (file)
         <item name="android:shadowRadius">2.75</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidget">
+    <style name="Widget.QuickContactBadge">
         <item name="android:layout_width">50dip</item>
         <item name="android:layout_height">56dip</item>
-        <item name="android:background">@android:drawable/fasttrack_badge</item>
+        <item name="android:background">@android:drawable/quickcontact_badge</item>
         <item name="android:clickable">true</item>
         <item name="android:scaleType">fitCenter</item>
     </style>
     
-    <style name="Widget.FasttrackBadgeWidgetSmall">
+    <style name="Widget.QuickContactBadgeSmall">
         <item name="android:layout_width">39dip</item>
         <item name="android:layout_height">42dip</item>
-        <item name="android:background">@android:drawable/fasttrack_badge_small</item>
+        <item name="android:background">@android:drawable/quickcontact_badge_small</item>
         <item name="android:clickable">true</item>
         <item name="android:scaleType">fitCenter</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidget.WindowSmall">
-        <item name="android:fasttrackWindowSize">modeSmall</item>
+    <style name="Widget.QuickContactBadge.WindowSmall">
+        <item name="android:quickContactWindowSize">modeSmall</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidget.WindowMedium">
-        <item name="android:fasttrackWindowSize">modeMedium</item>
+    <style name="Widget.QuickContactBadge.WindowMedium">
+        <item name="android:quickContactWindowSize">modeMedium</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidget.WindowLarge">
-        <item name="android:fasttrackWindowSize">modeLarge</item>
+    <style name="Widget.QuickContactBadge.WindowLarge">
+        <item name="android:quickContactWindowSize">modeLarge</item>
     </style>
     
-    <style name="Widget.FasttrackBadgeWidgetSmall.WindowSmall">
-        <item name="android:fasttrackWindowSize">modeSmall</item>
+    <style name="Widget.QuickContactBadgeSmall.WindowSmall">
+        <item name="android:quickContactWindowSize">modeSmall</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidgetSmall.WindowMedium">
-        <item name="android:fasttrackWindowSize">modeMedium</item>
+    <style name="Widget.QuickContactBadgeSmall.WindowMedium">
+        <item name="android:quickContactWindowSize">modeMedium</item>
     </style>
 
-    <style name="Widget.FasttrackBadgeWidgetSmall.WindowLarge">
-        <item name="android:fasttrackWindowSize">modeLarge</item>
+    <style name="Widget.QuickContactBadgeSmall.WindowLarge">
+        <item name="android:quickContactWindowSize">modeLarge</item>
     </style>
 
     <!-- Text Appearances -->
index 119f174..17ea66a 100644 (file)
         <item name="spinnerItemStyle">@android:style/Widget.TextView.SpinnerItem</item>
         <item name="dropDownHintAppearance">@android:style/TextAppearance.Widget.DropDownHint</item>
         <item name="keyboardViewStyle">@android:style/Widget.KeyboardView</item>
-        <item name="fasttrackBadgeWidgetStyleWindowSmall">@android:style/Widget.FasttrackBadgeWidget.WindowSmall</item>
-        <item name="fasttrackBadgeWidgetStyleWindowMedium">@android:style/Widget.FasttrackBadgeWidget.WindowMedium</item>
-        <item name="fasttrackBadgeWidgetStyleWindowLarge">@android:style/Widget.FasttrackBadgeWidget.WindowLarge</item>
-        <item name="fasttrackBadgeWidgetStyleSmallWindowSmall">@android:style/Widget.FasttrackBadgeWidgetSmall.WindowSmall</item>
-        <item name="fasttrackBadgeWidgetStyleSmallWindowMedium">@android:style/Widget.FasttrackBadgeWidgetSmall.WindowMedium</item>
-        <item name="fasttrackBadgeWidgetStyleSmallWindowLarge">@android:style/Widget.FasttrackBadgeWidgetSmall.WindowLarge</item>
+        <item name="quickContactBadgeStyleWindowSmall">@android:style/Widget.QuickContactBadge.WindowSmall</item>
+        <item name="quickContactBadgeStyleWindowMedium">@android:style/Widget.QuickContactBadge.WindowMedium</item>
+        <item name="quickContactBadgeStyleWindowLarge">@android:style/Widget.QuickContactBadge.WindowLarge</item>
+        <item name="quickContactBadgeStyleSmallWindowSmall">@android:style/Widget.QuickContactBadgeSmall.WindowSmall</item>
+        <item name="quickContactBadgeStyleSmallWindowMedium">@android:style/Widget.QuickContactBadgeSmall.WindowMedium</item>
+        <item name="quickContactBadgeStyleSmallWindowLarge">@android:style/Widget.QuickContactBadgeSmall.WindowLarge</item>
         
         <!-- Preference styles -->
         <item name="preferenceScreenStyle">@android:style/Preference.PreferenceScreen</item>
index c9cf70c..c4b1c66 100644 (file)
@@ -910,7 +910,6 @@ android.widget.ExpandableListView
 android.widget.ExpandableListView$SavedState
 android.widget.FastScroller
 android.widget.FastScroller$ScrollFade
-android.widget.FasttrackBadgeWidget
 android.widget.Filter
 android.widget.FrameLayout
 android.widget.FrameLayout$LayoutParams
@@ -934,6 +933,7 @@ android.widget.PopupWindow$1
 android.widget.PopupWindow$PopupViewContainer
 android.widget.ProgressBar
 android.widget.ProgressBar$SavedState
+android.widget.QuickContactBadge
 android.widget.RadioButton
 android.widget.RadioGroup
 android.widget.RadioGroup$CheckedStateTracker