Source:
public View getView(Context context) { super.getView(context); userBrickContentLayout = view.findViewById(R.id.brick_user_brick); scrollbar = view.findViewById(R.id.user_brick_scrollbar); boolean isAddInputFragment = currentFragmentIsAddInput(context); boolean isAddLabelFragment = currentFragmentIsAddLabel(context); if (userBrickDataList.isEmpty()) { if (isAddInputFragment) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_input_name), getInputList()); addTextViewForInput(context, new StringOption(defaultText)); } if (isAddLabelFragment) { String defaultText = context.getResources().getString(R.string.brick_user_defined_default_label); addTextViewForLabel(context, new StringOption(defaultText)); } } else { for (UserBrickData userBrickData : userBrickDataList) { if (userBrickData instanceof UserBrickInput) { addTextViewForInput(context, ((UserBrickInput) userBrickData).getInput()); } if (userBrickData instanceof UserBrickLabel) { addTextViewForLabel(context, ((UserBrickLabel) userBrickData).getLabel()); } } if (isAddInputFragment) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_input_name), getInputList()); addTextViewForInput(context, new StringOption(defaultText)); } if (isAddLabelFragment && !lastContentIsLabel()) { String defaultText = context.getResources().getString(R.string.brick_user_defined_default_label); addTextViewForInput(context, new StringOption(defaultText)); } } scrollbar.post(this::scrollToBottom); return view; }

Target:
public View getView(Context context) { super.getView(context); userBrickContentLayout = view.findViewById(R.id.brick_user_brick); scrollbar = view.findViewById(R.id.user_brick_scrollbar); boolean isAddInputFragment = currentFragmentIsAddInput(context); boolean isAddLabelFragment = currentFragmentIsAddLabel(context); if (userBrickDataList.isEmpty()) { if (isAddInputFragment) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_input_name), getUserDataList(INPUT)); addTextViewForUserData(context, new StringOption(defaultText), INPUT); } if (isAddLabelFragment) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_label), getUserDataList(LABEL)); addTextViewForUserData(context, new StringOption(defaultText), LABEL); } } else { for (UserBrickData userBrickData : userBrickDataList) { if (userBrickData instanceof UserBrickInput) { addTextViewForUserData(context, ((UserBrickInput) userBrickData).getInput(), INPUT); } if (userBrickData instanceof UserBrickLabel) { addTextViewForUserData(context, ((UserBrickLabel) userBrickData).getLabel(), LABEL); } } if (isAddInputFragment) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_input_name), getUserDataList(INPUT)); addTextViewForUserData(context, new StringOption(defaultText), INPUT); } if (isAddLabelFragment && !lastContentIsLabel()) { String defaultText = new UniqueNameProvider().getUniqueNameInNameables(context.getResources().getString(R.string.brick_user_defined_default_label), getUserDataList(LABEL)); addTextViewForUserData(context, new StringOption(defaultText), LABEL); } } scrollbar.post(this::scrollToBottom); return view; }