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
efc5f242
Commit
efc5f242
authored
Feb 17, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContactList: contact colors fixed.
parent
8f43ee86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
BaseContactInflater.java
...va/com/xabber/android/ui/adapter/BaseContactInflater.java
+6
-1
No files found.
app/src/main/java/com/xabber/android/ui/adapter/BaseContactInflater.java
View file @
efc5f242
...
...
@@ -20,6 +20,7 @@ import android.graphics.Bitmap;
import
android.graphics.BitmapFactory
;
import
android.graphics.Shader.TileMode
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.ColorDrawable
;
import
android.view.Gravity
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -56,6 +57,7 @@ public abstract class BaseContactInflater {
* Managed adapter.
*/
BaseAdapter
adapter
;
private
final
int
[]
accountColors
;
public
BaseContactInflater
(
Activity
activity
)
{
this
.
activity
=
activity
;
...
...
@@ -65,6 +67,8 @@ public abstract class BaseContactInflater {
Bitmap
bitmap
=
BitmapFactory
.
decodeResource
(
activity
.
getResources
(),
R
.
drawable
.
shadow
);
shadowDrawable
=
new
BitmapDrawable
(
activity
.
getResources
(),
bitmap
);
shadowDrawable
.
setTileModeXY
(
TileMode
.
REPEAT
,
TileMode
.
REPEAT
);
accountColors
=
activity
.
getResources
().
getIntArray
(
R
.
array
.
account_action_bar
);
}
/**
...
...
@@ -118,7 +122,8 @@ public abstract class BaseContactInflater {
viewHolder
.
shadow
.
setVisibility
(
View
.
VISIBLE
);
}
viewHolder
.
color
.
setImageLevel
(
abstractContact
.
getColorLevel
());
int
colorLevel
=
abstractContact
.
getColorLevel
();
viewHolder
.
color
.
setImageDrawable
(
new
ColorDrawable
(
accountColors
[
colorLevel
]));
if
(
SettingsManager
.
contactsShowAvatars
())
{
viewHolder
.
avatar
.
setVisibility
(
View
.
VISIBLE
);
...
...
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