- 博客(10)
- 资源 (3)
- 收藏
- 关注
原创 85ViewTreeObserver.addOnGlobalLayoutListener(listener)
有时候需要在onCreate方法中知道某个View组件的宽度和高度等信息,而直接调用View组件的getWidth()、getHeight()、getMeasuredWidth()、getMeasuredHeight()、getTop()、getLeft()等方法是无法获取到真实值的,只会得到0。这是因为View组件布局要在onResume回调后完成。下面提供实现方法,onGlobalLayout
2015-02-02 17:22:42 719
原创 GridView属性集合 drawSelectorOnTop
android:fastScrollEnabled="true"是让ListView出现快速滚动的按钮,一开始,我的记录只有十条,我在拉动的时候都不见出现快速滚动,后来才发现,原因是数据不多的原因,只要数据足够多,才会自动出现的。 还有一个属性:android:drawSelectorOnTopWhen set to true, the selector wil
2015-02-02 15:16:35 912
转载 84Android drawable-nodpi 的作用
把一些不能被拉伸的图片放在 drawable-nodpi 中,此图片将不会被放大,以原大小显示。看下图:drawable-nodpi 的作用" title="Android drawable-nodpi 的作用" style="margin:0px; padding:0px; border:0px; list-style:none">这两个图片被放到了dra
2015-02-02 15:09:25 685
原创 Displaying Bitmap小结
Google的关于展示位图的课程学习完毕了。主要的内容主要包括了下面的几个部分:1.高效的加载大图(Loading Large Bitmaps Efficiently)2.非UI线程处理Bitmap(Processing Bitmaps Off the UI Thread)3.缓存Bitmaps(Caching Bitmaps)(LruCache和DiskLruCache,
2015-02-02 14:42:06 603
原创 Displaying Bitmaps in Your UI
This lesson brings together everything from previous lessons, showing you how to load multiple bitmaps intoViewPager and GridView components using a background thread and bitmap cache, while dealing
2015-02-02 14:40:16 621
原创 Managing Bitmap Memory
In addition to the steps described in Caching Bitmaps, there are specific things you can do to facilitate garbage collection and bitmap reuse. The recommended strategy depends on which version(s) of
2015-02-02 14:39:38 631
原创 Caching Bitmaps
Loading a single bitmap into your user interface (UI) is straightforward, however things get more complicated if you need to load a larger set of images at once. In many cases (such as with components
2015-02-02 14:39:06 558
原创 Processing Bitmaps Off the UI Thread
The BitmapFactory.decode* methods, discussed in the Load Large Bitmaps Efficiently lesson, should not be executed on the main UI thread if the source data is read from disk or a network location (
2015-02-02 14:38:29 688
原创 Loading Large Bitmaps Efficiently
Images come in all shapes and sizes. In many cases they are larger than required for a typical application user interface (UI). For example, the system Gallery application displays photos taken using
2015-02-02 14:36:54 654 1
原创 Displaying Bitmaps Efficiently
Learn how to use common techniques to process and loadBitmap objects in a way that keeps your user interface (UI) components responsive and avoids exceeding your application memory limit. If you’re
2015-02-02 14:35:57 734
Android组件设计思想
2015-01-05
Volley框架
2014-12-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人