Start activity from preference-headers

前端 未结 3 1144
广开言路
广开言路 2021-01-12 05:15

I\'m implementing n-layer PreferenceActivities 1st layer PreferenceActivity is loaded from preference-headers.

First header creates fragment of settings which is a P

3条回答
  •  别那么骄傲
    2021-01-12 05:35

    if you are creating preferences using java ,then you can achieve the same result by,

    PreferenceScreen editPhoneNumbersScreen = getPreferenceManager().createPreferenceScreen(mContext);
        editPhoneNumbersScreen.setTitle(getResources().getString(R.string.change_add_emergency_numbers));
        editPhoneNumbersScreen.setSummary(getResources().getString(R.string.summary_add_no));
    
    
     Intent i = new Intent(getApplicationContext(),TargetActivity.class);
    i.putExtra("change numbers", true);
            editPhoneNumbersScreen.setIntent(i);
    

提交回复
热议问题