# Android Tips: Making a Custom Button out of Anything

DevFeed: [Android Tips: Making a Custom Button out of Anything](<https://devfeed.tech/articles/android-tips-making-a-custom-button-out-of-anything-30550.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2013/03/android-tips-making-a-custom-button-out-of-anything/>)

Published: 2013-03-19T07:00:00Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Large Screen](<https://devfeed.tech/topics/large-screen.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [layout](<https://devfeed.tech/tags/layout.md>), [textview](<https://devfeed.tech/tags/textview.md>)

## AI overview

This Android tutorial explains how to create custom buttons with both images and text without relying on complex layouts or invisible overlays. It describes using a LinearLayout with clickable behavior and button-state backgrounds as an alternative to the standard Button and ImageButton classes.

## Source excerpt

The Android APIs are filled with things that don't quite seem right. I've always been annoyed by the lack of relationship between interface elements. For instance, isn't a ListView really just a special case of a GridView with only one column? Yet GridView and ListView aren't directly related, so we get oddities where I can add header and footer views to a ListView, but not a GridView. One thing that seems to trip people up is the Button class. Android has a Button class for text (and images if your not really concerned with formatting them) and an ImageButton class for images. Like the ListView/GridView situation mentioned earlier, these two buttons are not, in fact, related. Button inherits from TextView and ImageButton inherits from ImageView.