Inside my Configuration activity i need to create a preference screen with a fixed View at the top showing a preview of content configured in the page. I don't want to change the main preference screen (i have already a separate activity for that) i want a different layout for a "nested" preferencescreen.
What i've tried is specifying an Intent inside the preference screen however when i click on this options nothing happens and activity goes into timeout... Activity is correctly configured on the manifest (and extends ConfigureActivity as the main one does).
  <PreferenceScreen 
    android:key="inner"
    android:title="Title" 
    android:summary="Summary开发者_如何学编程"
    >
    <intent 
      android:action="android.appwidget.action.APPWIDGET_CONFIGURE" 
      android:targetPackage="my.package.lib" 
      android:targetClass="my.package.lib.ConfigureClass" 
      />
  </PreferenceScreen>
Another idea could be creating a custom "preference" that launches another configuration activity, could this work? Would be correct/acceptable to have multiple configuration activities?
The following code on the main ConfigureActivity works however i don't know if its a clean way to do what i want. Could someone confirm?
PreferenceScreen b = (PreferenceScreen) findPreference("my_empty_preference_screen");       
b.setOnPreferenceClickListener(new OnPreferenceClickListener() {
    @Override
    public boolean onPreferenceClick(Preference preference) {
        Intent intent = new Intent(ConfigureActivity.this, ConfigureActivity.class); 
        intent.setAction("android.appwidget.action.APPWIDGET_CONFIGURE");
        ConfigureActivity.this.startActivity(intent);
        return false;
    }
});
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论