adding constructor which uses the activity to get the root layout
formatting