You can customize the look and feel of Lock.Android UI. Along with various items such as the header logo and title, you can alter some colors, buttons, and other items to fit the theme of your application.
First, create a new Theme that extends from Lock.Theme, and override the attributes you want to customize. Those attributes not overridden will default to the ones defined in Lock.Theme.
To start using the new theme, set up the Activity in the AndroidManifest.xml file with the android:theme attribute. Depending on if you are using Classic Lock or Lock, the activity declaration to update will differ. Because the Lock library declares these activities internally, you need to re-declare them with the special tools:replace attribute that will override the library’s declaration only for the theme attribute.
Please note that if you define your own Theme in a style resource file and forget to specify that the Theme’s parent is Lock.Theme, or you forget to tell the Manifest which will be the Theme for the Activity, you will end up with a really bad looking UI. This may also happen if the values you specify in your custom Theme are invalid.
To customize the style of a third-party connection, you must create a new connection by using the Custom Social Connectionsextension, filling in every required field before saving the changes.To customize the style of a third-party identity provider connection in Lock, call the builder and pass both the connectionName and the style to use.First, create a custom style that extends Lock.Theme.AuthStyle. Define the logo, background color, and name of the connection using names of the keys similar to the example below.
In the builder’s setup, add the AuthStyle for the connection name that you want to override.builder.withAuthStyle("facebook", R.style.Style_Facebook) .build(...);When Lock needs to display that connection in a SocialButton, it will first search for user-overridden styles. If none is found, it will default to the default Lock style. Following the example above, this means that for facebook it would use the Facebook background color, Facebook logo and “FACEBOOK" as name.