Skip to content

Commit 8e1c2b6

Browse files
Philip MilnePhilip Milne
authored andcommitted
Revert "Simple MVC based binding mechanism for android controls." Do not merge.
This reverts commit 989709a. Change-Id: Ifc2c511b0d99d4a3a164b4a2281ca140015b366d
1 parent 18e8768 commit 8e1c2b6

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
@@ -23203,17 +23203,6 @@ package android.util {
2320323203
method public void set(T, V);
2320423204
}
2320523205

23206-
public class PropertyValueModel extends android.util.ValueModel {
23207-
method public T get();
23208-
method public H getHost();
23209-
method public android.util.Property<H, T> getProperty();
23210-
method public java.lang.Class<T> getType();
23211-
method public static android.util.PropertyValueModel<H, T> of(H, android.util.Property<H, T>);
23212-
method public static android.util.PropertyValueModel<H, T> of(H, java.lang.Class<T>, java.lang.String);
23213-
method public static android.util.PropertyValueModel of(java.lang.Object, java.lang.String);
23214-
method public void set(T);
23215-
}
23216-
2321723206
public class SparseArray implements java.lang.Cloneable {
2321823207
ctor public SparseArray();
2321923208
ctor public SparseArray(int);
@@ -23362,14 +23351,6 @@ package android.util {
2336223351
field public int type;
2336323352
}
2336423353

23365-
public abstract class ValueModel {
23366-
ctor protected ValueModel();
23367-
method public abstract T get();
23368-
method public abstract java.lang.Class<T> getType();
23369-
method public abstract void set(T);
23370-
field public static final android.util.ValueModel EMPTY;
23371-
}
23372-
2337323354
public class Xml {
2337423355
method public static android.util.AttributeSet asAttributeSet(org.xmlpull.v1.XmlPullParser);
2337523356
method public static android.util.Xml.Encoding findEncodingByName(java.lang.String) throws java.io.UnsupportedEncodingException;
@@ -27807,12 +27788,10 @@ package android.widget {
2780727788
method public abstract void onSelectedDayChange(android.widget.CalendarView, int, int, int);
2780827789
}
2780927790

27810-
public class CheckBox extends android.widget.CompoundButton implements android.widget.ValueEditor {
27791+
public class CheckBox extends android.widget.CompoundButton {
2781127792
ctor public CheckBox(android.content.Context);
2781227793
ctor public CheckBox(android.content.Context, android.util.AttributeSet);
2781327794
ctor public CheckBox(android.content.Context, android.util.AttributeSet, int);
27814-
method public android.util.ValueModel<java.lang.Boolean> getValueModel();
27815-
method public void setValueModel(android.util.ValueModel<java.lang.Boolean>);
2781627795
}
2781727796

2781827797
public abstract interface Checkable {
@@ -27985,16 +27964,14 @@ package android.widget {
2798527964
method public void setSize(int, int);
2798627965
}
2798727966

27988-
public class EditText extends android.widget.TextView implements android.widget.ValueEditor {
27967+
public class EditText extends android.widget.TextView {
2798927968
ctor public EditText(android.content.Context);
2799027969
ctor public EditText(android.content.Context, android.util.AttributeSet);
2799127970
ctor public EditText(android.content.Context, android.util.AttributeSet, int);
2799227971
method public void extendSelection(int);
27993-
method public android.util.ValueModel<java.lang.CharSequence> getValueModel();
2799427972
method public void selectAll();
2799527973
method public void setSelection(int, int);
2799627974
method public void setSelection(int);
27997-
method public void setValueModel(android.util.ValueModel<java.lang.CharSequence>);
2799827975
}
2799927976

2800027977
public abstract interface ExpandableListAdapter {
@@ -29019,13 +28996,11 @@ package android.widget {
2901928996
method public abstract java.lang.Object[] getSections();
2902028997
}
2902128998

29022-
public class SeekBar extends android.widget.AbsSeekBar implements android.widget.ValueEditor {
28999+
public class SeekBar extends android.widget.AbsSeekBar {
2902329000
ctor public SeekBar(android.content.Context);
2902429001
ctor public SeekBar(android.content.Context, android.util.AttributeSet);
2902529002
ctor public SeekBar(android.content.Context, android.util.AttributeSet, int);
29026-
method public android.util.ValueModel<java.lang.Integer> getValueModel();
2902729003
method public void setOnSeekBarChangeListener(android.widget.SeekBar.OnSeekBarChangeListener);
29028-
method public void setValueModel(android.util.ValueModel<java.lang.Integer>);
2902929004
}
2903029005

2903129006
public static abstract interface SeekBar.OnSeekBarChangeListener {
@@ -29599,11 +29574,6 @@ package android.widget {
2959929574
method public android.widget.TextView getText2();
2960029575
}
2960129576

29602-
public abstract interface ValueEditor {
29603-
method public abstract android.util.ValueModel<T> getValueModel();
29604-
method public abstract void setValueModel(android.util.ValueModel<T>);
29605-
}
29606-
2960729577
public class VideoView extends android.view.SurfaceView implements android.widget.MediaController.MediaPlayerControl {
2960829578
ctor public VideoView(android.content.Context);
2960929579
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)