How can I implement from xml file layout inside the App using Android studio? -
i'm beginner in android. want implement graphic layout android app:
how can generate xml
implement layout on picture in android?
below desired layout
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:weightsum="3" android:layout_height="match_parent"> <linearlayout android:layout_width="match_parent" android:layout_weight="1" android:background="#c3c3c3" android:layout_height="0dp"> <imageview android:background="@color/black_color" android:layout_width="match_parent" android:src="@drawable/ic_launcher" android:layout_height="match_parent" /> </linearlayout> <scrollview android:layout_width="match_parent" android:layout_weight="2" android:background="#ffc90e" android:layout_height="0dp"> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent"> <textview android:layout_width="match_parent" android:textsize="20sp" android:text="this text view scrollable" android:layout_height="match_parent" /> </linearlayout> </scrollview> </linearlayout>
the total weight sum of parent linearlayout 3 , 1 assigned linear layout contain imageview , 2 scroll view can change height of these 2 views changing values of 1 , 2 sum should not increase more 3
Comments
Post a Comment