android
wugian
这个作者很懒,什么都没留下…
展开
-
android 全屏显示设置
1、 在onCreat方法中setContentView()之前插入requestWindowFeature(Window.FEATURE_NO_TITLE);//取消标题栏getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_转载 2013-12-28 22:07:46 · 951 阅读 · 0 评论 -
常用库gradle配置
一些常用库gradle配置使用,一些库按照正常文档导入有可能会出错,所以mark原创 2014-10-29 11:17:19 · 700 阅读 · 0 评论 -
调试技巧--IDEA or AS
IDEA 调试错误源码及常用快捷键介绍原创 2014-11-28 19:29:07 · 1289 阅读 · 0 评论 -
Android图片优化和APK优化
Android应用的优化中,除了代码那块,资源文件也是非常重要的一块,特别是图片,图片的优化需要与设计师商量。图片优化:1.尽量减少图片的颜色、色深,这样也可以减少图片的大小,比如色深减少到原来的一半,图片容量就可以减少到原来的三分之一。在准备资源图片的时候,和设计师商量 ,如果在界面效果可以接受的情况下,尽量减少图片的颜色数;2.图片压缩工具,Android应用中转载 2014-10-13 09:24:44 · 880 阅读 · 0 评论 -
android studio 添加github上的开源库
现在好多开源项目都使用AS写的原创 2014-09-03 18:41:02 · 964 阅读 · 0 评论 -
missing styles is the correct theme chosen for this layout
missing styles is the correct theme chosen for this layout界面布局主题选择与activity在mai原创 2014-08-30 10:15:37 · 756 阅读 · 0 评论 -
adb 调试
查看设备列表adb devices连接设备adb -s device_name shell安装软件adb install E:\test.apk查看日志logcat 日志过滤请参考http://blog.csdn.net/xyz_lmn/article/details/7004710mark files原创 2014-08-13 11:04:18 · 549 阅读 · 0 评论 -
关于android sdk快速更新
mirrors.neusoft.edu.cn:80原创 2014-08-11 11:25:28 · 409 阅读 · 0 评论 -
android 完全退出App
ActivityManager activityMgr= (ActivityManager) this.getSystemService(ACTIVITY_SERVICE );activityMgr.restartPackage(getPackageName());当然了,要执行上面的代码,还需要添加权限原创 2014-07-09 17:08:57 · 537 阅读 · 0 评论 -
Unable to execute dex: Multiple dex files define
我遇到的原因之一为原创 2014-06-27 18:21:54 · 463 阅读 · 0 评论 -
仿微博回复@某人的列子不可删edittext中@某人内容
在回复时我们往往需要选择一个ID去@,或者作为提示文字,但这个文字又不能被删除怎么办呢,如下给出解决方案,如需优化欢迎回复.EditText testEt; String testStr = "@lovely:"; int index=0; @Override protected void onCreate(Bundle savedInstanceState) { sup原创 2014-01-16 12:33:28 · 974 阅读 · 0 评论 -
关于避免fragment重复加载
当一个而在存在多个fragment并要切换时,fragment 会多次重复加载,怎么解决呢,大概思路是当滑动到当前页面的时候把你要显示的show就行了.`要使用到的两个方法如下:getSupportFragmentManager().beginTransaction() .hide(promotionF).hide(promoteSpotF) .add(id.c原创 2014-01-24 17:54:56 · 1049 阅读 · 0 评论 -
关于android startActivityForResult,intent为空
当在一个页面 启动活动并想从另外一个页面得到返回数据时,直接按返回键可能会遇到intent 为空如下例1,启动@Override public void onItemClick(AdapterView arg0, View arg1, int position, long arg3) { super.onItemClick(arg0, arg1, position, arg3)原创 2013-12-25 18:56:38 · 2136 阅读 · 0 评论 -
关于https访问的证书设置
关于https访问的证书设置用OkHttp访问时错误异常大概是这样子 javax.net.ssl.SSLHandshakeException: com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Wed F原创 2016-11-02 14:54:13 · 2037 阅读 · 0 评论