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
6a497074
Commit
6a497074
authored
Jan 21, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StatusEditor menu changed - change status option added, with icon.
parent
f4ebed12
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
11 deletions
+27
-11
StatusEditor.java
app/src/main/java/com/xabber/android/ui/StatusEditor.java
+18
-10
ic_done_white_24dp.png
app/src/main/res/drawable-hdpi/ic_done_white_24dp.png
+0
-0
ic_done_white_24dp.png
app/src/main/res/drawable-mdpi/ic_done_white_24dp.png
+0
-0
ic_done_white_24dp.png
app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png
+0
-0
ic_done_white_24dp.png
app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png
+0
-0
ic_done_white_24dp.png
app/src/main/res/drawable-xxxhdpi/ic_done_white_24dp.png
+0
-0
status.xml
app/src/main/res/menu/status.xml
+9
-1
No files found.
app/src/main/java/com/xabber/android/ui/StatusEditor.java
View file @
6a497074
...
@@ -152,7 +152,7 @@ public class StatusEditor extends ManagedListActivity implements
...
@@ -152,7 +152,7 @@ public class StatusEditor extends ManagedListActivity implements
@Override
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
super
.
onCreateOptionsMenu
(
menu
);
super
.
onCreateOptionsMenu
(
menu
);
getMenuInflater
().
inflate
(
R
.
menu
.
delete_status_message
,
menu
);
getMenuInflater
().
inflate
(
R
.
menu
.
status
,
menu
);
return
true
;
return
true
;
...
@@ -162,9 +162,13 @@ public class StatusEditor extends ManagedListActivity implements
...
@@ -162,9 +162,13 @@ public class StatusEditor extends ManagedListActivity implements
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
super
.
onOptionsItemSelected
(
item
);
super
.
onOptionsItemSelected
(
item
);
switch
(
item
.
getItemId
())
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
action_delete_status_message
:
case
R
.
id
.
action_change_status
:
AccountManager
.
getInstance
().
clearSavedStatuses
();
changeStatus
();
adapter
.
onChange
();
return
true
;
case
R
.
id
.
action_delete_status_message
:
AccountManager
.
getInstance
().
clearSavedStatuses
();
adapter
.
onChange
();
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -212,18 +216,22 @@ public class StatusEditor extends ManagedListActivity implements
...
@@ -212,18 +216,22 @@ public class StatusEditor extends ManagedListActivity implements
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
switch
(
v
.
getId
())
{
case
R
.
id
.
ok
:
case
R
.
id
.
ok
:
StatusMode
statusMode
=
(
StatusMode
)
statusModeView
changeStatus
();
.
getSelectedItem
();
String
statusText
=
statusTextView
.
getText
().
toString
();
setStatus
(
statusMode
,
statusText
);
finish
();
break
;
break
;
default
:
default
:
break
;
break
;
}
}
}
}
@Override
private
void
changeStatus
()
{
StatusMode
statusMode
=
(
StatusMode
)
statusModeView
.
getSelectedItem
();
String
statusText
=
statusTextView
.
getText
().
toString
();
setStatus
(
statusMode
,
statusText
);
finish
();
}
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
long
id
)
{
SavedStatus
savedStatus
=
(
SavedStatus
)
parent
.
getAdapter
().
getItem
(
SavedStatus
savedStatus
=
(
SavedStatus
)
parent
.
getAdapter
().
getItem
(
...
...
app/src/main/res/drawable-hdpi/ic_done_white_24dp.png
0 → 100644
View file @
6a497074
309 Bytes
app/src/main/res/drawable-mdpi/ic_done_white_24dp.png
0 → 100644
View file @
6a497074
243 Bytes
app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png
0 → 100644
View file @
6a497074
363 Bytes
app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png
0 → 100644
View file @
6a497074
476 Bytes
app/src/main/res/drawable-xxxhdpi/ic_done_white_24dp.png
0 → 100644
View file @
6a497074
587 Bytes
app/src/main/res/menu/
delete_status_message
.xml
→
app/src/main/res/menu/
status
.xml
View file @
6a497074
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_change_status"
android:title=
"@string/status_editor"
app:showAsAction=
"ifRoom"
android:icon=
"@drawable/ic_done_white_24dp"
android:orderInCategory=
"90"
/>
<item
android:id=
"@+id/action_delete_status_message"
<item
android:id=
"@+id/action_delete_status_message"
android:title=
"@string/clear_statuses"
android:title=
"@string/clear_statuses"
app:showAsAction=
"
ifRoom
"
app:showAsAction=
"
never
"
android:icon=
"@drawable/ic_delete_white_24dp"
android:icon=
"@drawable/ic_delete_white_24dp"
android:orderInCategory=
"100"
android:orderInCategory=
"100"
/>
/>
...
...
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