Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SedentaryBehaviourApplication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Joseph De Jonckheere CESM2014
SedentaryBehaviourApplication
Commits
934781ad
Commit
934781ad
authored
7 years ago
by
Peter Joseph De Jonckheere CESM2014
Browse files
Options
Downloads
Patches
Plain Diff
Fixed further problems with settings page
parent
1cb496be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/example/pharmacy/frontEnd/Settings.java
+3
-3
3 additions, 3 deletions
src/main/java/com/example/pharmacy/frontEnd/Settings.java
with
3 additions
and
3 deletions
src/main/java/com/example/pharmacy/frontEnd/Settings.java
+
3
−
3
View file @
934781ad
...
...
@@ -34,7 +34,7 @@ public class Settings extends AppCompatActivity{
((
CheckBox
)
findViewById
(
R
.
id
.
Audio
)).
setChecked
(
shared
.
getBoolean
(
getString
(
R
.
string
.
audio
),
false
));
((
CheckBox
)
findViewById
(
R
.
id
.
Vibration
)).
setChecked
(
shared
.
getBoolean
(
getString
(
R
.
string
.
vibration
),
false
));
((
CheckBox
)
findViewById
(
R
.
id
.
LEDFlash
)).
setChecked
(
shared
.
getBoolean
(
getString
(
R
.
string
.
led
),
false
));
findViewById
(
R
.
id
.
spinner
).
set
Top
(
shared
.
getInt
(
getString
(
R
.
string
.
daily_goal
),
R
.
integer
.
notify_period_minutes
));
((
Spinner
)
findViewById
(
R
.
id
.
spinner
)
)
.
set
Selection
(
shared
.
getInt
(
getString
(
R
.
string
.
daily_goal
),
R
.
integer
.
notify_period_minutes
));
((
EditText
)
findViewById
(
R
.
id
.
notificationMessage
)).
setText
(
shared
.
getString
(
getString
(
R
.
string
.
daily_goal_text
),
getString
(
R
.
string
.
notf_text
)));
}
...
...
@@ -62,8 +62,8 @@ public class Settings extends AppCompatActivity{
boolean
audio
=
((
CheckBox
)
findViewById
(
R
.
id
.
Audio
)).
isChecked
();
boolean
vibration
=
((
CheckBox
)
findViewById
(
R
.
id
.
Vibration
)).
isChecked
();
boolean
led
=
((
CheckBox
)
findViewById
(
R
.
id
.
LEDFlash
)).
isChecked
();
int
notifyGap
=
findViewById
(
R
.
id
.
spinner
).
get
Top
();
//???
String
message
=
(
findViewById
(
R
.
id
.
notificationMessage
)).
toString
();
int
notifyGap
=
((
Spinner
)
findViewById
(
R
.
id
.
spinner
)
)
.
get
SelectedItemPosition
();
//???
String
message
=
(
(
EditText
)
findViewById
(
R
.
id
.
notificationMessage
)).
getText
().
toString
();
SharedPreferences
sharedPref
=
view
.
getContext
().
getSharedPreferences
(
getString
(
R
.
string
.
preference_file_key
),
Context
.
MODE_PRIVATE
);
SharedPreferences
.
Editor
editor
=
sharedPref
.
edit
();
editor
.
putBoolean
(
getString
(
R
.
string
.
audio
),
audio
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment