随笔分类 -  代码片段

摘要:/**隐藏软键盘**/ View view = getWindow().peekDecorView(); if (view != null) { InputMethodManager inputmanger = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputmanger.hideSoftInputFromWindow(view.getWindowToken(), 0); } 阅读全文
posted @ 2013-11-16 18:03 fighter 阅读(30517) 评论(1) 推荐(1)
摘要:# encoding: UTF-8import socket rfile = open('c:\\ip.txt')wfile = open('c:\\result.csv', 'w+')for line in rfile: str = line.strip().split(';') for s in str: s = s.strip().split('/') s = s[0] try: result = socket.gethostbyname(s) except: result =... 阅读全文
posted @ 2012-06-28 14:15 fighter 阅读(1773) 评论(0) 推荐(0)
摘要:AndroidManifest.xml文件中界面对应的<activity>里加入android:windowSoftInputMode="adjustPan" 键盘就会覆盖屏幕android:windowSoftInputMode="stateVisible|adjustResize" 屏幕整体上移 阅读全文
posted @ 2012-06-28 06:56 fighter 阅读(29889) 评论(2) 推荐(1)