![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android学习心得
huangqibing0626
j2se、jsp、mysql、c、c++、oracle、js
展开
-
用android完成第一个helloworld
<br />eclipse ide:http://www.eclipse.org/downloads/eclipse<br />android sdk:http://androidappdocs.appspot.com/sdk/index.htmlandroid<br />adt:https://dl-ssl.google.com/android/eclipse<br />更改avd默认路径的方法:在系统环境变量中设置android_sdk_home=你需要放置的目录(d:/android/avd),注意不原创 2010-09-15 20:37:00 · 441 阅读 · 0 评论 -
android之listener
在给button设置listener时,有两种方式: 1、让MainActivity类实现OnClickListener接口,同样实现public void onClick(View v){…},那么button.setOnClickListener(this).就可以实现对button的监听了。其主要原理是以MainActivity类作为事件监听者(this),当事件触发是,就调用onClick(View v)进行处理。 2、button.setOnClickListener(listener);原创 2010-09-16 22:41:00 · 950 阅读 · 0 评论 -
MainActivity启动另一个Activity
<br />Intent intent = new Intent(this, OtherActivity.class); this.startActivityForResult(intent, RG_REQUEST);<br />必须在AndroidManifest.xml文件中声明需要启动的OtherActivity信息。<br /><activity android:name=".OtherActivity"></activity>原创 2010-09-18 08:26:00 · 1715 阅读 · 0 评论