Add event listener to preference elements without using inflater service