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
919ff218
Commit
919ff218
authored
Mar 18, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContactViewer and ContactEditor menu calls changed.
parent
9a91549a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
26 deletions
+9
-26
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-4
ChatViewer.java
app/src/main/java/com/xabber/android/ui/ChatViewer.java
+3
-3
ContextMenuHelper.java
.../java/com/xabber/android/ui/helper/ContextMenuHelper.java
+0
-16
chat.xml
app/src/main/res/menu/chat.xml
+2
-3
No files found.
app/src/main/AndroidManifest.xml
View file @
919ff218
...
@@ -142,12 +142,12 @@
...
@@ -142,12 +142,12 @@
<activity
<activity
android:label=
"@string/contact_editor"
android:label=
"@string/contact_editor"
android:name=
"com.xabber.android.ui.ContactEditor"
android:name=
"com.xabber.android.ui.ContactEditor"
android:parentActivityName=
"com.xabber.android.ui.Contact
List
"
android:parentActivityName=
"com.xabber.android.ui.Contact
Viewer
"
>
>
<!-- Parent activity meta-data to support 4.0 and lower -->
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
<meta-data
android:name=
"android.support.PARENT_ACTIVITY"
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
"com.xabber.android.ui.Contact
List
"
/>
android:value=
"com.xabber.android.ui.Contact
Viewer
"
/>
</activity>
</activity>
<activity
<activity
android:label=
"@string/contact_add"
android:label=
"@string/contact_add"
...
@@ -220,12 +220,12 @@
...
@@ -220,12 +220,12 @@
<activity
<activity
android:label=
"@string/contact_viewer"
android:label=
"@string/contact_viewer"
android:name=
"com.xabber.android.ui.ContactViewer"
android:name=
"com.xabber.android.ui.ContactViewer"
android:parentActivityName=
"com.xabber.android.ui.C
ontactList
"
android:parentActivityName=
"com.xabber.android.ui.C
hatViewer
"
>
>
<!-- Parent activity meta-data to support 4.0 and lower -->
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
<meta-data
android:name=
"android.support.PARENT_ACTIVITY"
android:name=
"android.support.PARENT_ACTIVITY"
android:value=
"com.xabber.android.ui.C
ontactList
"
/>
android:value=
"com.xabber.android.ui.C
hatViewer
"
/>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<action
android:name=
"android.intent.action.VIEW"
/>
...
...
app/src/main/java/com/xabber/android/ui/ChatViewer.java
View file @
919ff218
...
@@ -221,7 +221,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
...
@@ -221,7 +221,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
}
}
if
(
abstractChat
instanceof
RegularChat
)
{
if
(
abstractChat
instanceof
RegularChat
)
{
menu
.
findItem
(
R
.
id
.
action_
edit
_contact
).
setVisible
(
true
);
menu
.
findItem
(
R
.
id
.
action_
view
_contact
).
setVisible
(
true
);
menu
.
findItem
(
R
.
id
.
action_close_chat
).
setVisible
(
true
);
menu
.
findItem
(
R
.
id
.
action_close_chat
).
setVisible
(
true
);
SecurityLevel
securityLevel
=
OTRManager
.
getInstance
().
getSecurityLevel
(
account
,
user
);
SecurityLevel
securityLevel
=
OTRManager
.
getInstance
().
getSecurityLevel
(
account
,
user
);
...
@@ -313,8 +313,8 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
...
@@ -313,8 +313,8 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
final
String
user
=
actionWithUser
;
final
String
user
=
actionWithUser
;
switch
(
item
.
getItemId
())
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
action_
edit
_contact
:
case
R
.
id
.
action_
view
_contact
:
startActivity
(
Contact
Edito
r
.
createIntent
(
this
,
account
,
user
));
startActivity
(
Contact
Viewe
r
.
createIntent
(
this
,
account
,
user
));
return
true
;
return
true
;
case
R
.
id
.
action_chat_list
:
case
R
.
id
.
action_chat_list
:
...
...
app/src/main/java/com/xabber/android/ui/helper/ContextMenuHelper.java
View file @
919ff218
...
@@ -63,17 +63,6 @@ public class ContextMenuHelper {
...
@@ -63,17 +63,6 @@ public class ContextMenuHelper {
final
String
account
=
abstractContact
.
getAccount
();
final
String
account
=
abstractContact
.
getAccount
();
final
String
user
=
abstractContact
.
getUser
();
final
String
user
=
abstractContact
.
getUser
();
menu
.
setHeaderTitle
(
abstractContact
.
getName
());
menu
.
setHeaderTitle
(
abstractContact
.
getName
());
menu
.
add
(
R
.
string
.
chat_viewer
).
setOnMenuItemClickListener
(
new
MenuItem
.
OnMenuItemClickListener
()
{
@Override
public
boolean
onMenuItemClick
(
MenuItem
item
)
{
MessageManager
.
getInstance
().
openChat
(
account
,
user
);
activity
.
startActivity
(
ChatViewer
.
createIntent
(
activity
,
account
,
user
));
return
true
;
}
});
if
(
MUCManager
.
getInstance
().
hasRoom
(
account
,
user
))
{
if
(
MUCManager
.
getInstance
().
hasRoom
(
account
,
user
))
{
if
(!
MUCManager
.
getInstance
().
inUse
(
account
,
user
))
if
(!
MUCManager
.
getInstance
().
inUse
(
account
,
user
))
menu
.
add
(
R
.
string
.
muc_edit
).
setIntent
(
menu
.
add
(
R
.
string
.
muc_edit
).
setIntent
(
...
@@ -121,10 +110,6 @@ public class ContextMenuHelper {
...
@@ -121,10 +110,6 @@ public class ContextMenuHelper {
});
});
}
else
{
}
else
{
menu
.
add
(
R
.
string
.
contact_viewer
).
setIntent
(
ContactViewer
.
createIntent
(
activity
,
account
,
user
));
menu
.
add
(
R
.
string
.
contact_editor
).
setIntent
(
ContactEditor
.
createIntent
(
activity
,
account
,
user
));
menu
.
add
(
R
.
string
.
contact_delete
).
setOnMenuItemClickListener
(
menu
.
add
(
R
.
string
.
contact_delete
).
setOnMenuItemClickListener
(
new
MenuItem
.
OnMenuItemClickListener
()
{
new
MenuItem
.
OnMenuItemClickListener
()
{
...
@@ -290,7 +275,6 @@ public class ContextMenuHelper {
...
@@ -290,7 +275,6 @@ public class ContextMenuHelper {
}
}
return
true
;
return
true
;
}
}
});
});
menu
.
add
(
R
.
string
.
contact_add
).
setIntent
(
menu
.
add
(
R
.
string
.
contact_add
).
setIntent
(
ContactAdd
.
createIntent
(
activity
,
account
));
ContactAdd
.
createIntent
(
activity
,
account
));
...
...
app/src/main/res/menu/chat.xml
View file @
919ff218
...
@@ -17,12 +17,11 @@
...
@@ -17,12 +17,11 @@
android:visible=
"false"
android:visible=
"false"
/>
/>
<item
android:id=
"@+id/action_
edit
_contact"
<item
android:id=
"@+id/action_
view
_contact"
android:title=
"@string/contact_
edito
r"
android:title=
"@string/contact_
viewe
r"
app:showAsAction=
"never"
app:showAsAction=
"never"
android:orderInCategory=
"100"
android:orderInCategory=
"100"
android:visible=
"false"
android:visible=
"false"
android:icon=
"@drawable/ic_create_white_24dp"
/>
/>
<item
android:id=
"@+id/action_chat_list"
<item
android:id=
"@+id/action_chat_list"
...
...
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