Я пытаюсь накачать представление внутри макета ограничения, но не могу определить правильный синтаксис для представления, которое будет поверх другого представления:
VideoView videoView = new VideoView(this);
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT);
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
params.leftToLeft = ConstraintLayout.LayoutParams.PARENT_ID;
params.rightToRight = ConstraintLayout.LayoutParams.PARENT_ID;
params.bottomToTop = // unsure what the correct syntax for this is;
mParentLayout.addView(videoView, params);
Я хочу сделать это выше зеленой линии mGuideline
<androidx.constraintlayout.widget.Guideline
android:id="@+id/challengeroom_gl_hori_50"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.5"/>
Родительский макет:
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/challengeroom_cl_parent_layout">