02 2014 档案

摘要:public class MainActivity extends Activity { private Button btn = null; private List> list = null; private XmlResourceParser xrp = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activit... 阅读全文
posted @ 2014-02-23 22:13 yshy 阅读(342) 评论(0) 推荐(0) 编辑
摘要:文件结构如下:assets/info/info AssetManager am = this.getResources().getAssets(); InputStream input = null; try { input = am.open("info/info"); int len = input.available(); byte[] buffer = new byte[len]; input.read(buff... 阅读全文
posted @ 2014-02-21 14:02 yshy 阅读(1620) 评论(0) 推荐(0) 编辑
摘要:1:关闭显示器xsetdpms force off2:定时关机十分钟之后自动关机:shutdown -h +10十二点自动关机:shutdown -h12:00直接关机:shutdown -h now 阅读全文
posted @ 2014-02-19 07:50 yshy 阅读(268) 评论(0) 推荐(0) 编辑
摘要:问题如下:y@y:~$ sudo apt-get updateE: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用)E: 无法对目录 /var/lib/apt/lists/ 加锁解决方法:$sudo rm /var/lib/apt/lists/lock问题解决。 阅读全文
posted @ 2014-02-18 17:29 yshy 阅读(508) 评论(0) 推荐(0) 编辑
摘要:定义一个广播接收器public class SMSReceiver extends BroadcastReceiver { private SmsManager smsManager; @Override public void onReceive(Context arg0, Intent intent) { if(intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")){ SharedPreferences sp = ... 阅读全文
posted @ 2014-02-17 13:49 yshy 阅读(432) 评论(0) 推荐(0) 编辑
摘要:Windows PHP5+Apache2.2解决方法:打开php.ini找到:extension=php_xsl.dllextension=php_zip.dll将其前面的';'去掉。找到:zlib.output_compression = On将Off改为On。重启Apache! 阅读全文
posted @ 2014-02-16 13:51 yshy 阅读(353) 评论(0) 推荐(0) 编辑
摘要:1:activity_main.xml 2:MainActivity.javapackage com.example.async;import android.os.AsyncTask;import android.os.Bundle;import android.view.View;import android.widget.ProgressBar;import android.widget.TextView;import android.app.Activity;public class MainActivity extends Activity { pri... 阅读全文
posted @ 2014-02-12 18:09 yshy 阅读(348) 评论(0) 推荐(0) 编辑
摘要:expandableListView.setOnGroupExpandListener(new OnGroupExpandListener(){ @Override public void onGroupExpand(int groupPosition) { //保证每次只展开一组 int count=expandableListView.getExpandableListAdapter().getGroupCount(); for(int i=0;i<coun... 阅读全文
posted @ 2014-02-12 10:55 yshy 阅读(638) 评论(0) 推荐(0) 编辑
摘要://隐藏输入键盘 ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(BshToolsActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); 阅读全文
posted @ 2014-02-09 12:00 yshy 阅读(178) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示