In this tutorial we are creating image button with border with custom XML layout file. So here is the complete step by step tutorial for Set/Add border around ImageButton image in android. Note: Download image button image from below and put inside drawable-hdpi folder. In this video we will learn how to create a custom button that uses image files to replace the background of the default Android button. For this we will create a StateListDrawable xml file, where we define appropriate png files from the drawable folder for the different button state combinations of statepressed and stateenabled.
Customizing the automatically rendered sign-in button (recommended)
To create a Google Sign-In button with custom settings, addan element to contain the sign-in button to your sign-in page, write a functionthat callssignin2.render()with your style and scope settings,and include the https://apis.google.com/js/platform.js scriptwith the query string onload=YOUR_RENDER_FUNCTION.
The following is an example of a Google Sign-In button that specifiescustom style parameters:
The following HTML, JavaScript, and CSS code produces the button above:
You can also specify settings for a custom Google Sign-In button by definingdata- attributes to a div element with the class g-signin2. For example:
Building a button with a custom graphic
You can build a Google Sign-In button to fit your site's design.You must follow the branding guidelines and usethe appropriate colors and icons in your button. The branding guidelines alsoprovide icon assets that you can use to design your button. You must alsoensure that your button is as prominent as other third-party login options.
The following is an example of a Google Sign-In button built with a customgraphic:
Android Custom Button Image And Text
The following HTML, JavaScript, and CSS code produces the button above: