在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):shem8/MaterialLogin开源软件地址(OpenSource Url):https://github.com/shem8/MaterialLogin开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):MaterialLoginA material-designed login (and register) view DownloadGrab via Gradle: compile 'com.github.shem8:material-login:2.2.0' or Maven: <dependency>
<groupId>com.github.shem8</groupId>
<artifactId>material-login</artifactId>
<version>2.2.0</version>
</dependency> You should also add CircularReveal lib for 2.3 support- first add remote maven url repositories {
maven {
url "https://jitpack.io"
}
} then add a library dependency dependencies {
compile ('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
} UsageAdd the LoginView to your layout <?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<shem.com.materiallogin.MaterialLoginView
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout> Then set your final MaterialLoginView login = (MaterialLoginView) findViewById(R.id.login);
((DefaultLoginView)login.getLoginView()).setListener(new DefaultLoginView.DefaultLoginViewListener() {
@Override
public void onLogin(TextInputLayout loginUser, TextInputLayout loginPass) {
//Handle login
}
});
((DefaultRegisterView)login.getRegisterView()).setListener(new DefaultRegisterView.DefaultRegisterViewListener() {
@Override
public void onRegister(TextInputLayout registerUser, TextInputLayout registerPass, TextInputLayout registerPassRep) {
//Handle register
}
}); You can also fork the project and see the example app. CustomizeYou can change the view colors by override it in you colors.xml: <color name="material_login_login_color">#000000</color>
<color name="material_login_register_color">#00ff37</color>
<color name="material_login_login_error_color">#ffbebe</color>
<color name="material_login_register_error_color">#600002</color> You can also customize the view by setting views attributes: For the MaterialLoginView:
For the DefaultLoginView:
For the DefaultRegisterView:
ThanksI first saw this design by the great Boris Borisov and thought it will be nice to make it available on Android apps. Contact MePull requests are more than welcome, I'm planning to add lots of options to customize the view, and hope to do this soon. You can also contact me by mail: [email protected] License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论