android studio proportional width

Solutions on MaxInterview for android studio proportional width by the best coders in the world

showing results for - "android studio proportional width"
Luis
03 Mar 2016
1<android.support.constraint.ConstraintLayout
2    xmlns:android="http://schemas.android.com/apk/res/android"
3    xmlns:app="http://schemas.android.com/apk/res-auto"
4    android:layout_width="match_parent"
5    android:layout_height="match_parent">
6
7    <ImageView
8        android:id="@+id/img_icon"
9        android:layout_width="0dp"
10        android:layout_height="0dp"
11        android:background="@color/dark_red"
12        app:layout_constraintBottom_toBottomOf="parent"
13        app:layout_constraintDimensionRatio="1:1"
14        app:layout_constraintEnd_toEndOf="parent"
15        app:layout_constraintStart_toStartOf="parent"
16        app:layout_constraintTop_toTopOf="parent"
17        app:layout_constraintWidth_percent="0.5" />
18
19</android.support.constraint.ConstraintLayout>