The below code gives Resources$NotFoundException
TypedValue value = new TypedValue();
((Activity)context).getResources().getValue(android.R.attr
Femi's answer was very helpful. Without wanting to detract from his answer, I've taken the logic and placed it in a library convenience method that you should be able to plug-and-play. I plan on updating the code with other attribute methods over time. I hope it proves useful to someone.
(Note that I discovered Resources.getDisplayMetrics()
seems to be an easier way to return display metrics rather than querying the WindowManager.)