输入框左侧的logo:android:drawableleft

 
弹出提示:
Toast.makeText(this,"提示",Toast.LENGHT_LONG).show();
 
返回键退出:
onKeyDown(keyCode,event){
  if(keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount == 0){
//退出
return true;
}
return super.onKeyDown(keyCode,event);
}
 
注意事项:
1、测试类:继承AndroidTestCase类

方法要用test开头!!例如testCreate()、testSave()。
要在Mainfest.xml配置
在<application>内
<uses-library android:name="android.test.runner"/>
//name是默认的!
在<application>外
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.ghimtim.firstapp"></instrumentation>
//name是默认的;targetPackage是MainActivty.java所在的包?
 
2、R.java不会自动生成的原因:mainfest.xml中存在错误!
 
3、新建Acivity时一定要在Mainfest.xml里面注册!!!

Android Development Note-02的更多相关文章

  1. Android Testing学习02 HelloTesting 项目建立与执行

    Android Testing学习02 HelloTesting 项目建立与执行 Android测试,分为待测试的项目和测试项目,这两个项目会生成两个独立的apk,但是内部,它们会共享同一个进程. 下 ...

  2. Android development tools line_endings hacking

    /******************************************************************** * Android development tools li ...

  3. Do's and Don'ts for Android development

    Do's and Don'ts for Android development, by Futurice developers Use Gradle and its recommended proje ...

  4. Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment:

    Administrator@DESKTOP-EHCTIOR MINGW64 /d/react-native-eyepetizer (master) $ react-native run-android ...

  5. [Android]Eclipse 安装 ADT[Android Development Tooling] 失败的两种解决办法

    原因 最近想在新装的 Win7 里搭建一下 Android 的开发环境,虽然现在有 Android Studio 了,不过还是习惯 Eclipse 一点.众所周知的原因,Eclipse 直接安装 AD ...

  6. Android Service总结02 service介绍

    Android Service总结02 service介绍 版本 版本说明 发布时间 发布人 V1.0 介绍了Service的种类,常用API,生命周期等内容. 2013-03-16 Skywang ...

  7. ADT Android Development Tools

    ADT(Android Development Tools)在Eclipse编译IDE环境中,需安装ADT(Android Developer Tools)Plug-in,这是Android在Ecli ...

  8. Solutions for common Android development problems with the Eclipse IDE- Tutorial

    Table of Contents 1. Solving typical Android development problems 1.1. Clean Project 1.2. android.co ...

  9. Android开发 Unity3D基础 Android Development

    开发环境 Window 7 Unity3D 3.3.0 MB525 defy Android 2.1-update1 本次学习: 1.认识Unity 2.Unity3D环境搭建与Android软件生成 ...

  10. Websites for more Android development information

    There is a vibrant, helpful Android developer community on the Web. Here are a numberof useful websi ...

随机推荐

  1. Windows 远程桌面文件传输的方法

    实现电脑的远程连接以后,很多时候会需要进行主机间的文件传输,这个时候就可以用系统自带的远程连接里的磁盘映射来完成,详细如下: 远程桌面程序内置了映射磁盘的功能,通过这个功能可以实现远程登录服务器时自动 ...

  2. mysql之select,insert,delete,update

    写在前面 上篇文章学习了创建数据库和数据表,这篇文章将学习对数据表的增删改查操作. 系列文章 mysql之创建数据库,创建数据表 一个例子 上篇文章中,创建了数据库和数据表,数据表中还没有数据,这里我 ...

  3. hdu1070(C++)

    本题在于求单价,即为每一天(每200升牛奶)要多少钱,注意超过1000的当做5天,不足200的忽略 #include<iostream> #include<string> us ...

  4. EasyMvc入门教程-基本控件说明(6)进度条

    进度条的发明是很牛逼的,就如12306采用了队列解决了系统崩溃的问题一样..:) 进度条大家都见过,那么我们先来实现一个简单的进度条,请看例子: @Html.Q().Progress().Value( ...

  5. PowerDesigner16 安装包及破解文件

    一.准备工作 PowerDesigner16 安装包:http://pan.baidu.com/s/11Qv9H 或http://cloud.suning.com/cloud-web/share/li ...

  6. testNG配置dataSource多数据源

    spring的XML配置好之后,运行testNG还会出问题. 搞定代码如下: /** * 基于Spring的服务层测试超类 * * @author chief */ @ContextConfigura ...

  7. 【音乐App】—— Vue-music 项目学习笔记:用户个人中心开发

    前言:以下内容均为学习慕课网高级实战课程的实践爬坑笔记. 项目github地址:https://github.com/66Web/ljq_vue_music,欢迎Star. 歌曲列表 收藏歌曲 一.用 ...

  8. AutoCAD如何批量设置线宽

    1 如下图所示,全部选中图形,然后设置线宽   2 但是一般剖面线并不需要这么宽,我们打印预览可以发现完全黑的看不清了.   3 把线宽都设为0.2毫米效果不错

  9. Vue 引入ElementUI 2.0.11:依赖未发现的问题

    转自:https://blog.csdn.net/cslucifer/article/details/79019649

  10. vue key 的另外一个用法 过度

    key也可以用于强制替换元素/组件而不是重复使用它.当你遇到如下场景时它可能会很有用: 完整地触发组件的生命周期钩子 触发过渡 例如: <transition> <span :key ...