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开发过程 ...
随机推荐
- OpenStack优先
http://www.lagou.com/jobs/1623064.html http://www.lagou.com/jobs/1406144.html
- 联想A800新蜂ROM V1.1 基于官方4.0.4精简省电稳定
ROM介绍 [出品]:新蜂工作室(基于官方) 1.源于官方:基于最稳定官方底包制作. 2.深度精简:自带APK数量从原厂包的131个降低到90个,精简31% 3.ROM包大小从原厂314MB精简到16 ...
- CocoaPods的install和update卡在“Anylyzing dependencies”的问题解决方式[效率]
问题 最新CocoaPod更新慢得问题,不管是运行pod install还是podupdate都卡在Anylyzing dependencies. 解决方式 事实上原因是运行两个命令时都会升级Coco ...
- Swift - 标签条(UITabBar)标签页控制器(UITabBarController)用法
App底部的tab标签页可以方便的把功能模块划分清楚,只需点击相应的标签页就可以展示完全独立的视图页面,同时各标签页间的视图也可以进行数据交换. TabBarItem系统自带图标样式(System ...
- js基础语法(一)
学习网站参考:http://www.w3school.com.cn/ 写入html输出: document.write('test out put'); 例子: http://www.w3school ...
- struts2错误验证
在登陆的时候一般要用错误验证功能.效果如图: 在action层的写法: this.addActionError("username或password错误"); 在jsp页面上取值: ...
- newlisp 注释生成文档
最近写了一个newlisp_armory库,用来实现一些newlisp自身不支持的操作.比如跨windows和ubuntu的目录拷贝功能等. 自己用的时候,发现没有API reference文档参考, ...
- POJ2112_Optimal Milking(网洛流最大流Dinic+最短路Flody+二分)
解题报告 农场有k个挤奶机和c头牛,每头牛到每一台挤奶机距离不一样,每台挤奶机每天最多挤m头牛的奶. 寻找一个方案,安排每头牛到某一挤奶机挤奶,使得c头牛须要走的全部路程中的最大路程的最小值. 要使每 ...
- 一个通用onReady函数的实现
define([], function(){ function onReady(fn) { var DOC = document, html = DOC.documentElement, W3C = ...
- java 获取当期时间之前几小时的时间
Calendar expireDate = Calendar.getInstance(); expireDate.set(Calendar.HOUR_OF_DAY, expireDate.get(Ca ...