Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
savoirfairelinux
jami-client-android
Commits
c64bfb44
Commit
c64bfb44
authored
12 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#16682: Enable AccountCreation action account preference field are set
parent
d103a76d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/com/savoirfairelinux/sflphone/client/AccountCreationActivity.java
+18
-13
18 additions, 13 deletions
...irfairelinux/sflphone/client/AccountCreationActivity.java
with
18 additions
and
13 deletions
src/com/savoirfairelinux/sflphone/client/AccountCreationActivity.java
+
18
−
13
View file @
c64bfb44
...
...
@@ -77,21 +77,19 @@ public class AccountCreationActivity extends PreferenceActivity
private
AccountDetailAdvanced
advancedDetails
;
private
AccountDetailSrtp
srtpDetails
;
private
AccountDetailTls
tlsDetails
;
private
MenuItem
createAccountAction
=
null
;
Preference
.
OnPreferenceChangeListener
changeNewAccountPreferenceListener
=
new
Preference
.
OnPreferenceChangeListener
()
{
public
boolean
onPreferenceChange
(
Preference
preference
,
Object
newValue
)
{
preference
.
setSummary
(
getString
(
R
.
string
.
account_current_value_label
)
+
(
CharSequence
)
newValue
);
AccountCreationActivity
activity
=
(
AccountCreationActivity
)
preference
.
getContext
();
activity
.
validateAccountCreation
();
return
true
;
}
};
Preference
.
OnPreferenceChangeListener
changeNewAccountTwoStateListener
=
new
Preference
.
OnPreferenceChangeListener
()
{
public
boolean
onPreferenceChange
(
Preference
preference
,
Object
newValue
)
{
if
(((
CheckBoxPreference
)
preference
).
isChecked
())
{
preference
.
setSummary
(
getString
(
R
.
string
.
account_current_value_label
)
+
"enabled"
);
}
else
{
preference
.
setSummary
(
getString
(
R
.
string
.
account_current_value_label
)
+
"disabled"
);
}
return
true
;
}
};
...
...
@@ -139,29 +137,36 @@ public class AccountCreationActivity extends PreferenceActivity
AlertDialog
alertDialog
=
builder
.
create
();
alertDialog
.
setOwnerActivity
(
ownerActivity
);
return
alertDialog
;
return
alertDialog
;
}
public
boolean
validateAccountCreation
()
{
createAccountAction
.
setEnabled
(
true
);
return
true
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
addPreferencesFromResource
(
R
.
xml
.
account_creation_preferences
);
mPreferenceManager
=
getPreferenceManager
();
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
MenuItem
actionItem
=
menu
.
add
(
"Create Account"
);
actionItem
.
setShowAsAction
(
MenuItem
.
SHOW_AS_ACTION_ALWAYS
);
createAccountAction
=
menu
.
add
(
"Create Account"
);
createAccountAction
.
setShowAsAction
(
MenuItem
.
SHOW_AS_ACTION_ALWAYS
);
createAccountAction
.
setEnabled
(
false
);
return
true
;
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
createNewAccount
();
finish
();
if
(
item
.
isEnabled
())
{
createNewAccount
();
finish
();
}
return
true
;
}
...
...
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