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
f3eb8195
Commit
f3eb8195
authored
Jan 14, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New NotificationsSettings activity and NotificationsSettingsFragment.
parent
c3f0e901
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
64 deletions
+122
-64
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+11
-2
ChatSettingsFragment.java
...m/xabber/android/ui/preferences/ChatSettingsFragment.java
+1
-1
NotificationsSettings.java
.../xabber/android/ui/preferences/NotificationsSettings.java
+26
-0
NotificationsSettingsFragment.java
...android/ui/preferences/NotificationsSettingsFragment.java
+18
-0
preference_editor.xml
app/src/main/res/xml/preference_editor.xml
+5
-61
preference_notifications.xml
app/src/main/res/xml/preference_notifications.xml
+61
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
f3eb8195
...
...
@@ -279,11 +279,11 @@
<activity
android:name=
"com.xabber.android.ui.preferences.PhraseList"
android:label=
"@string/events_phrases_title"
android:parentActivityName=
"com.xabber.android.ui.preferences.
PreferenceEditor
"
>
android:parentActivityName=
"com.xabber.android.ui.preferences.
NotificationsSettings
"
>
<!-- 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
"
/>
android:value=
"com.xabber.android.ui.preferences.
NotificationsSettings
"
/>
</activity>
<activity
android:name=
"com.xabber.android.ui.preferences.PhraseEditor"
...
...
@@ -334,6 +334,15 @@
android:value=
"com.xabber.android.ui.preferences.PreferenceEditor"
/>
</activity>
<activity
android:name=
"com.xabber.android.ui.preferences.NotificationsSettings"
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/ChatSettingsFragment.java
View file @
f3eb8195
app/src/main/java/com/xabber/android/ui/preferences/NotificationsSettings.java
0 → 100644
View file @
f3eb8195
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.ManagedActivity
;
import
com.xabber.androiddev.R
;
public
class
NotificationsSettings
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
NotificationsSettingsFragment
()).
commit
();
}
}
}
app/src/main/java/com/xabber/android/ui/preferences/NotificationsSettingsFragment.java
0 → 100644
View file @
f3eb8195
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.PreferenceSummaryHelper
;
import
com.xabber.androiddev.R
;
public
class
NotificationsSettingsFragment
extends
android
.
preference
.
PreferenceFragment
{
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
addPreferencesFromResource
(
R
.
xml
.
preference_notifications
);
PreferenceSummaryHelper
.
updateSummary
(
getPreferenceScreen
());
}
}
app/src/main/res/xml/preference_editor.xml
View file @
f3eb8195
...
...
@@ -46,70 +46,14 @@
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.ChatSettings"
/>
</Preference>
<Preference
Screen
<Preference
android:title=
"@string/preference_events"
android:key=
"@string/preference_events"
>
<RingtonePreference
android:title=
"@string/events_sound"
android:key=
"@string/events_sound_key"
android:defaultValue=
"@string/events_sound_default"
android:ringtoneType=
"notification"
android:showSilent=
"true"
android:showDefault=
"true"
/>
<CheckBoxPreference
android:title=
"@string/events_vibro"
android:key=
"@string/events_vibro_key"
android:defaultValue=
"@bool/events_vibro_default"
/>
<CheckBoxPreference
android:title=
"@string/events_ignore_system_vibro"
android:key=
"@string/events_ignore_system_vibro_key"
android:defaultValue=
"@bool/events_ignore_system_vibro_default"
android:dependency=
"@string/events_vibro_key"
/>
<CheckBoxPreference
android:title=
"@string/events_lightning"
android:key=
"@string/events_lightning_key"
android:defaultValue=
"@bool/events_lightning_default"
/>
<CheckBoxPreference
android:title=
"@string/events_persistent"
android:key=
"@string/events_persistent_key"
android:defaultValue=
"@bool/events_persistent_default"
/>
<CheckBoxPreference
android:title=
"@string/events_show_text"
android:key=
"@string/events_show_text_key"
android:defaultValue=
"@bool/events_show_text_default"
/>
<ListPreference
android:title=
"@string/events_message"
android:key=
"@string/events_message_key"
android:entries=
"@array/events_message_entries"
android:entryValues=
"@array/events_message_entryvalues"
android:defaultValue=
"@string/events_message_default"
/>
<CheckBoxPreference
android:title=
"@string/events_visible_chat"
android:key=
"@string/events_visible_chat_key"
android:defaultValue=
"@bool/events_visible_chat_default"
/>
<CheckBoxPreference
android:title=
"@string/events_first_only"
android:key=
"@string/events_first_only_key"
android:defaultValue=
"@bool/events_first_only_default"
/>
<Preference
android:title=
"@string/events_phrases"
android:key=
"@string/events_phrases"
>
<intent
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.PhraseList
"
/>
android:targetClass=
"com.xabber.android.ui.preferences.NotificationsSettings
"
/>
</Preference>
</PreferenceScreen>
<PreferenceScreen
android:title=
"@string/preference_connection"
android:key=
"@string/preference_connection"
...
...
app/src/main/res/xml/preference_notifications.xml
0 → 100644
View file @
f3eb8195
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<RingtonePreference
android:title=
"@string/events_sound"
android:key=
"@string/events_sound_key"
android:defaultValue=
"@string/events_sound_default"
android:ringtoneType=
"notification"
android:showSilent=
"true"
android:showDefault=
"true"
/>
<CheckBoxPreference
android:title=
"@string/events_vibro"
android:key=
"@string/events_vibro_key"
android:defaultValue=
"@bool/events_vibro_default"
/>
<CheckBoxPreference
android:title=
"@string/events_ignore_system_vibro"
android:key=
"@string/events_ignore_system_vibro_key"
android:defaultValue=
"@bool/events_ignore_system_vibro_default"
android:dependency=
"@string/events_vibro_key"
/>
<CheckBoxPreference
android:title=
"@string/events_lightning"
android:key=
"@string/events_lightning_key"
android:defaultValue=
"@bool/events_lightning_default"
/>
<CheckBoxPreference
android:title=
"@string/events_persistent"
android:key=
"@string/events_persistent_key"
android:defaultValue=
"@bool/events_persistent_default"
/>
<CheckBoxPreference
android:title=
"@string/events_show_text"
android:key=
"@string/events_show_text_key"
android:defaultValue=
"@bool/events_show_text_default"
/>
<ListPreference
android:title=
"@string/events_message"
android:key=
"@string/events_message_key"
android:entries=
"@array/events_message_entries"
android:entryValues=
"@array/events_message_entryvalues"
android:defaultValue=
"@string/events_message_default"
/>
<CheckBoxPreference
android:title=
"@string/events_visible_chat"
android:key=
"@string/events_visible_chat_key"
android:defaultValue=
"@bool/events_visible_chat_default"
/>
<CheckBoxPreference
android:title=
"@string/events_first_only"
android:key=
"@string/events_first_only_key"
android:defaultValue=
"@bool/events_first_only_default"
/>
<Preference
android:title=
"@string/events_phrases"
android:key=
"@string/events_phrases"
>
<intent
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.PhraseList"
/>
</Preference>
</PreferenceScreen>
\ No newline at end of file
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