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
31bce8cd
Commit
31bce8cd
authored
Feb 24, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewerFragment: background set according to account.
parent
dab100a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+6
-0
color_arrays.xml
app/src/main/res/values/color_arrays.xml
+5
-5
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
31bce8cd
...
...
@@ -4,6 +4,7 @@ import android.app.Fragment;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Context
;
import
android.graphics.drawable.ColorDrawable
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
...
...
@@ -22,6 +23,7 @@ import android.widget.ListView;
import
android.widget.TextView
;
import
com.xabber.android.data.SettingsManager
;
import
com.xabber.android.data.account.AccountManager
;
import
com.xabber.android.data.extension.cs.ChatStateManager
;
import
com.xabber.android.data.message.MessageItem
;
import
com.xabber.android.data.message.MessageManager
;
...
...
@@ -74,6 +76,10 @@ public class ChatViewerFragment extends Fragment {
listView
=
(
ListView
)
view
.
findViewById
(
android
.
R
.
id
.
list
);
listView
.
setAdapter
(
chatMessageAdapter
);
view
.
setBackgroundDrawable
(
new
ColorDrawable
(
getActivity
().
getResources
().
getIntArray
(
R
.
array
.
account_chat_background
)[
AccountManager
.
getInstance
().
getColorLevel
(
account
)]));
inputView
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
chat_input
);
view
.
findViewById
(
R
.
id
.
chat_send
).
setOnClickListener
(
...
...
app/src/main/res/values/color_arrays.xml
View file @
31bce8cd
...
...
@@ -14,11 +14,11 @@
<item>
@color/dark_purple_700
</item>
</array>
<array
name=
"accout_chat_background"
>
<item>
@color/teal_
A1
00
</item>
<item>
@color/deep_orange_
A1
00
</item>
<item>
@color/pink_
A1
00
</item>
<item>
@color/dark_purple_
A1
00
</item>
<array
name=
"accou
n
t_chat_background"
>
<item>
@color/teal_
9
00
</item>
<item>
@color/deep_orange_
9
00
</item>
<item>
@color/pink_
9
00
</item>
<item>
@color/dark_purple_
9
00
</item>
</array>
<color
name=
"account_disabled"
>
@color/black_dividers
</color>
...
...
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