Skip to content

Instantly share code, notes, and snippets.

@adavis
Created October 12, 2012 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adavis/3880189 to your computer and use it in GitHub Desktop.
Save adavis/3880189 to your computer and use it in GitHub Desktop.
Search Layout XML
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape android:shape="rectangle">
<solid android:color="@color/light_blue"/>
</shape>
</item>
<item android:bottom="2dp" android:top="2dp" android:left="2dp" android:right="2dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/black"/>
</shape>
</item>
</layer-list>
<RelativeLayout
android:id="@+id/searchTextLayout"
android:layout_width="match_parent"
android:layout_height="50dip"
android:orientation="horizontal"
android:layout_marginBottom="20dip"
android:layout_marginTop="40dip"
android:layout_marginLeft="30dip"
android:layout_marginRight="30dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<ImageButton
android:id="@+id/searchTextButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/light_blue"
android:scaleType="fitCenter"
android:layout_alignParentLeft="true"
android:src="@drawable/search_page_search_icon"
android:contentDescription="@string/picture"
/>
<EditText
android:id="@+id/searchText"
android:layout_toRightOf="@id/searchTextButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
android:textColor="@android:color/white"
android:background="@drawable/background_black_border_full" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment