@Test public void testIconEndMargin() { mGuidanceNextManeuverView.setIconEndMargin(10); final ImageView iconView = mGuidanceNextManeuverView.findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); assertThat(layoutParams.getMarginEnd(), equalTo(10)); }
void setIconEndMargin(final int margin) { final ImageView iconView = findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); layoutParams.setMarginEnd(margin); }
GuidanceNextManeuverView extends BaseView { void setIconEndMargin(final int margin) { final ImageView iconView = findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); layoutParams.setMarginEnd(margin); } }
GuidanceNextManeuverView extends BaseView { void setIconEndMargin(final int margin) { final ImageView iconView = findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); layoutParams.setMarginEnd(margin); } 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 { void setIconEndMargin(final int margin) { final ImageView iconView = findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); layoutParams.setMarginEnd(margin); } 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 { void setIconEndMargin(final int margin) { final ImageView iconView = findViewById(R.id.nextManeuverIconView); final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) iconView.getLayoutParams(); layoutParams.setMarginEnd(margin); } 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);  }