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
07aa56b8
Commit
07aa56b8
authored
Mar 18, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContactViewerFragment: status and resource displaying changed, layout corrected.
parent
fbc4513c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
ContactViewerFragment.java
...ain/java/com/xabber/android/ui/ContactViewerFragment.java
+14
-3
contact_info_item.xml
app/src/main/res/layout/contact_info_item.xml
+3
-1
No files found.
app/src/main/java/com/xabber/android/ui/ContactViewerFragment.java
View file @
07aa56b8
...
@@ -105,17 +105,24 @@ public class ContactViewerFragment extends Fragment {
...
@@ -105,17 +105,24 @@ public class ContactViewerFragment extends Fragment {
}
}
}
}
String
label
=
String
.
valueOf
(
resourceItem
.
getPriority
()
);
String
label
=
getString
(
R
.
string
.
account_priority
)
+
": "
+
resourceItem
.
getPriority
(
);
if
(!
client
.
isEmpty
())
{
if
(!
client
.
isEmpty
())
{
label
=
label
+
", "
+
client
;
label
=
label
+
", "
+
client
;
}
}
label
+=
" "
+
resourceItem
.
getVerbose
();
String
status
=
resourceItem
.
getStatusText
().
trim
();
if
(
status
.
isEmpty
())
{
status
=
getString
(
resourceItem
.
getStatusMode
().
getStringID
());
}
LayoutInflater
inflater
=
(
LayoutInflater
)
getActivity
().
getSystemService
(
Activity
.
LAYOUT_INFLATER_SERVICE
);
LayoutInflater
inflater
=
(
LayoutInflater
)
getActivity
().
getSystemService
(
Activity
.
LAYOUT_INFLATER_SERVICE
);
View
contactInfoItem
=
inflater
.
inflate
(
R
.
layout
.
contact_info_item
,
xmppItems
,
false
);
View
contactInfoItem
=
inflater
.
inflate
(
R
.
layout
.
contact_info_item
,
xmppItems
,
false
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_name
)).
setText
(
label
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_name
)).
setText
(
label
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_value
)).
setText
(
resourceItem
.
getVerbose
()
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_value
)).
setText
(
status
);
((
ImageView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_group_icon
)).
setImageResource
(
R
.
drawable
.
ic_xmpp_24dp
);
((
ImageView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_group_icon
)).
setImageResource
(
R
.
drawable
.
ic_xmpp_24dp
);
...
@@ -235,7 +242,11 @@ public class ContactViewerFragment extends Fragment {
...
@@ -235,7 +242,11 @@ public class ContactViewerFragment extends Fragment {
View
contactInfoItem
=
inflater
.
inflate
(
R
.
layout
.
contact_info_item
,
rootView
,
false
);
View
contactInfoItem
=
inflater
.
inflate
(
R
.
layout
.
contact_info_item
,
rootView
,
false
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_name
)).
setText
(
label
);
if
(
label
==
null
||
label
.
trim
().
isEmpty
())
{
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_name
).
setVisibility
(
View
.
GONE
);
}
else
{
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_name
)).
setText
(
label
);
}
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_value
)).
setText
(
value
);
((
TextView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_item_value
)).
setText
(
value
);
if
(
iconResource
!=
null
)
{
if
(
iconResource
!=
null
)
{
...
...
app/src/main/res/layout/contact_info_item.xml
View file @
07aa56b8
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:minHeight=
"72dp"
android:minHeight=
"72dp"
android:paddingRight=
"16dp"
android:paddingEnd=
"16dp"
>
>
...
@@ -40,6 +42,7 @@
...
@@ -40,6 +42,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"?android:attr/textColorSecondary"
android:textColor=
"?android:attr/textColorSecondary"
android:singleLine=
"true"
android:text=
"Mobile"
android:text=
"Mobile"
android:id=
"@+id/contact_info_item_name"
/>
android:id=
"@+id/contact_info_item_name"
/>
</LinearLayout>
</LinearLayout>
...
@@ -51,7 +54,6 @@
...
@@ -51,7 +54,6 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"16dp"
android:visibility=
"gone"
android:visibility=
"gone"
/>
/>
...
...
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