`
wcgdonot
  • 浏览: 89022 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
支持自己的证书 http://blog.applegrew.com/2015/04/using-pinned-self-signed-ssl-certificate-with-android-volley/ http://www.codeproject.com/Articles/826045/Android-security-Implementation-of-Self-signed-SSL   Volley 开启对Https的支持,并且忽略对Hostname的检查 (java.io.IOException: Hostname ‘*.*.*.*’ was not verified) ...
ListView的headerView自定义布局,运行报错: java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams    如果要将一个view添加到另一个布局中,你必须设定该View的布局参数为其父类所使用的布局参数类型。即要在代码中动态改变某组件的高度,其布局参数类型应该是其父类所使用的布局参数类型。   ListView的headerView的LayoutParams参数改为 ...
最近 Google 公司 Chrome 部门的设计师 Sebastien Gabriel 写了一篇介绍 DPI 的文章,里面介绍了 设计师在为各种设备(PC、IPhone、IPad、Android、等)设计 UI 的方式和容易遇到的各种问题。内容涉及到: 什么是 PPI 和 DPI PPI 和 DPI 对 UI 有啥影响 屏幕分辨率 什么是 4K 什么是屏幕分辨率 什么是视网膜显示屏(retina) 如何用倍数来换算不同的屏幕尺寸 什么是 SP、DP和 PT 在 IOS 上处理 PPI 在 Android 上处理 DPI 在 Mac 和 Chrome 笔记本是处理 PP ...
&#032;–> <–  空格 &#033;–>!<– &#033;–>!<– &#034;–>”<– &#035;–>#<– &#036;–>$<– &#037;–>%<– &#038;–>&<– &#039;–>’<– &#040;–>(<– &#041;–>)<– &#042;–>*<– &#043;–> ...
原文 : http://blog.csdn.net/xiaoyaovsxin/article/details/8450056  一、使用xliff的用法: <xliff:g>标签介绍: 属性id可以随便命名 属性值举例说明%n$ms:代表输出的是字符串,n代表是第几个参数,设置m的值可以在输出之前放置空格 %n$md:代表输出的是整数,n代表是第几个参数,设置m的值可以在输出之前放置空格,也可以设为0m,在输出之前放置m个0 %n$mf:代表输出的是浮点数,n代表是第几个参数,设置m的值可以控制小数位数,如m=2.2时,输出格式为00.00  也可简单写成: %d   ...
Delete Modual AndroidStudio是基于社区版开发的,不能直接删除Module,删除方法:.idea目录下modules.xml删除对应的module,再command + delete就马上生效了。   Upgrade  Win版修改\bin\studio.exe.vmoptions(64位系统修改\bin\studio64.exe.vmoptions),添加两行 -Didea.updates.url=https://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=htt ...
在activity的生命周期中,只要离开了可见阶段,或者说失去了焦点,activity就很可能被KILL掉了,这个时候,就需要有种机制,能保存当时的状态,这就是savedInstanceState的作用。 当一个Activity在pause时,被kill之前,它可以调用onSaveInstanceState()来保存当前activity的状态信息(在paused状态时,要被kill的时候)。用来保存状态信息的Bundle会同时传给两个method,即onRestoreInstanceState() and onCreate().
信仰是如何毁掉程序员的
Like the docs say, think about it this way. If you were to do an application like a book reader, you will not want to load all the fragments into memory at once. You would like to load and destroy Fragments as the user reads. In this case you will use FragmentStatePagerAdapter. If you are just displa ...
http://panfuy.iteye.com/blog/1278865 SVN 主干(trunk)、分支(branch )、标记(tag)   http://blog.csdn.net/jamesfancy/article/details/1702187  为Subversion版本库创建只含部分内容和特殊改动的标签
获取键、值 Map类提供了entrySet()方法,该方法返回Map.Entry实例化后的对象集。同时Map.Entry类提供了getKey()、getValue()和setValue()方法,可以使用它们对Map里的值进行操作。 Map<String, String> map = new HashMap(); for (Map.Entry entry : map.entrySet()) { Object key = entry.getKey( ); }   遍历 Map hashmap =n ...
问题: 在ScrollView中嵌套ListView时,ListView显示不完全,高度会有问题。   原因: 默认情况下Android是禁止在ScrollView中放入另外的ScrollView的,它的高度是无法计算的。   解决思路: 设置完ListView的Adapter后,根据ListView的子项重新计算ListView的高度,然后将高度值再作为LayoutParams设置给ListView。   Code public class Utility { public static void setListViewHeightBasedO ...
What's the difference between windowBackground and background for activities style?   android:background is the background color (drawable to be precise) of a view component where as android:windowBackground is the background color of the window (activity or dialog) in which your view resides. B ...
1. ctrl+shift+r:打开资源 这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask名中的前几个字母,比如applic*.xml。美中不足的是这组快捷键并非在所有视图下都能用。   2. ctrl+o:快速outline     如果想要查看当前类的方法或某个特定方法,但又不想把代码拉上拉下,也不想使用查找功能的话,就用ctrl+o吧。它可以列出当前类中的所有方法及属性,你只需输入你想要查询的方法名,点击enter就能够直接跳转至你想去的位置。   3. ctrl+e:快速转换编辑器     这组快捷键将帮助你在打开的编辑器之间浏览。使用ctr ...
Global site tag (gtag.js) - Google Analytics