We all know that you can set text on android.widget.Button. But you can add image in it also. You can even specify the location of the image relative to the text, such as at top, bottom, left and right to the text. This article will show you an example about how to add image and …
android.widget.ImageButton is used to create a button with image in android app. It is similar with android Button object. You can also set an onClickListener to it to process button click event. But ImageButton do not has text property, if you want to display both text and image in a button, you need to use …
This example will show you how to use android.widget.TableLayout and android.widget.Button to implement an android calculator application. It is a regular calculator which can execute +, -, * and / operation.
android.widget.Button is a frequently used widget in android application. You can add as many buttons as you need in a layout view object. But how to listen and response the click event when user click the buttons? This example will tell you how.
This article will show you two examples. One is a Tab example which implemented by android selector and layer-list drawable object. The other is a shadow button implemented by layer-list.
This example will show you how to use android selector drawable to make a button to show different background color in different button states(disable, pressed, unpressed).