@Test public void testUIInitWithNullForFieldVisibility() { final TextView distanceView = mGuidanceNextManeuverView.findViewById(R.id.nextManeuverDistance); final TextView streetName = mGuidanceNextManeuverView.findViewById(R.id.afterNextManeuverStreetName); final TextView dotView = mGuidanceNextManeuverView.findViewById(R.id.dot); assertEquals(View.GONE, mGuidanceNextManeuverView.getVisibility()); GuidanceNextManeuverData data = createData(null, null, null); mGuidanceNextManeuverView.setNextManeuverData(data); assertEquals(mGuidanceNextManeuverView.getVisibility(), View.VISIBLE); assertEquals(View.GONE, distanceView.getVisibility()); assertEquals(View.GONE, streetName.getVisibility()); assertEquals(View.GONE, dotView.getVisibility()); }
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);  }