adapt different size devices,change UI layout and view from xml to code.