1 Star 0 Fork 0

九离天 / Android-Lock9View

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.93 KB
一键复制 编辑 原始数据 按行查看 历史
TakWolf 提交于 2015-06-15 18:55 . readme

Android-Lock9View Download API

An Android grid lock screen view with a callback interface.

ScreenShot

Screenshot

Demo

Google Play Store

Usage

Gradle

compile 'com.takwolf.android:lock9view:0.0.6'

Layout

<com.takwolf.android.lock9.Lock9View
    android:id="@+id/lock_9_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    app:lock9_nodeSrc="@drawable/lock_9_view_node_normal"
    app:lock9_nodeOnSrc="@drawable/lock_9_view_node_highlighted"
    app:lock9_lineColor="#ff006699"
    app:lock9_lineWidth="8dp"
    app:lock9_padding="32dp"
    app:lock9_spacing="32dp" />

Explain

Explain

Attention!!!

If you want to update library reference from version 0.0.4 or earlier, you should add attributes "lock9_padding" and "lock9_spacing" in your layout to adjust node size(default is 0dp) otherwise the node size will be changed.

Attention!!!

If you want to update library reference from version 0.0.3 or earlier, you should add a prefix "lock9_" to the Lock9View attributes in your layout, like :

nodeSrc -> lock9_nodeSrc

This way to solve the resources error if another library has defined the same attributes like :

"Attribute "xxx" has already been defined"

Thanks for @IGZpablocanamares.

Activity

Lock9View lock9View = (Lock9View) findViewById(R.id.lock_9_view);
lock9View.setCallBack(new CallBack() {

    @Override
    public void onFinish(String password) {
        Toast.makeText(MainActivity.this, password, Toast.LENGTH_SHORT).show();
    }

});

What's next

Maybe add an error status.

Author

TakWolf

takwolf@foxmail.com

http://takwolf.com

License

Copyright 2015-2016 TakWolf

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1
https://gitee.com/CrossRun/Android-Lock9View.git
git@gitee.com:CrossRun/Android-Lock9View.git
CrossRun
Android-Lock9View
Android-Lock9View
master

搜索帮助