private void recreateViews(final String viewPattern) {
        this.grid.removeAllViews();
        this.grid.setColumnCount(viewPattern.length() + 1);
        this.grid.setRowCount(2);
        for (int row = 0; row < 2; row++) {
            final Button hem = ViewUtils.createButton(getContext(), this, TextParam.text("N"));
            hem.setOnClickListener(v -> changeHemisphereButtonValue(hem));
            final GridLayout.LayoutParams hlp = createGridLayoutParams(0);
            hlp.setMargins(0, 0, ViewUtils.dpToPixel(3), 0);
            this.grid.addView(hem, hlp);

            for (char c : viewPattern.toCharArray()) {
                if (c == '_' || c == '0' || c == '1') {
                    final View v;
                    if ((c == '0' && row == 1) || (c == '1' && row == 0)) {
                        //add a space
                        v = new Space(getContext());
                    } else {
                        v = new CharButton(getContext());
                        ((CharButton) v).setText("x");
                    }
                    final GridLayout.LayoutParams lp = createGridLayoutParams(1);
                    lp.setMargins(ViewUtils.dpToPixel(1), ViewUtils.dpToPixel(2), ViewUtils.dpToPixel(1), ViewUtils.dpToPixel(2));
                    this.grid.addView(v, lp);
                } else {
                    final TextView tv = ViewUtils.createTextItem(getContext(), R.style.text_label, TextParam.text("" + c));
                    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);

                    final GridLayout.LayoutParams lp = createGridLayoutParams(0);
                    lp.setMargins(ViewUtils.dpToPixel(1), ViewUtils.dpToPixel(2), ViewUtils.dpToPixel(1), ViewUtils.dpToPixel(2));
                    tv.setGravity(c == '.' ? Gravity.CENTER : Gravity.TOP);
                    this.grid.addView(tv, lp);
                }
            }
        }
    }
returns true if latPatternn/lonPattern could be applied, false otherwise
main/src/main/java/cgeo/geocaching/ui/CalculatedCoordinateInputGuideView.java