Layout size percent

Hi,how to set layout.setWidth() a percentage?

Hi

no way for now, calculate manually only