上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 34 下一页
摘要: EditText继承关系:View-->TextView-->EditText EditText的属性很多,这里介绍几个:android:hint="请输入数字!"//设置显示在空间上的提示信息android:numeric="integer"//设置只能输入整数,如果是小数则是:decimalandroid:singleLine="true"//设置单行输入,一旦设置为true,则文字不会自动换行。android:password="true"//设置只能输入密码android:textColor = 阅读全文
posted @ 2013-11-28 15:37 Entropy_lxl 阅读(253) 评论(0) 推荐(0) 编辑
摘要: RelativeLayout用到的一些重要的属性:第一类:属性值为true或falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layout_centerInparent 相对于父元素完全居中android:layout_alignParentBottom 贴紧父元素的下边缘android:layout_alignParentLeft 贴紧父元素的左边缘android:layout_alignParentRight 贴紧父元素的右边缘android:layout_alignParen 阅读全文
posted @ 2013-11-28 15:34 Entropy_lxl 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 在模拟器上获取GPS信息时,使用Location loc = LocationManager.getLastKnownLocation("gps");来获取location信息,但是往往在调试中loc是null的,因为首先需要在模拟器中手动添加GPS信息,有两种手动添加方法1、在eclipse下,windows-->open perspective-->DDMS-->Emulator control-->Manual下手动设置经纬度,并按send按钮。2、在cmd下手动添加信息。(1)首先打开模拟器,然后运行cmd,输入telnet localhos 阅读全文
posted @ 2013-11-21 07:54 Entropy_lxl 阅读(2472) 评论(0) 推荐(0) 编辑
摘要: 解决方案:一、右击项目->properties->Java Build Path->Order and Export,在需要引用的包前面打勾。二、Project->Clean... 阅读全文
posted @ 2013-11-13 21:08 Entropy_lxl 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 因为用了和Google map相关的类,而Google map是单独的library,需要导入之后才能使用,因此在manifest.xml文件中的里边添加即可解决此外 加在标签外边 阅读全文
posted @ 2013-11-05 17:25 Entropy_lxl 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 大家都在为项目开发成功而喜悦,但可不知成功的路上是会经常出错的,下面是我碰到的一些错误集合!【错误信息】01-16 17:16:18.945: I/magh(979): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8080 refused在android模拟器连接本机访问web时报这错,把127.0.0.1改成localhost也是一样的原因:在向本机发送HTTP请求时,有一点必须注意,就是在android虚拟机中,127.0.0.1为android 虚拟机的IP地址,如果要访问本机 阅读全文
posted @ 2013-11-05 15:18 Entropy_lxl 阅读(3497) 评论(0) 推荐(0) 编辑
摘要: 修改hosts文件。文件在C:\WINDOWS\system32\drivers\etc目录下,Linux用户打开/etc/hosts文件。用记事本打开文件后添加以下内容。#Google主页203.208.46.146 www.google.com#这行是为了方便打开Android开发官网 现在好像不FQ也可以打开74.125.113.121 developer.android.com#更新的内容从以下地址下载203.208.46.146 dl.google.com203.208.46.146 dl-ssl.google.com 阅读全文
posted @ 2013-11-05 15:14 Entropy_lxl 阅读(338) 评论(0) 推荐(0) 编辑
摘要: target选项中要选择Google APIs。如图。 阅读全文
posted @ 2013-11-04 12:19 Entropy_lxl 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 解决方法:寻找eclipse解压路径下的eclipse.ini文件,使用写字板打开,将第10行和第14行的数据:原来位256,修改为128。即可!解释原因:虚拟机为java永久生成对象(Permanate generation)如,class对象、方法对象这些可反射(reflective)对象分配内存限制设置(原256,设置为128) 阅读全文
posted @ 2013-11-03 15:30 Entropy_lxl 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1.在测试时,如何实现一个提示可以使用Toast.makeText(this, "这是一个提示", Toast.LENGTH_SHORT).show(); //从资源文件string.xml 里面取提示信息Toast.makeText(this, getString(R.string.welcome), Toast.LENGTH_SHORT).show();这个提示会几秒钟后消失2.可以使用AlertDialog.Builder 才产生一个提示框. 例如像messagebox那样的new AlertDialog.Builder(this) .setTitle("A 阅读全文
posted @ 2013-10-21 08:47 Entropy_lxl 阅读(8933) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 34 下一页