I am trying to use an two views inside a constraintlayout.But as soon as margin is assigned there is undefined behaviour on child views.Any help will be appreciated.
Here is my code:
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/ic_action_google_play"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txtNew"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="TextHere"
android:textSize="24sp"
app:layout_constraintLeft_toRightOf="@+id/img"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>