How to move buttons text when state is pressed

后端 未结 5 795
挽巷
挽巷 2021-01-01 16:19

I made a custom background for a button and also for different button states. But now I made to a point that I cannot understand.

When button is in normal state the

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-01 16:50

    this might just work:

    setPadding(left, top, right, bottom); // Normal
    setPadding(left, top + x, right, bottom - x); // Pressed
    

提交回复
热议问题