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
fbc4513c
Commit
fbc4513c
authored
Mar 18, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContactViewer: status icon removed from toolbar and shown for each resource.
parent
7d17df87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
ContactViewer.java
app/src/main/java/com/xabber/android/ui/ContactViewer.java
+2
-0
ContactViewerFragment.java
...ain/java/com/xabber/android/ui/ContactViewerFragment.java
+16
-3
contact_info_item.xml
app/src/main/res/layout/contact_info_item.xml
+11
-0
No files found.
app/src/main/java/com/xabber/android/ui/ContactViewer.java
View file @
fbc4513c
...
@@ -18,6 +18,7 @@ import android.content.Context;
...
@@ -18,6 +18,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
com.xabber.android.data.Application
;
import
com.xabber.android.data.Application
;
import
com.xabber.android.data.LogManager
;
import
com.xabber.android.data.LogManager
;
...
@@ -197,6 +198,7 @@ public class ContactViewer extends ManagedActivity implements
...
@@ -197,6 +198,7 @@ public class ContactViewer extends ManagedActivity implements
AbstractContact
bestContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
bareAddress
);
AbstractContact
bestContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
bareAddress
);
contactTitleExpandableToolbarInflater
.
onCreate
(
bestContact
);
contactTitleExpandableToolbarInflater
.
onCreate
(
bestContact
);
findViewById
(
R
.
id
.
status_icon
).
setVisibility
(
View
.
GONE
);
}
}
@Override
@Override
...
...
app/src/main/java/com/xabber/android/ui/ContactViewerFragment.java
View file @
fbc4513c
...
@@ -105,14 +105,27 @@ public class ContactViewerFragment extends Fragment {
...
@@ -105,14 +105,27 @@ public class ContactViewerFragment extends Fragment {
}
}
}
}
resourceItem
.
getStatusMode
().
getStatusLevel
();
String
label
=
String
.
valueOf
(
resourceItem
.
getPriority
());
String
label
=
String
.
valueOf
(
resourceItem
.
getPriority
());
if
(!
client
.
isEmpty
())
{
if
(!
client
.
isEmpty
())
{
label
=
label
+
", "
+
client
;
label
=
label
+
", "
+
client
;
}
}
addXmppItem
(
label
,
resourceItem
.
getVerbose
(),
R
.
drawable
.
ic_xmpp_24dp
);
LayoutInflater
inflater
=
(
LayoutInflater
)
getActivity
().
getSystemService
(
Activity
.
LAYOUT_INFLATER_SERVICE
);
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_value
)).
setText
(
resourceItem
.
getVerbose
());
((
ImageView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_group_icon
)).
setImageResource
(
R
.
drawable
.
ic_xmpp_24dp
);
ImageView
statusIcon
=
(
ImageView
)
contactInfoItem
.
findViewById
(
R
.
id
.
contact_info_right_icon
);
statusIcon
.
setVisibility
(
View
.
VISIBLE
);
statusIcon
.
setImageDrawable
(
getResources
().
getDrawable
(
R
.
drawable
.
ic_status
));
statusIcon
.
setImageLevel
(
resourceItem
.
getStatusMode
().
getStatusLevel
());
xmppItems
.
addView
(
contactInfoItem
);
}
}
}
}
...
...
app/src/main/res/layout/contact_info_item.xml
View file @
fbc4513c
...
@@ -44,4 +44,15 @@
...
@@ -44,4 +44,15 @@
android:id=
"@+id/contact_info_item_name"
/>
android:id=
"@+id/contact_info_item_name"
/>
</LinearLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/contact_info_right_icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"16dp"
android:visibility=
"gone"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
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