Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android studio constraint layout proportional height

<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">

    <ImageView
        android:id="@+id/img_icon"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@color/dark_red"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.5" />

</android.support.constraint.ConstraintLayout>
Comment

PREVIOUS NEXT
Code Example
Java :: if number is negative java 
Java :: upload byte array to oss 
Java :: java create list integer range 
Java :: How to iterate hashmap entries in java 
Java :: java map to list or array 
Java :: java text file to arraylist 
Java :: android dismiss keyboard 
Java :: java split string by length 
Java :: odd number in java 
Java :: java how to make a number 
Java :: java printf trailing whitespace 
Java :: get timezone offset java 
Java :: input array in String in java 
Java :: core java tutorial 
Java :: awk print second 
Java :: How to print in console java 
Java :: concat result of List to one text java 
Java :: load file as string java 
Java :: java secretkey 
Java :: Printing array list through for loop in java 
Java :: java loop through list 
Java :: java replace first occurrence of substring 
Java :: android ask if system is in dark mode 
Java :: android application class 
Java :: get minimum of array java 
Java :: spring swagger 
Java :: how to run individual test in java maven 
Java :: java run code at interval 
Java :: java char array to string 
Java :: java swing menu click event 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =