Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 2.98 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android, displaying a transparent listview over the bottom half of current activity
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.     android:orientation="horizontal" android:layout_width="fill_parent"
  4.     android:layout_gravity="center" android:layout_height="fill_parent">
  5.     <EditText android:id="@+id/actxt_1" android:hint="Please fill"
  6.         android:layout_width="fill_parent" android:layout_height="fill_parent"
  7.         android:layout_gravity="center_vertical|left" android:layout_weight="2.0" />
  8.     <ImageButton android:id="@+id/btn1"
  9.         android:src="@android:drawable/ic_menu_mylocation"
  10.         android:layout_height="50dp" android:layout_width="50dp"
  11.         android:layout_gravity="center_vertical|right" />
  12. </LinearLayout>
  13. <ListView android:id="@+id/list1" android:layout_width="fill_parent"
  14.     android:layout_height="wrap_content" android:layout_weight="1.0"/>
  15. <TextView android:layout_width="fill_parent" android:id="@+id/usr_msg"
  16.     android:layout_height="wrap_content" android:background="@color/solid_yellow"
  17.     android:text="Select please" />
  18.        
  19. <?xml version="1.0" encoding="utf-8"?>
  20. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  21.     android:orientation="vertical" android:layout_width="fill_parent"
  22.     android:layout_height="fill_parent" android:weightSum="4">
  23.     <LinearLayout android:id="@+id/linearLayout1"
  24.         android:layout_width="fill_parent" android:layout_height="wrap_content"
  25.         android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
  26.         android:layout_marginTop="20dp" android:layout_marginBottom="5dp"
  27.         android:background="@drawable/databg" android:layout_weight="1">
  28.         <RelativeLayout android:id="@+id/relativeLayout1"
  29.             android:gravity="center_horizontal" android:layout_centerVertical="true"
  30.             android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
  31.             android:layout_width="fill_parent" android:layout_height="180dp"
  32.             android:layout_marginTop="10dp" android:layout_marginBottom="10dp">
  33.             <EditText android:id="@+id/etsearch" android:layout_width="fill_parent"
  34.                 android:gravity="center_vertical" android:layout_height="42dp"
  35.                 android:minHeight="42dp" android:layout_marginTop="20dp"></EditText>
  36.             <Button android:layout_width="42dp" android:background="@drawable/simplesearch"
  37.                 android:layout_height="36dp" android:layout_centerVertical="true"
  38.                 android:layout_marginTop="20dp" android:layout_alignParentRight="true"
  39.                 android:layout_alignParentTop="true" android:id="@+id/twtsearch"></Button>
  40.         </RelativeLayout>
  41.     </LinearLayout>
  42.     <ListView android:id="@+id/listsearch"
  43.         xmlns:android="http://schemas.android.com/apk/res/android"
  44.         android:layout_width="fill_parent" android:layout_weight="3" android:background="@android:color/transparent"
  45.         android:layout_height="fill_parent" android:cacheColorHint="#00000000" />
  46. </LinearLayout>