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
286a9398
Commit
286a9398
authored
Apr 15, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Offline shadow for account action buttons returned.
parent
641cc02b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
6 deletions
+31
-6
AccountActionButtonsAdapter.java
...abber/android/ui/adapter/AccountActionButtonsAdapter.java
+12
-1
GroupedContactAdapter.java
.../com/xabber/android/ui/adapter/GroupedContactAdapter.java
+4
-4
ic_offline_shadow_24dp.png
app/src/main/res/drawable-hdpi/ic_offline_shadow_24dp.png
+0
-0
ic_offline_shadow_24dp.png
app/src/main/res/drawable-mdpi/ic_offline_shadow_24dp.png
+0
-0
ic_offline_shadow_24dp.png
app/src/main/res/drawable-xhdpi/ic_offline_shadow_24dp.png
+0
-0
ic_offline_shadow_24dp.png
app/src/main/res/drawable-xxhdpi/ic_offline_shadow_24dp.png
+0
-0
account_action_button.xml
app/src/main/res/layout/account_action_button.xml
+15
-1
No files found.
app/src/main/java/com/xabber/android/ui/adapter/AccountActionButtonsAdapter.java
View file @
286a9398
...
...
@@ -8,6 +8,7 @@ import android.widget.LinearLayout;
import
com.melnykov.fab.FloatingActionButton
;
import
com.xabber.android.data.account.AccountManager
;
import
com.xabber.android.data.account.StatusMode
;
import
com.xabber.android.data.extension.avatar.AvatarManager
;
import
com.xabber.androiddev.R
;
...
...
@@ -108,7 +109,17 @@ public class AccountActionButtonsAdapter implements UpdatableAdapter {
}
}
view
.
findViewById
(
R
.
id
.
account_shadow
).
setVisibility
(
shadowVisibility
);
view
.
findViewById
(
R
.
id
.
account_unselected_shadow
).
setVisibility
(
shadowVisibility
);
StatusMode
statusMode
=
AccountManager
.
getInstance
().
getAccount
(
account
).
getDisplayStatusMode
();
int
offlineShadowVisibility
;
if
(
statusMode
==
StatusMode
.
connection
||
statusMode
==
StatusMode
.
unavailable
)
{
offlineShadowVisibility
=
View
.
VISIBLE
;
}
else
{
offlineShadowVisibility
=
View
.
GONE
;
}
view
.
findViewById
(
R
.
id
.
account_offline_shadow
).
setVisibility
(
offlineShadowVisibility
);
}
}
...
...
app/src/main/java/com/xabber/android/ui/adapter/GroupedContactAdapter.java
View file @
286a9398
...
...
@@ -323,6 +323,7 @@ public abstract class GroupedContactAdapter extends BaseAdapter implements Updat
int
color
;
viewHolder
.
groupOfflineIndicator
.
setVisibility
(
View
.
GONE
);
viewHolder
.
offlineShadow
.
setVisibility
(
View
.
GONE
);
if
(
configuration
.
getUser
().
equals
(
GroupManager
.
ACTIVE_CHATS
))
{
color
=
activeChatsColor
;
...
...
@@ -334,13 +335,12 @@ public abstract class GroupedContactAdapter extends BaseAdapter implements Updat
color
=
accountSubgroupColors
[
level
];
viewHolder
.
groupOfflineIndicator
.
setVisibility
(
View
.
VISIBLE
);
if
(!
configuration
.
getAccount
().
equalsIgnoreCase
(
GroupManager
.
NO_ACCOUNT
))
{
StatusMode
statusMode
=
AccountManager
.
getInstance
().
getAccount
(
configuration
.
getAccount
()).
getDisplayStatusMode
();
AccountItem
accountItem
=
AccountManager
.
getInstance
().
getAccount
(
configuration
.
getAccount
());
if
(
accountItem
!=
null
)
{
StatusMode
statusMode
=
accountItem
.
getDisplayStatusMode
();
if
(
statusMode
==
StatusMode
.
unavailable
||
statusMode
==
StatusMode
.
connection
)
{
viewHolder
.
offlineShadow
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
viewHolder
.
offlineShadow
.
setVisibility
(
View
.
GONE
);
}
}
}
...
...
app/src/main/res/drawable-hdpi/ic_offline_shadow_24dp.png
0 → 100644
View file @
286a9398
204 Bytes
app/src/main/res/drawable-mdpi/ic_offline_shadow_24dp.png
0 → 100644
View file @
286a9398
191 Bytes
app/src/main/res/drawable-xhdpi/ic_offline_shadow_24dp.png
0 → 100644
View file @
286a9398
228 Bytes
app/src/main/res/drawable-xxhdpi/ic_offline_shadow_24dp.png
0 → 100644
View file @
286a9398
299 Bytes
app/src/main/res/layout/account_action_button.xml
View file @
286a9398
...
...
@@ -38,7 +38,21 @@
/>
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/account_shadow"
android:id=
"@+id/account_offline_shadow"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/ic_offline_shadow_24dp"
android:elevation=
"8dp"
android:visibility=
"gone"
android:layout_marginTop=
"4dp"
android:layout_marginBottom=
"12dp"
android:layout_marginLeft=
"16dp"
android:layout_marginRight=
"16dp"
/>
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/account_unselected_shadow"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@color/black"
...
...
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