Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake Mobile
Commits
9961ca58
Verified
Commit
9961ca58
authored
Jul 24, 2020
by
HashikD
Browse files
Changed ET summary to null when switch is off in preference
parent
2920b504
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/torproject/snowflake/fragments/AppSettingsFragment.java
View file @
9961ca58
...
...
@@ -60,9 +60,12 @@ public class AppSettingsFragment extends PreferenceFragmentCompat implements Sha
if
(!
previousValue
.
equals
(
""
))
editTextPreference
.
setSummary
(
previousValue
);
//When Switch is turned on set the summary to previously set Value.
else
editTextPreference
.
setSummary
(
SettingsConstants
.
DEFAULT
);
//If there is no previous value, then using
n
ul
l
.
editTextPreference
.
setSummary
(
SettingsConstants
.
DEFAULT
);
//If there is no previous value, then using
defa
ul
t
.
}
else
{
findPreference
(
key
).
setSummary
(
SettingsConstants
.
DEFAULT
);
//Default is shown when switch is off.
//Default is shown when switch is off.
findPreference
(
key
).
setSummary
(
SettingsConstants
.
DEFAULT
);
//When the switch is off the edit-text won't show any summary. Because it already signifies that the app is using default.
editTextPreference
.
setSummary
(
""
);
}
}
else
{
//It's an Edit Text
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment