一.View.监听器介绍 二.在Activity中获取view和设置属性,设置button的监听器 1.activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent&qu…
JVM虚拟机 Java虚拟机有自己完善的硬件架构(处理器.堆栈.寄存器等)和指令系统 Java虚拟机是一种能运行Java bytecode的虚拟机 JVM并非专属于Java语言,只要生成的编译文件能匹配JVM对载入编译文件格式要求,任何语言都可以交由JVM运行,比如Scala.Groovy.Fantom等,见Java虚拟机维基百科 JVM虚拟机除了Sun开发的HotSpot外,还有BEA.IBM.微软.等公司都有开发.见<深入理解Java虚拟机(第二版)> 查看自己用的JVM:cmd->…
一.activity初步 1.程序启动会先读配置文件AndroidManifest.xml找activity 2.activity会在onCreate方法中读取activity_main.xml文件,加载内容,每个activity的配置文件都会在R.java中生成id 二.代码 1.AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android=&…
一.layout介绍 二.测试linear_layout1.activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:la…
前言 久仰elasticsearch大名,近年来,fackbook,baidu等大型网站的搜索功能均开始采用elasticsearch,足见其在处理大数据和高并发搜索中的卓越性能.不少其他网站也开始将elasticsearch作为搜索功能中的一个重要选项,从招聘启事的人员技能要求上就可见一斑.elasticsearch虽然是基于java开发,但是他提供了Restful接口的形式供其他程序调用,非常的方便,对于php,python等其他语言也有对应的扩展支持.所以很有必要学习一下elasticse…
1.xml <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" android:pad…
一.代码 1.xml(1)radio.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent&q…
一.文档用法 1.xml <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" andr…
1.strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">S02_E01_SpinnerEtc</string> <string name="hello_world">Hello world!</string> <string na…
一.代码1.xml(1)main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent&quo…