程序猿必备资源清单(安卓居多)

Gota

Android 6.0 动态权限适配。

安装

Maven

<dependency>
<groupId>net.alhazmy13.Gota</groupId>
<artifactId>libary</artifactId>
<version>1.4.1</version>
</dependency>

gradle

dependencies {
    compile 'net.alhazmy13.Gota:libary:1.4.1'
}

使用

添加好库之后,创建一个对象,传入权限数组,注册回调函数。

new Gota.Builder(this)
                .withPermissions(Manifest.permission.CAMERA,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.CALL_PHONE)
                .requestId(1)
                .setListener(this)
                .check();

OnRequestPermissionsBack

@Override
public void onRequestBack(int requestId, @NonNull GotaResponse gotaResponse) {
    if(gotaResponse.isGranted(Manifest.permission.CAMERA)) {
         // Your Code
    }
}

OpenSSl

是一个安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及SSL协议,并提供丰富的应用程序供测试或其它目的使用。

zxing

条形码、二维码识别库

butterknife

使用

class ExampleActivity extends Activity {
  @BindView(R.id.user) EditText username;
  @BindView(R.id.pass) EditText password;

  @BindString(R.string.login_error) String loginErrorMessage;

  @OnClick(R.id.submit) void submit() {
    // TODO call server...
  }

  @Override public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.simple_activity);
    ButterKnife.bind(this);
    // TODO Use fields...
  }
}

KotterKnife

ButterKnife 的kotlin版本。

ImmersionBar

安卓沉浸式任务栏的封装。

安装

AndroidStudio

compile 'com.gyf.barlibrary:barlibrary:2.3.0'

eclipse

barlibrary-2.3.0.jar

使用

基本用法

ImmersionBar.with(this).init();

高级用法

ImmersionBar.with(this)
             .transparentStatusBar()  //透明状态栏,不写默认透明色
             .transparentNavigationBar()  //透明导航栏,不写默认黑色(设置此方法,fullScreen()方法自动为true)
             .transparentBar()          
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值