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
79fd3de0
Commit
79fd3de0
authored
Apr 15, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account choose spinner layout corrected.
parent
2694c9a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
68 deletions
+2
-68
AccountChooseAdapter.java
...a/com/xabber/android/ui/adapter/AccountChooseAdapter.java
+1
-16
account_choose_dropdown.xml
app/src/main/res/layout/account_choose_dropdown.xml
+0
-34
account_choose_item.xml
app/src/main/res/layout/account_choose_item.xml
+1
-18
No files found.
app/src/main/java/com/xabber/android/ui/adapter/AccountChooseAdapter.java
View file @
79fd3de0
...
@@ -77,7 +77,6 @@ public class AccountChooseAdapter extends BaseAdapter {
...
@@ -77,7 +77,6 @@ public class AccountChooseAdapter extends BaseAdapter {
final
String
account
=
(
String
)
getItem
(
position
);
final
String
account
=
(
String
)
getItem
(
position
);
int
accountColor
=
accountColors
[
accountManager
.
getColorLevel
(
account
)];
int
accountColor
=
accountColors
[
accountManager
.
getColorLevel
(
account
)];
((
ImageView
)
view
.
findViewById
(
R
.
id
.
avatar_background
)).
setImageDrawable
(
new
ColorDrawable
(
accountColor
));
((
ImageView
)
view
.
findViewById
(
R
.
id
.
avatar
))
((
ImageView
)
view
.
findViewById
(
R
.
id
.
avatar
))
.
setImageDrawable
(
AvatarManager
.
getInstance
().
getAccountAvatar
(
account
));
.
setImageDrawable
(
AvatarManager
.
getInstance
().
getAccountAvatar
(
account
));
...
@@ -88,21 +87,7 @@ public class AccountChooseAdapter extends BaseAdapter {
...
@@ -88,21 +87,7 @@ public class AccountChooseAdapter extends BaseAdapter {
@Override
@Override
public
View
getDropDownView
(
int
position
,
View
convertView
,
ViewGroup
parent
)
{
public
View
getDropDownView
(
int
position
,
View
convertView
,
ViewGroup
parent
)
{
final
View
view
;
return
getView
(
position
,
convertView
,
parent
);
final
AccountManager
accountManager
=
AccountManager
.
getInstance
();
if
(
convertView
==
null
)
{
view
=
activity
.
getLayoutInflater
().
inflate
(
R
.
layout
.
account_choose_dropdown
,
parent
,
false
);
}
else
{
view
=
convertView
;
}
final
String
account
=
(
String
)
getItem
(
position
);
((
ImageView
)
view
.
findViewById
(
R
.
id
.
avatar
))
.
setImageDrawable
(
AvatarManager
.
getInstance
().
getAccountAvatar
(
account
));
((
TextView
)
view
.
findViewById
(
R
.
id
.
name
)).
setText
(
accountManager
.
getVerboseName
(
account
));
return
view
;
}
}
}
}
app/src/main/res/layout/account_choose_dropdown.xml
deleted
100644 → 0
View file @
2694c9a6
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.
This file is part of Xabber project; you can redistribute it and/or
modify it under the terms of the GNU General Public License, Version 3.
Xabber is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/.
-->
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"4dip"
>
<include
layout=
"@layout/avatar_account"
/>
<TextView
android:id=
"@+id/name"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"6dip"
android:singleLine=
"true"
android:ellipsize=
"marquee"
android:gravity=
"center_vertical"
android:text=
"account"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/account_choose_item.xml
View file @
79fd3de0
...
@@ -18,25 +18,8 @@
...
@@ -18,25 +18,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"4dip"
>
android:padding=
"4dip"
>
<include
layout=
"@layout/avatar_account"
/>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:id=
"@+id/avatar_account"
>
<ImageView
android:id=
"@+id/avatar_background"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@color/material_deep_teal_500"
/>
<ImageView
android:id=
"@+id/avatar"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/ic_avatar_1"
/>
</RelativeLayout>
<TextView
<TextView
android:id=
"@+id/name"
android:id=
"@+id/name"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
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