bungleofsketches
bungleofsketches

Reputation: 554

Trying to put several textviews in a Button

I think I might be doing something stupid but I cannot find the answer. Obviously ht ebelow thing doesn't work but how would I do it?

<Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="+@id/date"
                android:text="+@id/heading"
                android:text="+@id/subheading"

                android:drawableLeft="+@id/featuredimage"
            />

I'm basically making an articlebutton to represent an article for a blog. I tried putting textviews inside but it miscounted the ending tags and threw an error.

What is that best way to create one of these buttons?

Upvotes: 1

Views: 1537

Answers (1)

Saurabh Verma
Saurabh Verma

Reputation: 6728

Dont use Button.

Use a Linear/Relative layout, with the attribute:

android:clickable="true"

Inside this layout add all your TextViews or any other thing you want.

Upvotes: 5

Related Questions