We all know that we can set text on the android.widget.Button. But we can add images to the android.widget.Button also. We can even specify the location of the image relative to the text on the button, such as on top, bottom, left, and right to the text. This article will show you an example of …
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 …
When you want to use an image as a view object background, for example, you need to use a bubble chat image as a chat app text message background, you can find that the text message may stretch the background image unwanted as below.
android.widget.GridView is used to display multiple view components on the screen by row and column distribution. It is a subclass of AbsListView. GridView also needs Adapter to provide display data, including SimpleAdapter or BaseAdapter, and the usage is very similar to ListView.
The android.graphics.drawable.LayerDrawable is a drawable object that manages arrays of other drawable objects in the desired order. Each drawable object in the layer list is drawn in the order of the list, and the last drawable object in the list is drawn at the top.
android.graphics.Matrix is the class that be used to process images in android. This article will show you examples of how to use android.graphics.Matrix to rotate, scale, skew and translate bitmap images in android.
android.widget.ImageView is android image manipulation class. It can be used to load images, show images, and edit images. This article will introduce this class to you and show you an example to demonstrate it’s functions.