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
31af9d80
Commit
31af9d80
authored
Apr 13, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account toggle mode: "dark" account action buttons for not selected accounts.
parent
bc458cf9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
AccountActionButtonsAdapter.java
...abber/android/ui/adapter/AccountActionButtonsAdapter.java
+11
-7
account_action_button.xml
app/src/main/res/layout/account_action_button.xml
+1
-1
No files found.
app/src/main/java/com/xabber/android/ui/adapter/AccountActionButtonsAdapter.java
View file @
31af9d80
...
...
@@ -8,7 +8,6 @@ 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
;
...
...
@@ -96,15 +95,20 @@ public class AccountActionButtonsAdapter implements UpdatableAdapter {
backgroundActionButton
.
setColorPressed
(
accountStatusBarColors
[
colorLevel
]);
backgroundActionButton
.
setColorRipple
(
accountBackgroundColors
[
colorLevel
]);
St
atusMode
statusMode
=
AccountManager
.
getInstance
().
getAccount
(
account
).
getDisplayStatusMode
();
St
ring
selectedAccount
=
AccountManager
.
getInstance
().
getSelectedAccount
();
int
connectionIndicatorVisibility
;
if
(
statusMode
==
StatusMode
.
connection
||
statusMode
==
StatusMode
.
unavailable
)
{
connectionIndicatorVisibility
=
View
.
VISIBLE
;
int
shadowVisibility
;
if
(
selectedAccount
==
null
)
{
shadowVisibility
=
View
.
GONE
;
}
else
{
connectionIndicatorVisibility
=
View
.
GONE
;
shadowVisibility
=
View
.
VISIBLE
;
if
(
selectedAccount
.
equalsIgnoreCase
(
account
))
{
shadowVisibility
=
View
.
GONE
;
}
}
view
.
findViewById
(
R
.
id
.
account_connection_indicator
).
setVisibility
(
connectionIndicatorVisibility
);
view
.
findViewById
(
R
.
id
.
account_shadow
).
setVisibility
(
shadowVisibility
);
}
}
...
...
app/src/main/res/layout/account_action_button.xml
View file @
31af9d80
...
...
@@ -38,7 +38,7 @@
/>
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/account_
connection_indicator
"
android:id=
"@+id/account_
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