随笔分类 -  Android

httpclient response 重定向
摘要:HTTPClient请求后,重定向后,获取重定向的URL。方法一:重定向后获取URLimport org.apache.http.HttpEntity;import org.apache.http.HttpHost;import org.apache.http.HttpResponse;import... 阅读全文
posted @ 2015-07-21 12:58 jason-chen 阅读(6603) 评论(0) 推荐(0)
ActionBar隐藏修改图标和标题
摘要:有时候在一些子页面或者内容页面,不需要显示ActionBar的标题栏图标。可用如下方式进行设置。首先获取到ActionBar对象ActionBar actionBar=getActionBar();使用android:logo属性。不像方方正正的icon,logo的图像不会有任何宽度限制。logo图... 阅读全文
posted @ 2014-09-17 18:20 jason-chen 阅读(930) 评论(0) 推荐(0)
Android之ActionBar学习
摘要:关于那个问题:是关于如何生成如下图所示之ActionBar效果: 其实就在官网上就有答案,自己疏忽再加上资料繁多。寻了许久,经过指点。终于找到:To enable split action bar, simply add uiOptions="splitActionBarWhenNarrow" to your or manifest element.(http://developer.android.com/guide/topics/ui/actionbar.html)Using split action bar 标题下。如果你想拥有上图的那种效果,Fragment(关于F 阅读全文
posted @ 2013-09-10 00:30 jason-chen 阅读(376) 评论(0) 推荐(0)
关于Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
摘要:google 给的android的例子里,有用到google APIs,新版本的ADT默认只有Android的SDK,如果运行平台与目标平台不一致会报:Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY。解决方法如下:1、首先需要通过Android SDKManager下载google APIs。2、设置Project Build Target目标为Google APIs3、设置模拟器(AVD)的Taget为Google APIS接下来即可在模拟器运行了! 阅读全文
posted @ 2013-09-05 14:39 jason-chen 阅读(448) 评论(0) 推荐(0)
SlidingMenu的编译及使用
摘要:1. 在github上有一个效果不错的开源库,SlidingMenu 最新的代码下载下来后,ExampleListActivity项目会报错: No resource found that matches the given name: attr 'homeAsUpIndicator'. No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'. 原因是它本身又引用了另外一个开源库 ActionBarSherlock ,所以首先要做的就是去下载 Actio 阅读全文
posted @ 2013-08-11 14:54 jason-chen 阅读(977) 评论(2) 推荐(0)
adb server is out of date.
摘要:1:今天调试android的时候发现一个诡异的问题C:\Users\xxxx>adbstart-serveradbserverisoutofdate.killing...ADBserverdidn'tACK*failedtostartdaemon*C:\Users\xxxx>adb start-serveradb server is out of date. killing...ADB server didn't ACK* failed to start daemon *adb 不管执行 shell devices 还是logcat 都会报错adbserveriso 阅读全文
posted @ 2013-06-17 23:25 jason-chen 阅读(309) 评论(0) 推荐(0)
Android中引入第三方Jar包的方法(java.lang.NoClassDefFoundError)
摘要:1、在工程下新建lib文件夹,将需要的第三方包拷贝进来。2、将引用的第三方包,添加进工作的build path。3、(关键的一步)将lib设为源文件夹。在/libs 文件夹上右键--Build Path--Use as Source Folder如果不设置,则程序编译可以通过,但运行的时候,会报: java.lang.NoClassDefFoundError若出现如下问题取消之后再重新编译。。。。类似如下问题:UNEXPECTED TOP-LEVEL EXCEPTION:java.lang.IllegalArgumentException: already added: Lxzy/androi 阅读全文
posted @ 2013-06-04 23:56 jason-chen 阅读(378) 评论(0) 推荐(0)