Comments (1)
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
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
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
from snotepad.
Related Issues (20)
- Make search case insensitive HOT 1
- Auto-capitzlisation HOT 1
- Crash when Bluetooth keyboard disconnects
- Replace the save button HOT 1
- Crashes portrait to landscape HOT 4
- Donations
- Enhancement: email notes
- Enhancement: Categories HOT 1
- please increase versionCode
- F-Droid version is out of date
- last release 122 apk hang on start after install
- Reduce time of save notification dialog
- Feature request: Add ability to change folder
- Feature request: Search within a note
- Theming HOT 2
- Improve scrolling HOT 2
- Add an option to send note via email HOT 1
- Problems with landscape format and ideas for development HOT 2
- Accessing SD card HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snotepad.