Android (1) - Activity
onCreate(Bundle status) --> setContentView(View view) --> findViewById(int id)
Intent intentForPosition(int position) --> used to start different Activity
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#1. Install Apache Ant
<!-- 1. Make sure you have a Java environment installed, See System Requirements for details.
2. Download Ant. http://ant.apache.org/
3. Uncompress the downloaded file into a directory.
4. Set environmental variables JAVA_HOME to your Java environment, ANT_HOME to the directory you uncompressed Ant to,
and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH.
5. Optionally, from the ANT_HOME directory run ant -f fetch.xml -Ddest=system to get the library dependencies of most of
the Ant tasks that require them. If you don't do this, many of the dependent Ant tasks will not be available.
6. Optionally, add any desired Antlibs. -->
#2. Using Apache Ant
<project name="MyProject" default="dist" basedir=".">
<description>simple example build file</description> <!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/> <target name="init">
<!-- Create the time stamp -->
<tstamp/> <!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target> <target name="compile" depends="init" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target> <target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
</target> <target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
#3. Running Apache Ant
<!--
ant [options] [target1 [target2 [target3]]]
Options:
-help, -h print this message and exit
-projecthelp, -p print project help information and exit
-version print the version information and exit
-diagnostics print information that might be helpful to diagnose or report problems and exit
-quiet, -q be extra quiet
-silent, -S print nothing but task outputs and build failure
-verbose, -v be extra verbose
-debug, -d print debugging information
-emacs, -e produce logging information without adornments
-lib <path> specifies a path to search for jars and classes
-logfile <file>, -l <file> use given file for log
-logger <classname> the class which is to perform logging
-listener <classname> add an instance of class as a project listener
-noinput do not allow interactive input
-buildfile <file>,
-file <file>, -f <file> use given build file
-D<property>=<value> use value for given property
-keep-going, -k execute all targets that do not depend on failed target(s)
-propertyfile <name> load all properties from file with -D properties taking precedence
-inputhandler <class> the class which will handle input requests
-find <file>, -s <file> (s)earch for buildfile towards the root of the filesystem and use it
-nice number A niceness value for the main thread: 1 (lowest) to 10 (highest); 5 is the default
-nouserlib Run ant without using the jar files from ${user.home}/.ant/lib
-noclasspath Run ant without using CLASSPATH
-autoproxy Java 1.5+ : use the OS proxies
-main <class> override Ant's normal entry point
-->
Android (1) - Activity的更多相关文章
- Android中Activity的启动模式
简介 Android中的活动启动方式分为4种:standard, singleTop, singleTask, singleInstance.可以在AndroidManifest.xml中通过给< ...
- Android之Activity的生命周期
PS:写一发关于Activity的生命周期,也算是面试的重点内容. 学习内容: 1.Activity的生命周期 2.面对多种情况的时候Activity的生命周期 3.onSaveInstanceSta ...
- android开发------Activity生命周期
这几天工作比较忙,基本没有什么时间更新播客了. 趁着今晚有点时间,我们来简单说一下什么是Activity生命周期和它们各阶段的特征 什么是生命周期 在还没有接触android开发的时候,听到有人说Ac ...
- Android课程---Activity中保存和恢复用户状态
onSaveInstanceState 保存 在暂停之后和保存之前调用 onRestoreInstanceState 恢复 再启动之后和显示之前调用 package com.example.chens ...
- Android课程---Activity 的生命周期
activity类处于android.app包中,继承体系如下: 1.java.lang.Object 2.android.content.Context 3.android.app.Applicat ...
- Android课程---Activity的创建
一.为了创建一个新的Activity,你需要继承Activity类,定义UI,实现功能.新的Activity的最基本的框架代码如下所示: package com.paad.myapplication; ...
- Android将Activity 打 jar包 (解决资源文件不能打包的问题)
转载地址:http://blog.csdn.net/xiaanming/article/details/9257853 最近有一个需要,我们公司做了一个apk客户端,然后其他的公司可以根据自己的需要来 ...
- Android之activity中新建控件
了解了5大布局,我们会发现这些布局都是静态的,如何让系统自动生成控件呢?这就需要activity来帮忙了 今天我们讲的就是用activity新建布局 用案例来说吧! 实现一个输入行和列自动生成表格并生 ...
- Android之activity初讲
前天我们已经成功创建了第一个Android项目,如果我要把软件推荐给我的第一个用户,毫无疑问是从界面开始介绍.因为即使你的程序算法再高效,架构再出色,用户根本不会在乎这些,他们一开始只会对看到的东西感 ...
- Android的Activity屏幕切换动画(一)-左右滑动切换
(国内知名Android开发论坛eoe开发者社区推荐:http://www.eoeandroid.com/) Android的Activity屏幕切换动画(一)-左右滑动切换 在Android开发过程 ...
随机推荐
- Swift - 网页控件(UIWebView)加载本地数据,文件
使用UIWebView加载本地数据或资源有如下三种方式: 1,使用loadHTMLString方法加载HTML内容 2,使用loadRequest方法加载本地资源(也可用于加载服务器资源) 3,先将内 ...
- Swift - 使用UIDatePicker实现倒计时功能
如果使用UIDatePicker时将模式设置为CountDownTimer,即可让该控件作为倒计时器来使用.效果图如下: 下面是代码示例: 1 2 3 4 5 6 7 8 9 10 11 12 ...
- Webbrowser控件execcommand参数详解
2D-Position 允许通过拖曳移动绝对定位的对象.AbsolutePosition 设定元素的 position 属性为“absolute”(绝对).BackColor 设置或获取当前选中区的背 ...
- Java 开源博客——B3log Solo 0.6.1 正式版发布了!
Java 开源博客 —— B3LOG Solo 0.6.1 正式版发布了!欢迎大家下载. 该版本主要是改善细节体验,并加入了一款 Metro 风格的皮肤. 特性 基于标签的文章分类 Ping Goog ...
- 再谈JSON -json定义及数据类型
再谈json 近期在项目中使用到了highcharts ,highstock做了一些统计分析.使用jQuery ajax那就不得不使用json, 可是在使用过程中也出现了非常多的疑惑,比方说,什么情况 ...
- 【PostgreSQL】PostgreSQL语法
在阅读的过程中有不论什么问题.欢迎一起交流 邮箱:1494713801@qq.com QQ:1494713801 一.PostgreSQL时间类型转换 --时间类型转成字符类型 select t ...
- freemark换行输出
<!--附件图片--> <#if attatList? exists> <#if (attatList?size>0)> ...
- 轻松学习之Linux教程一 ubuntu14.04+windows双系统安装
本系列文章由@uid=hpw" style="color:rgb(255,0,0)">超人爱因斯坦出品.转载请注明出处. 文章链接:http:// ...
- MySql数据库SQL语句将编码
-- 查看所有字符编码 SHOW CHARACTER SET; -- 查看创建数据库的指令并查看数据库使用的编码 show create database dbtest; -- 查看数据库编码: sh ...
- poj3259(spfa判负环)
题目连接:http://poj.org/problem?id=3259 题意:John的农场里N块地,M条路连接两块地,W个虫洞,虫洞是一条单向路,会在你离开之前把你传送到目的地,就是当你过去的时候时 ...