Giter VIP home page Giter VIP logo

ithooksutils's Introduction

Android开发工具包

I.T.Hooks icon

上海铁钩信息科技

================

目录

使用

**build.gradle**中添加 ```gradle allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } } ```

Gradle添加依赖

dependencies {
    compile 'com.github.tedyuen:IThooksUtils:0.0.1'
}

common包

SharedPreferencesHelper

> SharedPreferences缓存帮助类
//Application中注册
SharedPreferencesHelper sph = SharedPreferencesHelper.getInstance();
sph.Builder(context);

AppVersionHelper

> 获取app版本号和版本名称
AppVersionHelper.getVersionName(context);
AppVersionHelper.getVersionCode(context);

UiHelper

> 屏幕分辨率转化、宽高数值获取

StringUtils

> 字符串处理工具
StringUtils.isEmpty(str);

AppNetworkInfo

> 网络环境 & GPS判断 & 检查手机上是否安装了指定的软件

MD5

> MD5加密
//替换default key
MD5.KEY = newKey;
//加密字符串
MD5.getMD5KeyStr(str);

DateUtil

> 时间操作转换类

widget包

ProportionImageView

> 动态宽高比ImageView
  • 布局文件根节点添加
<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"/>

ithooksutils's People

Contributors

tedyuen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.