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:
parent
8f5422968a
commit
b63f5bc61e
4 changed files with 9 additions and 9 deletions
|
@ -141,7 +141,7 @@ public class NodeSettingsActivity extends PreferenceActivity implements
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.node_settings, menu);
|
getMenuInflater().inflate(R.menu.node_settings, menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class RepoSettingsActivity extends PreferenceActivity
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.repo_settings, menu);
|
getMenuInflater().inflate(R.menu.repo_settings, menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<menu
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/create"
|
android:id="@+id/create"
|
||||||
android:title="@string/create" />
|
android:title="@string/create"
|
||||||
|
android:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/share_node_id"
|
android:id="@+id/share_node_id"
|
||||||
android:icon="@android:drawable/ic_menu_share"
|
android:icon="@android:drawable/ic_menu_share"
|
||||||
android:title="@string/share_node_id"
|
android:title="@string/share_node_id"
|
||||||
app:showAsAction="ifRoom" />
|
android:showAsAction="always" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
|
@ -1,8 +1,9 @@
|
||||||
<?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" >
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/create"
|
android:id="@+id/create"
|
||||||
android:title="@string/create" />
|
android:title="@string/create"
|
||||||
|
android:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
Loading…
Reference in a new issue