title: Advanced Custom Widget
body: <p>I googled a lot and spent many hours trying to figure out how to create custom Android UI widgets (in code and xml). But there are some limitations I don't know how to bypass. Therefore I mocked up an imaginary button and would like to know how to implement it.</p>
  
  <p>This would help me a lot and I'm sure that I'm not the only one that has problems creating custom Android widgets.</p>
  
  <p><img src="https://i.stack.imgur.com/87nzb.png" alt="enter image description here"></p>