Android 图片开源库 BitmapView

码农软件 · 软件分类 · Android UI 组件 · 2019-04-24 10:57:34

软件介绍

BitmapView
Android 开源库, 支持显示任意尺寸JPG PNG图片

特性
- 缩放
- 滚动和Fling
- 旋转

Gradle 依赖
```gradle
dependencies {
    compile 'org.qiibeta.views:bitmapview:1.0.1'
}
```
Demo
下载 sample.apk

使用说明
```java
public class YourApplication extends Application {
    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
        TileImage.clearBitmapRecyclePool();
    }
}
```
```java
@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
  String path=""; //the actual file path
  Bitmap thumbnailBitmap=null;
  GestureBitmapView bitmapView=(GestureBitmapView)findViewById(R.id.bv);
  bitmapView.setBitmapSource(BitmapSource.newInstance(Uri.parse(path),thumbnailBitmap));
}
```
ViewPager的bug,要这样修正
```java
public class FixViewPager extends ViewPager {
    public FixViewPager(Context context) {
        super(context);
    }
    public FixViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (Exception ignored) {
        }
        return false;
    }
}

本文地址:https://codercto.com/soft/d/4272.html

区块链技术驱动金融

区块链技术驱动金融

阿尔文德·纳拉亚南、约什·贝努、爱德华·费尔顿、安德鲁·米勒、史蒂文·戈德费德 / 林华、王勇 / 中信出版社,中信出版集团 / 2016-8-25 / CNY 79.00

从数字货币及智能合约技术层面,解读了区块链技术在金融领域的运用。“如果你正在寻找一本在技术层面解释比特币是如何运作的,并且你有一定计算机科学和编程的基本知识,这本书应该很适合你。” 《区块链:技术驱动金融》回答了一系列关于比特币如何运用区块链技术运作的问题,并且着重讲述了各种技术功能,以及未来会形成的网络。比特币是如何运作的?它因何而与众不同?你的比特币安全吗?比特币用户如何匿名?区块链如何......一起来看看 《区块链技术驱动金融》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

SHA 加密
SHA 加密

SHA 加密工具