1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 06:11:19 +00:00

Fix menu items in repo/node settings not showing as actions (ref #49).

This *should* work using `app:showAsAction`, but apparently it does not.
Using `android:showAsAction` gives warnings, but should work on all
platforms that support "showAsAction".
This commit is contained in:
Felix Ableitner 2014-07-03 15:27:40 +02:00
parent 8f5422968a
commit b63f5bc61e
4 changed files with 9 additions and 9 deletions

View file

@ -141,7 +141,7 @@ public class NodeSettingsActivity extends PreferenceActivity implements
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.node_settings, menu);
return super.onCreateOptionsMenu(menu);
return true;
}
@Override

View file

@ -176,7 +176,7 @@ public class RepoSettingsActivity extends PreferenceActivity
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.repo_settings, menu);
return super.onCreateOptionsMenu(menu);
return true;
}
@Override

View file

@ -1,17 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/create"
android:title="@string/create" />
android:title="@string/create"
android:showAsAction="always" />
<item
android:id="@+id/share_node_id"
android:icon="@android:drawable/ic_menu_share"
android:title="@string/share_node_id"
app:showAsAction="ifRoom" />
android:showAsAction="always" />
</menu>

View file

@ -1,8 +1,9 @@
<?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" >
<item
android:id="@+id/create"
android:title="@string/create" />
android:title="@string/create"
android:showAsAction="always" />
</menu>