Пример #1
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   mInstrumentation = getInstrumentation();
   mContext = mInstrumentation.getContext();
   mIntent = new Intent(Intent.ACTION_MAIN);
   mIntent.setComponent(new ComponentName(mContext, Configuration.class.getName()));
   mActivity = startActivity(mIntent, null, null);
   preferenceScreen = mActivity.getPreferenceScreen();
 }
Пример #2
0
 // show preference's value in summary on start
 public void showInitialSummary(PreferenceActivity prefActivity) {
   for (int i = 0; i < prefActivity.getPreferenceScreen().getPreferenceCount(); i++) {
     initSummary(prefActivity.getPreferenceScreen().getPreference(i));
   }
   onPreferenceCreate(prefActivity);
 }