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 17 public CharSequence[] getEntries() { 18 return entries; 19 } 20 21 @Implementation 22 public void setEntries(CharSequence[] entries) { 23 this.entries = entries; 24 } 25 26 @Implementation 27 public void setEntries(int entriesResId) { 28 this.entries = context.getResources().getStringArray(entriesResId); 29 } 30 31 @Implementation 32 public CharSequence[] getEntryValues() { 33 return entryValues; 34 } 35 36 @Implementation 37 public void setEntryValues(CharSequence[] entryValues) { 38 this.entryValues = entryValues; 39 } 40 41 @Implementation 42 public void setEntryValues(int entryValuesResId) { 43 this.entryValues = context.getResources().getStringArray(entryValuesResId); 44 } 45 46 @Implementation 47 public void setValue(String value) { 48 this.value = value; 49 } 50 51 @Implementation 52 public String getValue() { 53 return value; 54 } 55 } 56