![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
surehao
这个作者很懒,什么都没留下…
展开
-
Android.jar文件
android.app :提供高层的程序模型、提供基本的运行环境android.content :包含各种的对设备上的数据进行访问和发布的类android.database :通过内容提供者浏览和操作数据库android.graphics :底层的图形库,包含画布,颜色过滤,点,矩形,可以将他们直接绘制到屏幕上.android.location :定位和相关服务的类androi原创 2013-08-30 16:59:14 · 473 阅读 · 0 评论 -
Android百度map默认位置中心点设置
//设定中心点坐标 LatLng cenpt = new LatLng(29.806651,121.606983); //定义地图状态 MapStatus mMapStatus = new MapStatus.Builder() .target(cenpt) .zoom(18) .bui转载 2014-09-02 11:19:31 · 1822 阅读 · 0 评论 -
让AlertDialog在按钮被点击后不消失
在网上搜索了一下,发现有两种做法:第一:使用反射:在你的setPositiveButton中添加://用于不关闭对话框try { Field field = dialog.getClass().getSuperclass().getDeclaredField("mShowing"); field.setAccessible(true); field.set(di转载 2014-08-13 14:10:58 · 415 阅读 · 0 评论 -
viewpager放在scrollview中时,滑动viewpager里的内容会不顺畅
viewpager放在scrollview中时,滑动viewpager里的内容会不顺畅,原因是稍微有点上下的动作就会被scrollview截去了,为了解决这个问题,重写了scrollview里的方法,顺利解决。也就是重写onInterceptTouchEvent方法,定义方法判断viewpager上的滑动的动作不会被scrollview截去。下面是重写scrollview的源码:转载 2014-08-22 17:58:14 · 720 阅读 · 0 评论 -
Android通过findViewById()获取控件为NULL
如果在activity中直接调用findViewById方法,它的完整形式是this.findViewById().而我所需要的控件是不存在本身activity的布局中的.所以要通过控件所在的view调用findViewById方法,就可以获取到正确的控件了怎么获取控件所在的View呢使用:LinearLayout view= (LinearLayout) inflater.inflate原创 2014-03-10 15:16:04 · 3100 阅读 · 0 评论 -
APK签名时报错 Export aborted because fatal lint errors were found
问题描述: APK签名时报错如下 Export aborted because fatal lint errors were found.These are listed in the Problems view.Either fix these before running Export again,or turn off "Run full error check whe转载 2014-08-01 10:04:19 · 496 阅读 · 0 评论 -
安卓表格布局android:collapseColumns,android:shrinkColumns和stretchColumn
TableLayout可设置的属性包括全局属性及单元格属性。1、全局属性也即列属性,有以下3个参数:android:stretchColumns 设置可伸展的列。该列可以向行方向伸展,最多可占据一整行。android:shrinkColumns 设置可收缩的列。当该列子控件的内容太多,已经挤满所在行,那么该子控件的内容将往列方向显示转载 2014-07-11 09:33:20 · 1563 阅读 · 0 评论 -
error inflating class com.baidu.mapapi.map.MapView
调用baidu地图出现error inflating class com.baidu.mapapi.map.MapView 解决:原创 2014-07-18 14:35:44 · 1449 阅读 · 3 评论 -
用BindService 启动注意点
public IBinder onBind(Intent intent) { // TODO Auto-generated method stub return myBinder; } public class MyBinder extends Binder{ public BindService getS原创 2014-07-17 10:03:11 · 511 阅读 · 0 评论 -
Android无法访问本地服务器(localhost/127.0.0.1)的解决方案
在Android开发中通过localhost或127.0.0.1访问本地服务器时,会报java.net.ConnectException: localhost/127.0.0.1:8083 -Connection refused异常。为什么会报这个异常呢?因为Android模拟器本身把自己当做了localhost或127.0.0.1,而此时我们又通过localhost或127.0.0.1访转载 2014-04-11 17:15:33 · 8127 阅读 · 1 评论 -
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
关于Intent的setFlags()方法 很多人使用startActivity时候,会碰到如下的异常:Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW转载 2014-04-09 16:53:45 · 721 阅读 · 0 评论 -
android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed错误原因
情况1:你定义的字段为 not null而插入时对应的字段却没值。情况2:你定义的字段设定PRIMARY,而插入的值已经在表中存在。转载 2014-04-15 11:11:44 · 1045 阅读 · 0 评论 -
系统上安装了多种浏览器,能否指定某浏览器访问指定页面?请说明原由。
一、启动android默认浏览器在Android程序中我们可以通过发送隐式Intent来启动系统默认的浏览器。如果手机本身安装了多个浏览器而又没有设置默认浏览器的话,系统将让用户选择使用哪个浏览器来打开连接。关于Intent的更多内容请参考《常用Intent》示例1 Intent intent =newIntent(); intent.se转载 2013-09-27 22:04:29 · 771 阅读 · 0 评论 -
Android Call requires API level 11 (current min is 8)的解决方案
【错误描述】 在用Eclipse开发过程中,为了兼容Android2.2和4.0以上版本,我在使用Notification类时做了2个版本的代码,代码根据系统版本不同执行相应模块,结果,等我输完代码,发现系统提示了一个这么的错误。【原因分析】 不详,可能和Run Android Lint有点关系吧。就是创建项目时,我们设置了最低版本API Level,比如我的是转载 2013-10-09 10:12:21 · 522 阅读 · 0 评论 -
android面试题--sim卡的EF文件有何作用 ?????
sim卡的文件系统有自己规范,主要是为了和手机通讯,sim本 身可以有自己的操作系统,EF就是作存储并和手机通讯用的SIM (Subscriber Identity Module) 卡是一种智能卡, ISO7816中对智能卡作了基本的定义. SIM卡提供给用户的是它的移动性和便携性.SIM卡的硬件组成CPU: SIM卡中的CPU和电脑中CPU一样负责整个SIM卡的控制, 运算和转载 2013-09-11 19:45:08 · 936 阅读 · 0 评论 -
android中sim卡相关操作
转载:http://topic.csdn.net/u/20110417/14/edcbbcd9-44f0-4175-a156-0231d12cba47.html 1,sim卡联系人的增,删,修改Uri是content://icc/adn/具体使用跟操作其他的contentprovider一样,传递的参数可以参照\base\telephony\java\com\android\inter转载 2013-09-11 19:46:33 · 1271 阅读 · 0 评论 -
Android中Service的调试
在Android中service的调试和普通的Application不同,如果仅仅设置断点的话,调试器是不会在你的断点处停下来的,解决方法就是:在代码中声明,以便让调试器能到你声明的地方。你只需加入下面这一句代码即可: android.os.Debug.waitForDebugger();你的断点可以设置在这句后面任何地方。原创 2013-09-02 11:11:59 · 3187 阅读 · 0 评论 -
先startService,通过bindService启动的service,在unbindService后service还会运行
有三种情况:如果直接使用服务,则没有必要进行绑定,但是如果要使用服务里面的方法,则要进行绑定。具体的启动情况有下: 1.当启动时,单独调用bindService方法,在unbindService后,会执行service的onUnbind,在执行onDestroy方法。 2.当启动时,先调用startService,在调用bindService方法后,在unbindService后,会执转载 2014-09-16 15:42:27 · 870 阅读 · 0 评论