================
**build.gradle**中添加 ```gradle allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } } ```Gradle添加依赖
dependencies {
compile 'com.github.tedyuen:IThooksUtils:0.0.1'
}
//Application中注册
SharedPreferencesHelper sph = SharedPreferencesHelper.getInstance();
sph.Builder(context);
AppVersionHelper.getVersionName(context);
AppVersionHelper.getVersionCode(context);
StringUtils.isEmpty(str);
//替换default key
MD5.KEY = newKey;
//加密字符串
MD5.getMD5KeyStr(str);
- 布局文件根节点添加
<xmlns:app="http://schemas.android.com/apk/res-auto">
- 默认比例1:1
- 使用控件 app:proportion
<com.ithooks.hooksutils.widget.ProportionImageView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
app:proportion="0.87"
android:src="@drawable/abc"/>