1 package com.xtremelabs.robolectric.shadows;
2 
3 import android.preference.ListPreference;
4 
5 import com.xtremelabs.robolectric.internal.Implementation;
6 import com.xtremelabs.robolectric.internal.Implements;
7 
8 @Implements(ListPreference.class)
9 public class ShadowListPreference extends ShadowDialogPreference {
10 
11 	CharSequence[] entries;
12 	CharSequence[] entryValues;
13 
14 	String value;
15 
16 	@Implementation
getEntries()17 	public CharSequence[] getEntries() {
18 		return entries;
19 	}
20 
21 	@Implementation
setEntries(CharSequence[] entries)22 	public void setEntries(CharSequence[] entries) {
23 		this.entries = entries;
24 	}
25 
26 	@Implementation
setEntries(int entriesResId)27 	public void setEntries(int entriesResId) {
28 		this.entries = context.getResources().getStringArray(entriesResId);
29 	}
30 
31 	@Implementation
getEntryValues()32 	public CharSequence[] getEntryValues() {
33 		return entryValues;
34 	}
35 
36 	@Implementation
setEntryValues(CharSequence[] entryValues)37 	public void setEntryValues(CharSequence[] entryValues) {
38 		this.entryValues = entryValues;
39 	}
40 
41 	@Implementation
setEntryValues(int entryValuesResId)42 	public void setEntryValues(int entryValuesResId) {
43 		this.entryValues = context.getResources().getStringArray(entryValuesResId);
44 	}
45 
46 	@Implementation
setValue(String value)47 	public void setValue(String value) {
48 		this.value = value;
49 	}
50 
51 	@Implementation
getValue()52 	public String getValue() {
53 		return value;
54 	}
55 }
56