Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save esabook/684e912fef60e3a8d88099d571c8b4b0 to your computer and use it in GitHub Desktop.
Save esabook/684e912fef60e3a8d88099d571c8b4b0 to your computer and use it in GitHub Desktop.
flexbox in ConstrainLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<androidx.constraintlayout.helper.widget.Flow
android:layout_width="match_parent"
android:layout_height="@dimen/padding_20"
app:constraint_referenced_ids="tv_req_verification_title, tv_send_req_verification"
app:flow_wrapMode="aligned"
app:flow_horizontalStyle="packed"
tools:ignore="MissingConstraints" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_req_verification_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/send_confirmation_note_4"
android:textColor="@color/grey"
android:textSize="14sp"
tools:ignore="MissingConstraints" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_send_req_verification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="@dimen/padding_5"
android:text="@string/send_confirmation_note_5"
android:textColor="@color/frog_green"
android:textSize="14sp"
android:textStyle="bold"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment