We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add button to paste date as in the format: yyymmdd as a string (ex: 20171002).
This is very helpful in writing diaries. Also very helpful for dating notes/todos/lists... etc.
I use it on my ubuntu with a keyboard button shortcut script to paste date and rename files:
/bin/bash -c "date +\"%Y%m%d\"| tr -d '\n' | xclip -selection clipboard && xdotool key Control_L+v"
The text was updated successfully, but these errors were encountered:
This is how to do it:
Get current time & date: SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String currentDateandTime = sdf.format(new Date()); https://stackoverflow.com/questions/5369682/get-current-time-and-date-on-android
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String currentDateandTime = sdf.format(new Date());
Copy text to system clipboard: ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(label, text); clipboard.setPrimaryClip(clip); https://stackoverflow.com/questions/19253786/how-to-copy-text-to-clip-board-in-android
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(label, text); clipboard.setPrimaryClip(clip);
Paste text from systme clipboard: private void onPaste(){ Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable t = c.getContents(this); if (t == null) return; try { jtxtfield.setText((String) t.getTransferData(DataFlavor.stringFlavor)); } catch (Exception e){ e.printStackTrace(); }//try }//onPaste https://stackoverflow.com/questions/6631933/how-would-i-make-a-paste-from-java-using-the-system-clipboard#16694596
private void onPaste(){ Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable t = c.getContents(this); if (t == null) return; try { jtxtfield.setText((String) t.getTransferData(DataFlavor.stringFlavor)); } catch (Exception e){ e.printStackTrace(); }//try }//onPaste
Sorry, something went wrong.
No branches or pull requests
Add button to paste date as in the format: yyymmdd as a string (ex: 20171002).
This is very helpful in writing diaries. Also very helpful for dating notes/todos/lists... etc.
I use it on my ubuntu with a keyboard button shortcut script to paste date and rename files:
/bin/bash -c "date +\"%Y%m%d\"| tr -d '\n' | xclip -selection clipboard && xdotool key Control_L+v"
The text was updated successfully, but these errors were encountered: