I wrote a code that copies the answer in the calculator to the clipboard, then the calculator closes and another window opens. The answer should be inserted here using the code:
textOut2= (TextView) findViewById(R.id.etInput1); final ClipboardManager clipBoard= (ClipboardManager)getSystemService(CLIPBOARD_SERVICE); textOut2.setText(clipBoard.getText());
but it never works. Maybe a mistake? postscript I know what text is copied because I can paste using long print, but I want to do this automatically. Can I specify a specific name for the copied text? As this would make it easier to embed words, as I have many different TextView text objects
source share