Jake
Jake

Reputation: 16837

List of options in Android Settings app

The Settings app in Android has the following source code: Code

The Settings class derives from the PreferenceActivity. Even with the android source code, I am not able to figure out what code in the class is responsible for displaying the difference options in the settings screen.

My guess is that the right code is in onResume():

 public void onResume() {
    super.onResume();

    ListAdapter listAdapter = getListAdapter();
    if (listAdapter instanceof HeaderAdapter) {
        ((HeaderAdapter) listAdapter).resume();
    }
}

Can someone help?

Thanks.

Upvotes: 0

Views: 823

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006744

I am not able to figure out what code in the class is responsible for displaying the difference options in the settings screen.

That is mostly in the preference XML, such as this file that declares the preference headers (left column on a tablet's view of Settings). Some preferences are implemented via custom PreferenceFragments, where the UI departs from the preference norms.

Upvotes: 1

Related Questions