I need to check if the text size on a button have the size 37sp.
I found a method to get the size with: .getTextSize()
, but the size with I receive is: 126.0
, and not 48sp
.
The code off button:
<Button
android:id="@+id/buttoneql"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="="
android:textColor="@android:color/black"
android:textSize="48sp" />
The test:
buttoneql = (Button) currentActivity.findViewById(R.id.buttoneql);
assertEquals( 48.0f, buttoneql.getTextSize() );
How I should do to recive the ral value of the text size?