I have two closely-related questions.
In values\dimens.xml
I have:
<dimen name ="small_flag_height"> 72sp </dimen>
In code I have:
/* a */ int resId = R.dimen.small_flag_height;
At one point today, the assignment statement above was displayed like this:
int resId = 72sp;
When I hovered over 72sp
, R.dimen.small_flag_height
was shown in a popup message;
when I clicked 72sp
, the statement was changed to that shown above at /* a */
.
(a) How do I get AS to show that value again? (I have no idea how I got it to show the value in the first place.)
EDIT If I close the file and reopen it, 72sp
is again displayed. How else can I do this?
The statement below merely shows the assigned int
value for R.dimen.small_flag_height
, which happens to be 2131099648
:
Log.w("resId","" + resId);
(b) What do I have to do to obtain the value (72sp
) assigned to small_flag_height
? (I don't want to display it, I want to use it in a computation.)