Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid LinearLayout Inside Another Linearlayout
    primarykey
    data
    text
    <p>I've got two linearlayouts with rounded corners as shown by the code below;</p> <p>What Im trying to achieve is a linearlayout inside a linearlayout but where the outer layout margin on top forces a gap so that I can input text. Inside it looks like the inner layout has a dark border.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/loginbackground" &gt; &lt;LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginBottom="62dp" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="5dip" android:background="@drawable/rounded_rectangle_dark" android:orientation="vertical" &gt; &lt;!-- TextView goes here --&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dip" android:background="@drawable/rounded_rectangle_white" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;ImageView android:id="@+id/imageView2" android:layout_width="30dp" android:layout_height="30dp" android:layout_gravity="center" android:scaleType="fitCenter" android:src="@drawable/icon_contact" /&gt; &lt;EditText android:id="@+id/login_username_edittext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="15dp" android:layout_weight="1" android:hint="@string/login_username_hint" android:inputType="textEmailAddress" android:text="pandulce@email.com" &gt; &lt;!-- &lt;requestFocus /&gt;--&gt; &lt;/EditText&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;!-- End of Inner Layout --&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="40dp" android:layout_marginRight="40dp" android:layout_marginTop="10dp" android:orientation="vertical" &gt; &lt;Button android:id="@+id/login_btn" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/red_button" android:textStyle="bold" android:textSize="25sp" android:text="@string/login_login_btn" android:textColor="@color/solid_white" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Here is the color style;</p> <pre><code> &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt; &lt;solid android:color="#ffffff"/&gt; &lt;stroke android:width="1dp" android:color="#2B3856"/&gt; &lt;corners android:radius="20dp"/&gt; &lt;/shape&gt; </code></pre> <p>Any help is appreciated.</p>
    singulars
    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.
    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