android中获取/设置粘贴板中的内容

ClipboardManager clipboard =
        (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
              clipboard.setText("some thing");

clipboard.getText();

 

getSystemService是Activity类的一个方法,getSystemService同时还可以获取很多其他系统服务,慢慢研究吧。。。

posted @ 2009-04-02 10:31  jacktu  阅读(7360)  评论(0编辑  收藏  举报