Computer scienceMobileAndroidUser InterfaceUI componentsContainers

LinearLayout in Action

Weight Sum

Report a typo

How much space, in percent, will the view inside this LinearLayout occupy?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    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"
    android:orientation="horizontal"
    android:weightSum="20">

    <View
        android:layout_width="0dp"
        android:layout_height="16dp"
        android:layout_weight="11" />

</LinearLayout>
Enter a number
___

Create a free account to access the full topic