addView equivalente but adding Preference to PreferenceScreen?
<p>I had recently had to do add a view to a LinearLayout programatically, I have to do the same for a for a PreferenceScreen but I don't know how. This is how it was done for a LinearLayout:</p>

<pre><code>    LayoutInflater localLayoutInflater = (LayoutInflater)getBaseContext().getSystemService("layout_inflater");
    View myView = localLayoutInflater.inflate(R.layout.custom_layout, null);
    final PreferenceScreen ll=(LinearLayout)findViewById(R.id.linearlayoutID);
    ll.addView(myView);
</code></pre>

<p>How can I do the same to add a preference to a PreferenceScreen?</p>

<hr>

<p>EDIT:</p>

<p>This is what I've done so far:</p>

<pre><code>Preference preference = new Preference(this);
        preference .setTitle("WHATEVER");
        preference .setSummary("Summary");
        preference .setKey("your_key");
</code></pre>

<p>I managed to create a preference and store it in list1, I think it's ok so far, but now I need to figure out how to append it inside <code>&lt;PreferenceScreen id="@+id/list"&gt;</code>?</p>
