I want to add text under a image button, which are also clickable, and will be redirected to the same activity as the image button. basically it’s like the app list in any android phone, e.g.
I want to add text under a image button, which are also clickable, and
Share
If you have your
ImageButtondeclared in XML, then just put it into aLinearLayoutwhich also contains aTextViewand set theonClickListeneron theLinearLayout. The structure would be likeAnd then in your java:
If you’re adding each
ImageButtondynamically via java code, then it will still maintain the same structure. Let me know if I need to add anything.