org.robolectric.annotation.TextLayoutMode Java Examples

The following examples show how to use org.robolectric.annotation.TextLayoutMode. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: TextLayoutBuilder   Author: facebook   File:    License: Apache License 2.0 5 votes vote down vote up
public void testSetTextLineHeight() {
  final float lineHeight = 15f;
  mLayout = mBuilder.setLineHeight(lineHeight).build();
  assertEquals(mBuilder.getLineHeight(), 15f, 0.0f);
  assertEquals(mLayout.getSpacingMultiplier(), 1.0f, 0.0f);
      mLayout.getSpacingAdd(), lineHeight - mLayout.getPaint().getFontMetrics(null), 0.0f);