title: How to get shared preferences in a class that extends ArrayAdapter<String>
body: <p>i have an ArrayAdapter and i need to get the shared preferences of the app in order to do something with it. my problem i cant get the shared preferences.
  thats my code:</p>
  
  <pre><code>public class MobileArrayAdapter extends ArrayAdapter&lt;String&gt; {
  private final Context context;
  private final String[] values;
  private static SharedPreferences prefs;
  private String firstBtName = "";
  private String secondBtName = "";
  private String thirdBtName = "";
  
  
  public MobileArrayAdapter(Context context, String[] values) {
      super(context, R.layout.list, values);
      this.context = context;
      this.values = values;
  
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
  
      prefs = getSharedPreferences("MYPREFS", 0); // ERROR **************
  
      LayoutInflater inflater = (LayoutInflater) context
          .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView = inflater.inflate(R.layout.list, parent, false);
      TextView textView = (TextView) rowView.findViewById(R.id.label);
      textView.setText(values[position]);
  </code></pre>
  
  <p>eclips says that i dont have that cind of method...
  What can i do?  Thanks!</p>