由于本人英文能力实在有限,不足之初敬请谅解 本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接 Displaying Bitmaps in Your UI 在你的UI中显示Bitmap This lesson brings together everything from previous lessons, showing you how to load multiple bitmaps into ViewPager and GridView components using a…
由于本人英文能力实在有限,不足之初敬请谅解 本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接 Displaying Bitmaps Efficiently 高效显示Bitmap Learn how to use common techniques to process and load Bitmap objects in a way that keeps your user interface (UI) components responsive and avoids excee…
由于本人英文能力实在有限,不足之初敬请谅解 本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接 Processing Bitmaps Off the UI Thread 在UI线程之外处理Bitmap The BitmapFactory.decode* methods, discussed in the Load Large Bitmaps Efficiently lesson, should not be executed on the main UI thread if the…
由于本人英文能力实在有限,不足之初敬请谅解 本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接 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 compo…
可以利用canvas画布类,这个类的具体方法可以参看官方api.http://developer.android.com/reference/android/graphics/Canvas.html 思路如下:对你图片做一些处理,例如让上部分完全显示,让下部分半透明.1.先将你的原图转化为位图Bitmap:2.先创建canvas画布,大小就是你原图片大小:3.创建画笔paint类,设置画笔属性透明度,颜色等:4.使用canvas类的drawBitmap(int[] colors, int off…
问题描写叙述 做过android开发基本都遇见过 ViewRootImpl$CalledFromWrongThreadException,上网一查,得到结果基本都是仅仅能在主线程中更改 ui.子线程要改动 ui 仅仅能 post 到主线程或者使用 handler 之类.可是细致看看exception的描写叙述并非这种."Only the original thread that created a view hierarchy can touch its views".仅仅有创建该 v…
ScrollView嵌套RecyclerView在Android6.0以下能正常显示,但是在6.0以上就会出现RecyclerView显示不全的bug.尝试多种方法之后终于找到解决办法,特在此记录下. 无效方法之一 ScrollView嵌套RecyclerView时出现的各种冲突一般是靠重写RecyclerView的LayoutManager来解决的.如下,重写GridLayoutManager. public class FullyGridLayoutManager extends GridL…