Exemplo n.º 1
0
 @Override
 @SimpleProperty()
 public void Height(int height) {
   if (height == LENGTH_PREFERRED) {
     height = LENGTH_FILL_PARENT;
   }
   super.Height(height);
 }
Exemplo n.º 2
0
 // Components don't normally override Width and Height, but we do it here so
 // that
 // the automatic width and height will be fill parent.
 @Override
 @SimpleProperty()
 public void Width(int width) {
   if (width == LENGTH_PREFERRED) {
     width = LENGTH_FILL_PARENT;
   }
   super.Width(width);
 }