Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to split the screen dynamically in android without xml
    primarykey
    data
    text
    <p>I have tried to split the screen using xml..here is the code Please try this xml..I need the same layout programatically.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="318dp" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" android:background="@android:color/holo_purple"&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="318dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="horizontal" android:background="@android:color/holo_purple"&gt; &lt;/LinearLayout&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="318dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="horizontal" android:background="@android:color/holo_blue_dark"&gt; &lt;/LinearLayout&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="318dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="horizontal" android:background="@android:color/darker_gray"&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>But, I need to do programatically to split the screen. Can anyone provide me the solution?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload