title: Possible to use SharedPreferences in a fragment?
body: <p>I try to use</p>
  
  <pre><code>SharedPreferences sharedPreferences = getSharedPreferences("key", Context.MODE_PRIVATE);
  SharedPreferences.Editor editor = sharedPreferences.edit();
  editor.putInt("TEST", 123);
  editor.commit();
  </code></pre>
  
  <p>in a Fragment: <code>public class FragmentStatistics extends Fragment { ...</code>
  <code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){...</code></p>
  
  <p>Is this possible? It gives me a debugger error.</p>
  
  <p>Thanks in advance. Help is appreciated.</p>