Implement HTTP proxy summary as a SummaryProvider (#3091)
* Handle preference fragments using the framework The previous code started new preference "screens" as activities, even though each one hosted a single fragment. Modify this to use the framework's support for swapping in/out different preference fragments. PreferencesActivity: - Remove the code for launching tab and proxy preferences - Remove the code for setting titles, each fragment is responsible for that - Implement OnPreferenceStartFragmentCallback to swap fragments in/out with the correct animation PreferencesFragment: - Use `fragment` property instead of `setOnPreferenceClickListener` - Set the activity title when resuming Everything else: - Set the activity title when resuming * Implement HTTP proxy summary as a SummaryProvider Uses the frameworks's support for setting summaries instead of rolling our own. Also fix a tiny bug -- the minimum port number to connect to should be 1, not 0. * Lint
This commit is contained in:
parent
9cf4882f41
commit
aa96d02923
4 changed files with 39 additions and 28 deletions
|
|
@ -291,6 +291,9 @@
|
|||
<string name="pref_title_http_proxy_server">HTTP proxy server</string>
|
||||
<string name="pref_title_http_proxy_port">HTTP proxy port</string>
|
||||
<string name="pref_title_http_proxy_port_message">Port should be between %d and %d</string>
|
||||
<string name="pref_summary_http_proxy_disabled">Disabled</string>
|
||||
<string name="pref_summary_http_proxy_missing"><not set></string>
|
||||
<string name="pref_summary_http_proxy_invalid"><invalid></string>
|
||||
|
||||
<string name="pref_default_post_privacy">Default post privacy</string>
|
||||
<string name="pref_default_post_language">Default posting language</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue