Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Realism update for EditTextPreference, by removing implementation in …
…shadow that did not match the Android API.
- Loading branch information
Showing
2 changed files
with
19 additions
and
35 deletions.
There are no files selected for viewing
31 changes: 0 additions & 31 deletions
31
src/main/java/org/robolectric/shadows/ShadowEditTextPreference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,9 @@ | ||
package org.robolectric.shadows; | ||
|
||
import android.content.Context; | ||
import android.preference.EditTextPreference; | ||
import android.util.AttributeSet; | ||
import android.widget.EditText; | ||
import org.robolectric.annotation.Implementation; | ||
import org.robolectric.annotation.Implements; | ||
|
||
@Implements(EditTextPreference.class) | ||
public class ShadowEditTextPreference extends ShadowDialogPreference { | ||
|
||
private EditText mEditText; | ||
|
||
public void __constructor__(Context context) { | ||
__constructor__(context, null, 0); | ||
} | ||
|
||
public void __constructor__(Context context, AttributeSet attributeSet) { | ||
__constructor__(context, attributeSet, 0); | ||
} | ||
|
||
public void __constructor__(Context context, AttributeSet attributeSet, int defStyle) { | ||
super.__constructor__(context, attributeSet, defStyle); | ||
|
||
mEditText = new EditText(context, attrs); | ||
mEditText.setEnabled(true); | ||
} | ||
|
||
@Implementation | ||
public EditText getEditText() { | ||
return mEditText; | ||
} | ||
|
||
@Implementation | ||
public void setText(java.lang.String text) { | ||
mEditText.setText(text); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters