コード例 #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
ファイル: Plugin.java プロジェクト: 0359xiaodong/OpenCamera
 // 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);
 }