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
c3f0e901
Commit
c3f0e901
authored
Jan 14, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new ChatSettings activity and ChatSettingsFragment.
parent
b968640d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
60 deletions
+117
-60
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-0
ChatSettings.java
.../java/com/xabber/android/ui/preferences/ChatSettings.java
+25
-0
ChatSettingsFragment.java
...m/xabber/android/ui/preferences/ChatSettingsFragment.java
+17
-0
preference_chat.xml
app/src/main/res/xml/preference_chat.xml
+61
-0
preference_editor.xml
app/src/main/res/xml/preference_editor.xml
+5
-60
No files found.
app/src/main/AndroidManifest.xml
View file @
c3f0e901
...
...
@@ -325,6 +325,15 @@
android:value=
"com.xabber.android.ui.preferences.PreferenceEditor"
/>
</activity>
<activity
android:name=
"com.xabber.android.ui.preferences.ChatSettings"
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/ChatSettings.java
0 → 100644
View file @
c3f0e901
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.ManagedActivity
;
import
com.xabber.androiddev.R
;
public
class
ChatSettings
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
ChatSettingsFragment
()).
commit
();
}
}
}
app/src/main/java/com/xabber/android/ui/preferences/ChatSettingsFragment.java
0 → 100644
View file @
c3f0e901
package
com
.
xabber
.
android
.
ui
.
preferences
;
import
android.os.Bundle
;
import
com.xabber.android.ui.helper.PreferenceSummaryHelper
;
import
com.xabber.androiddev.R
;
public
class
ChatSettingsFragment
extends
android
.
preference
.
PreferenceFragment
{
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
addPreferencesFromResource
(
R
.
xml
.
preference_chat
);
PreferenceSummaryHelper
.
updateSummary
(
getPreferenceScreen
());
}
}
app/src/main/res/xml/preference_chat.xml
0 → 100644
View file @
c3f0e901
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<CheckBoxPreference
android:title=
"@string/chats_show_avatars"
android:key=
"@string/chats_show_avatars_key"
android:defaultValue=
"@bool/chats_show_avatars_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_send_by_enter"
android:key=
"@string/chats_send_by_enter_key"
android:defaultValue=
"@bool/chats_send_by_enter_default"
/>
<ListPreference
android:title=
"@string/chats_show_status_change"
android:summary=
"@string/chats_show_status_change"
android:key=
"@string/chats_show_status_change_key"
android:entries=
"@array/chats_show_status_change_entries"
android:entryValues=
"@array/chats_show_status_change_entryvalues"
android:defaultValue=
"@string/chats_show_status_change_default"
/>
<ListPreference
android:title=
"@string/chats_hide_keyboard"
android:key=
"@string/chats_hide_keyboard_key"
android:entries=
"@array/chats_hide_keyboard_entries"
android:entryValues=
"@array/chats_hide_keyboard_entryvalues"
android:defaultValue=
"@string/chats_hide_keyboard_default"
/>
<ListPreference
android:title=
"@string/chats_font_size"
android:key=
"@string/chats_font_size_key"
android:entries=
"@array/chats_font_size_entries"
android:entryValues=
"@array/chats_font_size_entryvalues"
android:defaultValue=
"@string/chats_font_size_default"
/>
<ListPreference
android:title=
"@string/chats_divide"
android:key=
"@string/chats_divide_key"
android:entries=
"@array/chats_divide_entries"
android:entryValues=
"@array/chats_divide_entryvalues"
android:defaultValue=
"@string/chats_divide_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_state_notification"
android:key=
"@string/chats_state_notification_key"
android:defaultValue=
"@bool/chats_state_notification_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_attention"
android:key=
"@string/chats_attention_key"
android:defaultValue=
"@bool/chats_attention_default"
/>
<RingtonePreference
android:title=
"@string/chats_attention_sound"
android:key=
"@string/chats_attention_sound_key"
android:defaultValue=
"@string/chats_attention_sound_default"
android:ringtoneType=
"ringtone"
android:dependency=
"@string/chats_attention_key"
android:showSilent=
"true"
android:showDefault=
"true"
/>
</PreferenceScreen>
\ No newline at end of file
app/src/main/res/xml/preference_editor.xml
View file @
c3f0e901
...
...
@@ -38,69 +38,14 @@
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.ContactListSettings"
/>
</Preference>
<Preference
Screen
<Preference
android:title=
"@string/preference_chats"
android:key=
"@string/preference_chats"
>
<CheckBoxPreference
android:title=
"@string/chats_show_avatars"
android:key=
"@string/chats_show_avatars_key"
android:defaultValue=
"@bool/chats_show_avatars_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_send_by_enter"
android:key=
"@string/chats_send_by_enter_key"
android:defaultValue=
"@bool/chats_send_by_enter_default"
/>
<ListPreference
android:title=
"@string/chats_show_status_change"
android:summary=
"@string/chats_show_status_change"
android:key=
"@string/chats_show_status_change_key"
android:entries=
"@array/chats_show_status_change_entries"
android:entryValues=
"@array/chats_show_status_change_entryvalues"
android:defaultValue=
"@string/chats_show_status_change_default"
/>
<ListPreference
android:title=
"@string/chats_hide_keyboard"
android:key=
"@string/chats_hide_keyboard_key"
android:entries=
"@array/chats_hide_keyboard_entries"
android:entryValues=
"@array/chats_hide_keyboard_entryvalues"
android:defaultValue=
"@string/chats_hide_keyboard_default"
/>
<ListPreference
android:title=
"@string/chats_font_size"
android:key=
"@string/chats_font_size_key"
android:entries=
"@array/chats_font_size_entries"
android:entryValues=
"@array/chats_font_size_entryvalues"
android:defaultValue=
"@string/chats_font_size_default"
/>
<ListPreference
android:title=
"@string/chats_divide"
android:key=
"@string/chats_divide_key"
android:entries=
"@array/chats_divide_entries"
android:entryValues=
"@array/chats_divide_entryvalues"
android:defaultValue=
"@string/chats_divide_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_state_notification"
android:key=
"@string/chats_state_notification_key"
android:defaultValue=
"@bool/chats_state_notification_default"
/>
<CheckBoxPreference
android:title=
"@string/chats_attention"
android:key=
"@string/chats_attention_key"
android:defaultValue=
"@bool/chats_attention_default"
/>
<RingtonePreference
android:title=
"@string/chats_attention_sound"
android:key=
"@string/chats_attention_sound_key"
android:defaultValue=
"@string/chats_attention_sound_default"
android:ringtoneType=
"ringtone"
android:dependency=
"@string/chats_attention_key"
android:showSilent=
"true"
android:showDefault=
"true"
/>
</PreferenceScreen>
<intent
android:targetPackage=
"@string/application_package"
android:targetClass=
"com.xabber.android.ui.preferences.ChatSettings"
/>
</Preference>
<PreferenceScreen
android:title=
"@string/preference_events"
android:key=
"@string/preference_events"
...
...
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