Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2007 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7   
      8           http://www.apache.org/licenses/LICENSE-2.0
      9   
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:orientation="horizontal"
     19     android:layout_width="match_parent"
     20     android:layout_height="match_parent">
     21 
     22     <TextView
     23         android:layout_width="wrap_content"
     24         android:layout_height="wrap_content"
     25         android:layout_marginRight="3dip"
     26         android:layout_gravity="center_vertical"
     27         android:text="@string/baseline_nested_1_label" />
     28 
     29     <!-- We want the middle textview of this vertical linear layout to
     30       be baseline aligned with the others.-->
     31     <LinearLayout
     32             android:orientation="vertical"
     33             android:baselineAlignedChildIndex="1"
     34             android:layout_width="wrap_content"
     35             android:layout_height="wrap_content"
     36             android:layout_gravity="center_vertical">
     37         <ImageView
     38             android:layout_width="wrap_content"
     39             android:layout_height="wrap_content"
     40             android:src="@drawable/arrow_up_float"/>
     41         <TextView
     42             android:layout_width="wrap_content"
     43             android:layout_height="wrap_content"
     44             android:layout_marginRight="5dip"
     45             android:text="@string/baseline_nested_1_label" />
     46         <ImageView
     47             android:layout_width="wrap_content"
     48             android:layout_height="wrap_content"
     49             android:src="@drawable/arrow_down_float"/>
     50     </LinearLayout>
     51 
     52 
     53     <!-- We'll point to the linear layout to baseline align by, which
     54       in turn will point to a text view inside of it -->
     55     <LinearLayout
     56         android:orientation="vertical"
     57                 android:baselineAlignedChildIndex="1"
     58                 android:layout_width="wrap_content"
     59                 android:layout_gravity="center_vertical"
     60                 android:layout_height="wrap_content">
     61         <ImageView
     62             android:layout_width="wrap_content"
     63             android:layout_height="wrap_content"
     64             android:src="@drawable/arrow_up_float"/>
     65         <LinearLayout
     66                 android:orientation="vertical"
     67                 android:baselineAlignedChildIndex="2"
     68                 android:layout_width="wrap_content"
     69                 android:layout_gravity="center_vertical"
     70                 android:layout_height="wrap_content">
     71             <ImageView
     72                     android:layout_width="wrap_content"
     73                     android:layout_height="wrap_content"
     74                     android:src="@drawable/arrow_up_float"/>
     75             <ImageView
     76                     android:layout_width="wrap_content"
     77                     android:layout_height="wrap_content"
     78                     android:src="@drawable/arrow_up_float"/>
     79             <TextView
     80                     android:layout_width="wrap_content"
     81                     android:layout_height="wrap_content"
     82                     android:layout_marginRight="5dip"
     83                     android:text="@string/baseline_nested_1_label"/>
     84         </LinearLayout>
     85     </LinearLayout>
     86 
     87 
     88     <TextView
     89         android:layout_width="wrap_content"
     90         android:layout_height="wrap_content"
     91         android:textSize="20sp"
     92         android:layout_gravity="center_vertical"
     93         android:text="@string/baseline_nested_1_label" />
     94 
     95 
     96 </LinearLayout>
     97