diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index aa2382d0e..e82529ab7 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -107,6 +107,7 @@ key_na_browse key_na_browseall key_na_values + key_na_studycopy key_enable_debug key_enable_dup_invite key_download_path diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index aea0fe258..4c11a0ed9 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -2224,4 +2224,8 @@ You have not yet saved any words into a studylist. + The words in this list will be + copied to the system clipboard. You can then paste them into any + app that supports pasting text, e.g. an email app. + diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/StudyList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/StudyList.java index e2735d27d..2d5bb4ddc 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/StudyList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/StudyList.java @@ -43,6 +43,7 @@ public class StudyList extends XWListActivity public static final int NO_LANG = -1; private static final int CLEAR_ACTION = 1; + private static final int COPY_ACTION = 2; private static final String START_LANG = "START_LANG"; private Spinner m_spinner; @@ -81,12 +82,9 @@ public class StudyList extends XWListActivity boolean handled = true; switch ( item.getItemId() ) { case R.id.copy_all: - ClipboardManager clipboard = (ClipboardManager) - getSystemService(Context.CLIPBOARD_SERVICE); - clipboard.setText( TextUtils.join( "\n", m_words ) ); - - String msg = getString( R.string.paste_donef, m_words.length ); - Utils.showToast( this, msg ); + showNotAgainDlgThen( R.string.not_again_studycopy, + R.string.key_na_studycopy, + COPY_ACTION ); break; case R.id.clear_all: showConfirmThen( R.string.confirm_studylist_clear, CLEAR_ACTION ); @@ -109,6 +107,14 @@ public class StudyList extends XWListActivity DBUtils.studyListClear( this, m_langCodes[m_position] ); initOrFinish( null ); break; + case COPY_ACTION: + ClipboardManager clipboard = (ClipboardManager) + getSystemService( Context.CLIPBOARD_SERVICE ); + clipboard.setText( TextUtils.join( "\n", m_words ) ); + + String msg = getString( R.string.paste_donef, m_words.length ); + Utils.showToast( this, msg ); + break; default: Assert.fail(); break;