am 1935a341: Merge change I9d12beeb into eclair

Merge commit '1935a3417e986d38b9a0d981c3dbd06acf75a9fc' into eclair-plus-aosp

* commit '1935a3417e986d38b9a0d981c3dbd06acf75a9fc':
  Change FasttrackBadgeWidget->QuickContactBadge and make public.
This commit is contained in:
Evan Millar
2009-09-30 10:08:59 -07:00
committed by Android Git Automerger
22 changed files with 204 additions and 66 deletions

View File

@@ -186237,6 +186237,146 @@
</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"

View File

@@ -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
*/

View 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);

View File

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

View File

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 633 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View File

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 605 B

View File

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

View File

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 651 B

View File

@@ -19,10 +19,10 @@
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>

View File

@@ -19,10 +19,10 @@
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>

View 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>

View File

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 675 B

View File

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

View File

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 675 B

View File

@@ -22,12 +22,12 @@
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

View File

@@ -401,20 +401,20 @@
<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 -->
@@ -2227,8 +2227,8 @@
<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" />

View File

@@ -524,44 +524,44 @@
<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 -->

View File

@@ -175,12 +175,12 @@
<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>

View 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