Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android studio proportional width

<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 :: java File Separator 
Java :: java format use same value multiple times 
Java :: Get the last Friday of a month in Java 
Java :: range in java 
Java :: java max int value 
Java :: java random number between 2 values inclusive 
Java :: change image on button click android studio 
Java :: array contains java 
Java :: convert int to ascii java 
Java :: Java make numbers 
Java :: how to convert string array to int in java 
Java :: how to solve Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 
Java :: java syntax for object creation 
Java :: Java Queue Array Implementation 
Java :: check if string is uuid 
Java :: method returns arraylist java 
Java :: sum of a list using for loop in dart 
Java :: operador ternario java 
Java :: how to convert char to uppercase java 
Java :: Right triangle star pattern in java 
Java :: collatz conjecture 
Java :: java quick sort 
Java :: java count to 10 
Java :: string to stream java 
Java :: primitive data types in java 
Java :: android:windowLightStatusBar programmatically 
Java :: wrapper classes in java 
Java :: car class java 
Java :: parameterized constructor 
Java :: spring db properties 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =