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 want the third index textview of this vertical linear layout to
     54       be baseline aligned with the others.-->
     55     <LinearLayout
     56             android:orientation="vertical"
     57             android:baselineAlignedChildIndex="2"
     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         <ImageView
     66             android:layout_width="wrap_content"
     67             android:layout_height="wrap_content"
     68             android:src="@drawable/arrow_up_float"/>
     69         <TextView
     70             android:layout_width="wrap_content"
     71             android:layout_height="wrap_content"
     72             android:layout_marginRight="5dip"
     73             android:text="@string/baseline_nested_1_label" />
     74     </LinearLayout>
     75 
     76 
     77     <TextView
     78         android:layout_width="wrap_content"
     79         android:layout_height="wrap_content"
     80         android:textSize="20sp"
     81         android:layout_gravity="center_vertical"
     82         android:text="@string/baseline_nested_1_label" />
     83 
     84 
     85 </LinearLayout>
     86