@Test public void testUIInitWithDifferentConstructor() { mGuidanceNextManeuverView = new GuidanceNextManeuverView(getApplicationContext(), null, 0, 0); final TextView distanceView = mGuidanceNextManeuverView.findViewById(R.id.nextManeuverDistance); final TextView streetName = mGuidanceNextManeuverView.findViewById(R.id.afterNextManeuverStreetName); assertEquals(View.GONE, mGuidanceNextManeuverView.getVisibility()); GuidanceNextManeuverData data = createData(mIconId, mDistance, mStreetName); mGuidanceNextManeuverView.setNextManeuverData(data); assertEquals(mGuidanceNextManeuverView.getVisibility(), View.VISIBLE); assertThat(distanceView.getText(), is(equalTo(mDistance + " m"))); assertThat(streetName.getText(), is(equalTo(mStreetName))); }
public void setNextManeuverData(@Nullable GuidanceNextManeuverData data) { mNextManeuverData = data; populate(data); }
GuidanceNextManeuverView extends BaseView { public void setNextManeuverData(@Nullable GuidanceNextManeuverData data) { mNextManeuverData = data; populate(data); } }
GuidanceNextManeuverView extends BaseView { public void setNextManeuverData(@Nullable GuidanceNextManeuverData data) { mNextManeuverData = data; populate(data); } GuidanceNextManeuverView(Context context);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); }
GuidanceNextManeuverView extends BaseView { public void setNextManeuverData(@Nullable GuidanceNextManeuverData data) { mNextManeuverData = data; populate(data); } GuidanceNextManeuverView(Context context);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); @Nullable GuidanceNextManeuverData getNextManeuverData(); void setNextManeuverData(@Nullable GuidanceNextManeuverData data); @Override void onRestoreInstanceState(Parcelable state); }
GuidanceNextManeuverView extends BaseView { public void setNextManeuverData(@Nullable GuidanceNextManeuverData data) { mNextManeuverData = data; populate(data); } GuidanceNextManeuverView(Context context);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs);  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  GuidanceNextManeuverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes); @Nullable GuidanceNextManeuverData getNextManeuverData(); void setNextManeuverData(@Nullable GuidanceNextManeuverData data); @Override void onRestoreInstanceState(Parcelable state);  }