Skip to content

Commit 417e267

Browse files
Philip MilneAndroid (Google) Code Review
authored andcommitted
Merge "Revert "Simple MVC based binding mechanism for android controls." Do not merge." into jb-mr1-dev
2 parents 4215017 + 8e1c2b6 commit 417e267

File tree

7 files changed

+7
-365
lines changed

7 files changed

+7
-365
lines changed

api/current.txt

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23346,17 +23346,6 @@ package android.util {
2334623346
method public void set(T, V);
2334723347
}
2334823348

23349-
public class PropertyValueModel extends android.util.ValueModel {
23350-
method public T get();
23351-
method public H getHost();
23352-
method public android.util.Property<H, T> getProperty();
23353-
method public java.lang.Class<T> getType();
23354-
method public static android.util.PropertyValueModel<H, T> of(H, android.util.Property<H, T>);
23355-
method public static android.util.PropertyValueModel<H, T> of(H, java.lang.Class<T>, java.lang.String);
23356-
method public static android.util.PropertyValueModel of(java.lang.Object, java.lang.String);
23357-
method public void set(T);
23358-
}
23359-
2336023349
public class SparseArray implements java.lang.Cloneable {
2336123350
ctor public SparseArray();
2336223351
ctor public SparseArray(int);
@@ -23505,14 +23494,6 @@ package android.util {
2350523494
field public int type;
2350623495
}
2350723496

23508-
public abstract class ValueModel {
23509-
ctor protected ValueModel();
23510-
method public abstract T get();
23511-
method public abstract java.lang.Class<T> getType();
23512-
method public abstract void set(T);
23513-
field public static final android.util.ValueModel EMPTY;
23514-
}
23515-
2351623497
public class Xml {
2351723498
method public static android.util.AttributeSet asAttributeSet(org.xmlpull.v1.XmlPullParser);
2351823499
method public static android.util.Xml.Encoding findEncodingByName(java.lang.String) throws java.io.UnsupportedEncodingException;
@@ -27921,12 +27902,10 @@ package android.widget {
2792127902
method public abstract void onSelectedDayChange(android.widget.CalendarView, int, int, int);
2792227903
}
2792327904

27924-
public class CheckBox extends android.widget.CompoundButton implements android.widget.ValueEditor {
27905+
public class CheckBox extends android.widget.CompoundButton {
2792527906
ctor public CheckBox(android.content.Context);
2792627907
ctor public CheckBox(android.content.Context, android.util.AttributeSet);
2792727908
ctor public CheckBox(android.content.Context, android.util.AttributeSet, int);
27928-
method public android.util.ValueModel<java.lang.Boolean> getValueModel();
27929-
method public void setValueModel(android.util.ValueModel<java.lang.Boolean>);
2793027909
}
2793127910

2793227911
public abstract interface Checkable {
@@ -28099,16 +28078,14 @@ package android.widget {
2809928078
method public void setSize(int, int);
2810028079
}
2810128080

28102-
public class EditText extends android.widget.TextView implements android.widget.ValueEditor {
28081+
public class EditText extends android.widget.TextView {
2810328082
ctor public EditText(android.content.Context);
2810428083
ctor public EditText(android.content.Context, android.util.AttributeSet);
2810528084
ctor public EditText(android.content.Context, android.util.AttributeSet, int);
2810628085
method public void extendSelection(int);
28107-
method public android.util.ValueModel<java.lang.CharSequence> getValueModel();
2810828086
method public void selectAll();
2810928087
method public void setSelection(int, int);
2811028088
method public void setSelection(int);
28111-
method public void setValueModel(android.util.ValueModel<java.lang.CharSequence>);
2811228089
}
2811328090

2811428091
public abstract interface ExpandableListAdapter {
@@ -29134,13 +29111,11 @@ package android.widget {
2913429111
method public abstract java.lang.Object[] getSections();
2913529112
}
2913629113

29137-
public class SeekBar extends android.widget.AbsSeekBar implements android.widget.ValueEditor {
29114+
public class SeekBar extends android.widget.AbsSeekBar {
2913829115
ctor public SeekBar(android.content.Context);
2913929116
ctor public SeekBar(android.content.Context, android.util.AttributeSet);
2914029117
ctor public SeekBar(android.content.Context, android.util.AttributeSet, int);
29141-
method public android.util.ValueModel<java.lang.Integer> getValueModel();
2914229118
method public void setOnSeekBarChangeListener(android.widget.SeekBar.OnSeekBarChangeListener);
29143-
method public void setValueModel(android.util.ValueModel<java.lang.Integer>);
2914429119
}
2914529120

2914629121
public static abstract interface SeekBar.OnSeekBarChangeListener {
@@ -29714,11 +29689,6 @@ package android.widget {
2971429689
method public android.widget.TextView getText2();
2971529690
}
2971629691

29717-
public abstract interface ValueEditor {
29718-
method public abstract android.util.ValueModel<T> getValueModel();
29719-
method public abstract void setValueModel(android.util.ValueModel<T>);
29720-
}
29721-
2972229692
public class VideoView extends android.view.SurfaceView implements android.widget.MediaController.MediaPlayerControl {
2972329693
ctor public VideoView(android.content.Context);
2972429694
ctor public VideoView(android.content.Context, android.util.AttributeSet);

core/java/android/util/PropertyValueModel.java

Lines changed: 0 additions & 143 deletions
This file was deleted.

core/java/android/util/ValueModel.java

Lines changed: 0 additions & 74 deletions
This file was deleted.

core/java/android/widget/CheckBox.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import android.util.AttributeSet;
2121
import android.view.accessibility.AccessibilityEvent;
2222
import android.view.accessibility.AccessibilityNodeInfo;
23-
import android.util.ValueModel;
2423

2524

2625
/**
@@ -56,9 +55,7 @@
5655
* {@link android.R.styleable#View View Attributes}
5756
* </p>
5857
*/
59-
public class CheckBox extends CompoundButton implements ValueEditor<Boolean> {
60-
private ValueModel<Boolean> mValueModel = ValueModel.EMPTY;
61-
58+
public class CheckBox extends CompoundButton {
6259
public CheckBox(Context context) {
6360
this(context, null);
6461
}
@@ -82,22 +79,4 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
8279
super.onInitializeAccessibilityNodeInfo(info);
8380
info.setClassName(CheckBox.class.getName());
8481
}
85-
86-
@Override
87-
public ValueModel<Boolean> getValueModel() {
88-
return mValueModel;
89-
}
90-
91-
@Override
92-
public void setValueModel(ValueModel<Boolean> valueModel) {
93-
mValueModel = valueModel;
94-
setChecked(mValueModel.get());
95-
}
96-
97-
@Override
98-
public boolean performClick() {
99-
boolean handled = super.performClick();
100-
mValueModel.set(isChecked());
101-
return handled;
102-
}
10382
}

0 commit comments

Comments
 (0)