Skip to content

Instantly share code, notes, and snippets.

@RamiJ3mli
Created August 20, 2018 23:38
Show Gist options
  • Save RamiJ3mli/2c816b5bddfb5a1cbc5c885b44436cb0 to your computer and use it in GitHub Desktop.
Save RamiJ3mli/2c816b5bddfb5a1cbc5c885b44436cb0 to your computer and use it in GitHub Desktop.
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/widget"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent=".4" />
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment