Я пытаюсь добавить представления с кодом Java в моем приложении для Android, но даже простой тест Textviews не покажет
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ConstraintLayout layout = findViewById(R.id.form1);
TextView mazzo = new TextView(this);
mazzo.setId(View.generateViewId());
mazzo.setText(m_Text);
mazzo.setLayoutParams(new ConstraintLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
layout.addView(mazzo);
ConstraintSet set = new ConstraintSet();
set.clone(layout);
set.connect(mazzo.getId(), ConstraintSet.TOP, layout.getId(), ConstraintSet.TOP, 18);
set.connect(mazzo.getId(), ConstraintSet.LEFT, layout.getId(), ConstraintSet.LEFT, 18);
set.applyTo(layout);