resolved conflicts for merge of 1162fd77 to eclair-mr2
This commit is contained in:
@@ -43,7 +43,7 @@ public class ViewAnimator extends FrameLayout {
|
||||
|
||||
public ViewAnimator(Context context) {
|
||||
super(context);
|
||||
initViewAnimator();
|
||||
initViewAnimator(context, null);
|
||||
}
|
||||
|
||||
public ViewAnimator(Context context, AttributeSet attrs) {
|
||||
@@ -61,11 +61,28 @@ public class ViewAnimator extends FrameLayout {
|
||||
}
|
||||
a.recycle();
|
||||
|
||||
initViewAnimator();
|
||||
initViewAnimator(context, attrs);
|
||||
}
|
||||
|
||||
private void initViewAnimator() {
|
||||
mMeasureAllChildren = true;
|
||||
/**
|
||||
* Initialize this {@link ViewAnimator}, possibly setting
|
||||
* {@link #setMeasureAllChildren(boolean)} based on {@link FrameLayout} flags.
|
||||
*/
|
||||
private void initViewAnimator(Context context, AttributeSet attrs) {
|
||||
if (attrs == null) {
|
||||
// For compatibility, always measure children when undefined.
|
||||
mMeasureAllChildren = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// For compatibility, default to measure children, but allow XML
|
||||
// attribute to override.
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs,
|
||||
com.android.internal.R.styleable.FrameLayout);
|
||||
final boolean measureAllChildren = a.getBoolean(
|
||||
com.android.internal.R.styleable.FrameLayout_measureAllChildren, true);
|
||||
setMeasureAllChildren(measureAllChildren);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.content.res.TypedArray;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.RemoteViews.RemoteView;
|
||||
|
||||
/**
|
||||
@@ -36,6 +37,9 @@ import android.widget.RemoteViews.RemoteView;
|
||||
*/
|
||||
@RemoteView
|
||||
public class ViewFlipper extends ViewAnimator {
|
||||
private static final String TAG = "ViewFlipper";
|
||||
private static final boolean LOGD = true;
|
||||
|
||||
private static final int DEFAULT_INTERVAL = 3000;
|
||||
|
||||
private int mFlipInterval = DEFAULT_INTERVAL;
|
||||
@@ -151,6 +155,10 @@ public class ViewFlipper extends ViewAnimator {
|
||||
}
|
||||
mRunning = running;
|
||||
}
|
||||
if (LOGD) {
|
||||
Log.d(TAG, "updateRunning() mVisible=" + mVisible + ", mStarted=" + mStarted
|
||||
+ ", mUserPresent=" + mUserPresent + ", mRunning=" + mRunning);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user