optimize layout and add activity management activity and layout