摘要: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <ListView androi 阅读全文
posted @ 2013-03-09 17:23 小三小山 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 主xml中<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ListView android:id="@+id/listview1" android:layout_width="match_parent" android:layout_ 阅读全文
posted @ 2013-03-09 17:21 小三小山 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 第一种listviewxml文件中<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ListView android:id="@+id/listview1" android:entries="@array/info" android:l 阅读全文
posted @ 2013-03-09 17:11 小三小山 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 事件监听器方式一:匿名内部类,直接在组件上添加监听器;例子如下button.setOnclickListener(new OnClickListener(){ System.out.println("hahahh"); });监听方式二:实现某个监听器的接口,然后在添加该接口的实现类实现监听机制;public class MainActivity extends Activity implements OnClickListener{ protected void onCreate(Bundle savedInstanceState) { ... 阅读全文
posted @ 2013-03-09 17:06 小三小山 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 例子一:实现下拉列表在res文件下中的values目录中创建array.xml文件<?xml version="1.0" encoding="utf-8"?><resources> <string-array name="address"> <item>厦门</item> <item>上海</item> <item>浙江</item> <item>江西</item> </string-array&g 阅读全文
posted @ 2013-03-09 16:46 小三小山 阅读(316) 评论(0) 推荐(0) 编辑
摘要: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".Ma 阅读全文
posted @ 2013-03-09 16:38 小三小山 阅读(145) 评论(0) 推荐(0) 编辑
摘要: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <RadioGroup andr 阅读全文
posted @ 2013-03-09 16:36 小三小山 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" ><!-- 相对布局 --> 阅读全文
posted @ 2013-03-09 16:32 小三小山 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 继续第一天的内容,接下来介绍第三个组件: checkBox<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity&q 阅读全文
posted @ 2013-03-09 16:29 小三小山 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 一、Android开发环境和开发工具搭建 1、到http://eclipse.org/下载android开发需要的开发工具; 2、到http://www.oracle.com/technetwork/java/javase/downloads/index.html下载jdk 3、配置jdk属性,打开我的电脑属性==》高级系统设置==》设置环境变形==》在Administration的用户变量里面添加一个“path=C:\Program Files\Java\jdk1.7.0_09\bin”里面的值是jdk安装目录; 4、打开IDE之后,找到,点击下载的那个,进入到画面,选中需要下载的a... 阅读全文
posted @ 2013-03-09 16:22 小三小山 阅读(281) 评论(0) 推荐(0) 编辑