How to get a reference to components inside PreferenceActivity <p>I need to get a real reference to the components inside PreferenceActivity.</p> <pre><code>CheckBoxPreference myPref = (CheckBoxPreference) findPreference("setting1"); View v = (View)myPref.getView(null, getListView()); </code></pre> <p>This code returns the view I want, but it is actually a copy of what I want and changing the properties there, doesn't change the real objects.</p> <p>Please note that I need to change some properties (such as color or alignment) of the components there. And Also I know that I can use Layout, but because of some reasons, I want to do it just programmatically</p>