mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
add studylist menu to lookup selected words -- same as tapping, but maybe easier to discover.
This commit is contained in:
parent
b776b7cd71
commit
9dab6bc772
3 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
||||||
<?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 android:id="@+id/slmenu_lookup_sel"
|
||||||
|
android:title="@string/slmenu_lookup_sel"
|
||||||
|
android:icon="@drawable/search__gen"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/slmenu_select_all"
|
<item android:id="@+id/slmenu_select_all"
|
||||||
android:title="@string/slmenu_select_all"
|
android:title="@string/slmenu_select_all"
|
||||||
android:icon="@drawable/select_all__gen"
|
android:icon="@drawable/select_all__gen"
|
||||||
|
|
|
@ -2229,7 +2229,8 @@
|
||||||
<string name="lookup_title">Word lookup</string>
|
<string name="lookup_title">Word lookup</string>
|
||||||
|
|
||||||
<string name="slmenu_select_all">Select all</string>
|
<string name="slmenu_select_all">Select all</string>
|
||||||
<string name="slmenu_deselect_all">Deselect all</string>
|
<string name="slmenu_deselect_all">Unselect all</string>
|
||||||
<string name="sel_wordsf">Words: %d</string>
|
<string name="sel_wordsf">Words: %d</string>
|
||||||
|
<string name="slmenu_lookup_sel">Look up</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class StudyList extends XWListActivity
|
||||||
Utils.setItemVisible( menu, R.id.slmenu_clear_sel, 0 < nSel );
|
Utils.setItemVisible( menu, R.id.slmenu_clear_sel, 0 < nSel );
|
||||||
Utils.setItemVisible( menu, R.id.slmenu_select_all, m_words.length > nSel );
|
Utils.setItemVisible( menu, R.id.slmenu_select_all, m_words.length > nSel );
|
||||||
Utils.setItemVisible( menu, R.id.slmenu_deselect_all, 0 < nSel );
|
Utils.setItemVisible( menu, R.id.slmenu_deselect_all, 0 < nSel );
|
||||||
|
Utils.setItemVisible( menu, R.id.slmenu_lookup_sel, 0 < nSel );
|
||||||
return super.onPrepareOptionsMenu( menu );
|
return super.onPrepareOptionsMenu( menu );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +129,9 @@ public class StudyList extends XWListActivity
|
||||||
case R.id.slmenu_deselect_all:
|
case R.id.slmenu_deselect_all:
|
||||||
clearSels();
|
clearSels();
|
||||||
break;
|
break;
|
||||||
|
case R.id.slmenu_lookup_sel:
|
||||||
|
launchLookup( getSelWords(), m_langCodes[m_langPosition], true );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
handled = false;
|
handled = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue