Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
b67909d5
Commit
b67909d5
authored
Jan 14, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New ConnectionSettings activity and ConnectionSettingsFragment.
parent
f3eb8195
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
80 deletions
+137
-80
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-0
ConnectionSettings.java
...com/xabber/android/ui/preferences/ConnectionSettings.java
+25
-0
ConnectionSettingsFragment.java
...er/android/ui/preferences/ConnectionSettingsFragment.java
+17
-0
preference_connection.xml
app/src/main/res/xml/preference_connection.xml
+81
-0
preference_editor.xml
app/src/main/res/xml/preference_editor.xml
+5
-80
No files found.
app/src/main/AndroidManifest.xml
View file @
b67909d5
...
...
@@ -343,6 +343,15 @@
android:value=
"com.xabber.android.ui.preferences.PreferenceEditor"
/>
</activity>
<activity
android:name=
"com.xabber.android.ui.preferences.ConnectionSettings"
android:parentActivityName=
"com.xabber.android.ui.preferences.PreferenceEditor"
>
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
"com.xabber.android.ui.preferences.PreferenceEditor"
/>
</activity>
<service
android:name=
"com.xabber.android.service.XabberService"
/>
<service
android:name=
"com.xabber.android.service.SyncAdapterService"
...
...
app/src/main/java/com/xabber/android/ui/preferences/ConnectionSettings.java
0 → 100644
View file @
b67909d5
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.ManagedActivity
;
import
com.xabber.androiddev.R
;
public
class
ConnectionSettings
extends
ManagedActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
isFinishing
())
return
;
setContentView
(
R
.
layout
.
activity_preferences
);
getActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
if
(
savedInstanceState
==
null
)
{
getFragmentManager
().
beginTransaction
()
.
add
(
R
.
id
.
preferences_activity_container
,
new
ConnectionSettingsFragment
()).
commit
();
}
}
}
app/src/main/java/com/xabber/android/ui/preferences/ConnectionSettingsFragment.java
0 → 100644
View file @
b67909d5
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.PreferenceSummaryHelper
;
import
com.xabber.androiddev.R
;
public
class
ConnectionSettingsFragment
extends
android
.
preference
.
PreferenceFragment
{
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
addPreferencesFromResource
(
R
.
xml
.
preference_connection
);
PreferenceSummaryHelper
.
updateSummary
(
getPreferenceScreen
());
}
}
app/src/main/res/xml/preference_connection.xml
0 → 100644
View file @
b67909d5
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<CheckBoxPreference
android:title=
"@string/connection_start_at_boot"
android:key=
"@string/connection_start_at_boot_key"
android:defaultValue=
"@bool/connection_start_at_boot_default"
/>
<ListPreference
android:title=
"@string/connection_go_away"
android:key=
"@string/connection_go_away_key"
android:entries=
"@array/connection_go_away_entries"
android:entryValues=
"@array/connection_go_away_entryvalues"
android:defaultValue=
"@string/connection_go_away_default"
/>
<ListPreference
android:title=
"@string/connection_go_xa"
android:key=
"@string/connection_go_xa_key"
android:entries=
"@array/connection_go_xa_entries"
android:entryValues=
"@array/connection_go_xa_entryvalues"
android:defaultValue=
"@string/connection_go_xa_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_wifi_lock"
android:key=
"@string/connection_wifi_lock_key"
android:defaultValue=
"@bool/connection_wifi_lock_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_wake_lock"
android:key=
"@string/connection_wake_lock_key"
android:defaultValue=
"@bool/connection_wake_lock_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_load_vcard"
android:key=
"@string/connection_load_vcard_key"
android:defaultValue=
"@bool/connection_load_vcard_default"
/>
<PreferenceCategory
android:title=
"@string/connection_priority"
>
<CheckBoxPreference
android:title=
"@string/connection_adjust_priority"
android:key=
"@string/connection_adjust_priority_key"
android:defaultValue=
"@bool/connection_adjust_priority_default"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_chat_key"
android:defaultValue=
"@string/connection_priority_chat_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/chat"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_available_key"
android:defaultValue=
"@string/connection_priority_available_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/available"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_away_key"
android:defaultValue=
"@string/connection_priority_away_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/away"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_xa_key"
android:defaultValue=
"@string/connection_priority_xa_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/xa"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_dnd_key"
android:defaultValue=
"@string/connection_priority_dnd_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/dnd"
android:singleLine=
"true"
/>
</PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file
app/src/main/res/xml/preference_editor.xml
View file @
b67909d5
...
...
@@ -54,89 +54,14 @@
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.NotificationsSettings"
/>
</Preference>
<Preference
Screen
<Preference
android:title=
"@string/preference_connection"
android:key=
"@string/preference_connection"
>
<CheckBoxPreference
android:title=
"@string/connection_start_at_boot"
android:key=
"@string/connection_start_at_boot_key"
android:defaultValue=
"@bool/connection_start_at_boot_default"
/>
<ListPreference
android:title=
"@string/connection_go_away"
android:key=
"@string/connection_go_away_key"
android:entries=
"@array/connection_go_away_entries"
android:entryValues=
"@array/connection_go_away_entryvalues"
android:defaultValue=
"@string/connection_go_away_default"
/>
<ListPreference
android:title=
"@string/connection_go_xa"
android:key=
"@string/connection_go_xa_key"
android:entries=
"@array/connection_go_xa_entries"
android:entryValues=
"@array/connection_go_xa_entryvalues"
android:defaultValue=
"@string/connection_go_xa_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_wifi_lock"
android:key=
"@string/connection_wifi_lock_key"
android:defaultValue=
"@bool/connection_wifi_lock_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_wake_lock"
android:key=
"@string/connection_wake_lock_key"
android:defaultValue=
"@bool/connection_wake_lock_default"
/>
<CheckBoxPreference
android:title=
"@string/connection_load_vcard"
android:key=
"@string/connection_load_vcard_key"
android:defaultValue=
"@bool/connection_load_vcard_default"
/>
<PreferenceCategory
android:title=
"@string/connection_priority"
>
<CheckBoxPreference
android:title=
"@string/connection_adjust_priority"
android:key=
"@string/connection_adjust_priority_key"
android:defaultValue=
"@bool/connection_adjust_priority_default"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_chat_key"
android:defaultValue=
"@string/connection_priority_chat_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/chat"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_available_key"
android:defaultValue=
"@string/connection_priority_available_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/available"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_away_key"
android:defaultValue=
"@string/connection_priority_away_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/away"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_xa_key"
android:defaultValue=
"@string/connection_priority_xa_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/xa"
android:singleLine=
"true"
/>
<com.xabber.android.ui.widget.PriorityPreference
android:key=
"@string/connection_priority_dnd_key"
android:defaultValue=
"@string/connection_priority_dnd_default"
android:dependency=
"@string/connection_adjust_priority_key"
android:title=
"@string/dnd"
android:singleLine=
"true"
/>
</PreferenceCategory>
</PreferenceScreen>
<intent
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.ConnectionSettings"
/>
</Preference>
<PreferenceScreen
android:title=
"@string/preference_security"
android:key=
"@string/preference_security"
...
...
Write
Preview
Markdown
is supported
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