dynamically change the layout when toggling between
decimal and fraction.