2

I created a custom view and set the background to a XML drawable shape. The goal is when the user clicks on the view it increases in size, however setBounds(0, 0, width * 2, height * 2) increases the size, but cuts off some of the new view and it remains the same size. I have tried using fill parent, and also using a specific width and height and it didn't work.

<package.ItemView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_row="0"
    android:layout_column="0"
    android:layout_margin="0dp"
    android:background="@drawable/rounded_rect"
    android:layout_marginBottom="30dp"
    custom:text="yes"
    custom:sound="yes"
    custom:imagePath="@drawable/yes"
    custom:backgroundColor="#a0d80e"
    />
Neha Shukla
  • 3,572
  • 5
  • 38
  • 69
Derek Dawson
  • 502
  • 5
  • 14

0 Answers0