01 2014 档案

摘要:http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/ 阅读全文
posted @ 2014-01-25 18:32 zmiao 阅读(95) 评论(0) 推荐(0) 编辑
摘要:在onCreate函数中: mLinearlayout= new LinearLayout(this); mLinearlayout.setOrientation(LinearLayout.VERTICAL); mTextview= new TextView(this); mTextview.setText("MASK"); mLinearlayout.addView(mTextview); mIV = new MyImageView(this); mLinearlayout.addView(m... 阅读全文
posted @ 2014-01-18 04:15 zmiao 阅读(160) 评论(0) 推荐(0) 编辑
摘要:动态添加 text1=new TextView(this); text1.setText("动态添加"); ((LinearLayout) this.findViewById(R.id.layout)).addView(text1); //引用资源文件 text2=(TextView)this.findViewById(R.id.textView1); String a="56788997"; text2.setText(a); 阅读全文
posted @ 2014-01-18 03:31 zmiao 阅读(585) 评论(0) 推荐(0) 编辑
摘要:用socket可以简单的发送一些文本信息,太复杂的可能发送不了,比如图片音频可能要用到http来发送和接收了。最基本的使用socket来发送一个字符串,但有的时候我们希望能够发送一个类,这样server接收端处理信息将会非常方便。对于待发送的类,要用socket来发送,则必须实现Serializable接口。实现这个接口后就将发送的对象串行化了,再使用对象输入输出流(ObjectOutputStream, ObjectInputStream)就可实现发送与接收。这个过程有点像通信里边的调制过程,在接收端server再将串行化的对象恢复成之前的类,就像解调过程。比如我们定义一个packets这个 阅读全文
posted @ 2014-01-01 09:32 zmiao 阅读(2851) 评论(0) 推荐(0) 编辑