通常我们在开发android应用程序时,在加载图片时常常需要与Bitmap打交道,一般会使用BitmapFactory中提供的相关decode方法获取: 如果一张很大的图片,我们不加处理直接decode的话常常会抛出oom即 out of memory的异常.为了尽量避免这种情况的发生,我们就会 用到BitmapFactory中的一个内部类Options提供相关选项进行设置. inJustDecodeBounds 如果将其设为true的话,在decode时将会返回null,通过此设置可以去查询一…
Android开发中Bundle用法包裹数据 Bundle的经典用法,包裹数据放入Intent中,目的在于传输数据. SDK 里是这样描述: A mapping from String values to various Parcelable types. 它帮助我将数据打包传入intent里面,为使用这些数据提供了便利. protected void onListItemClick (ListView l, View v, int position, long id) { super.onLi…