Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2011 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 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     18         android:id="@+id/view_padding"
     19         android:layout_width="fill_parent"
     20         android:layout_height="fill_parent">
     21 
     22     <FrameLayout android:layout_width="match_parent"
     23                  android:layout_height="match_parent">
     24 
     25         <FrameLayout
     26                 android:layout_width="300dp"
     27                 android:layout_height="300dp"
     28                 android:layout_gravity="top|left"
     29                 android:background="#FF888888"
     30                 android:paddingTop="20dip"
     31                 android:paddingLeft="40dip"
     32                 android:paddingBottom="30dip"
     33                 android:paddingRight="50dip">
     34 
     35             <FrameLayout
     36                     android:layout_width="100dp"
     37                     android:layout_height="100dp"
     38                     android:layout_gravity="top|left"
     39                     android:background="#FF0000FF">
     40             </FrameLayout>
     41 
     42             <FrameLayout
     43                     android:layout_width="100dp"
     44                     android:layout_height="100dp"
     45                     android:layout_gravity="bottom|right"
     46                     android:background="#FF00FF00">
     47             </FrameLayout>
     48         </FrameLayout>
     49 
     50         <FrameLayout
     51                 android:layout_width="300dp"
     52                 android:layout_height="300dp"
     53                 android:layout_gravity="top|center_horizontal"
     54                 android:background="#FF888888"
     55                 android:paddingTop="20dip"
     56                 android:paddingLeft="40dip"
     57                 android:paddingBottom="30dip"
     58                 android:paddingRight="50dip"
     59                 android:layoutDirection="inherit">
     60 
     61             <FrameLayout
     62                     android:layout_width="100dp"
     63                     android:layout_height="100dp"
     64                     android:layout_gravity="top|left"
     65                     android:background="#FF0000FF">
     66             </FrameLayout>
     67 
     68             <FrameLayout
     69                     android:layout_width="100dp"
     70                     android:layout_height="100dp"
     71                     android:layout_gravity="bottom|right"
     72                     android:background="#FF00FF00">
     73             </FrameLayout>
     74         </FrameLayout>
     75 
     76         <FrameLayout
     77                 android:layout_width="300dp"
     78                 android:layout_height="300dp"
     79                 android:layout_gravity="top|right"
     80                 android:background="#FF888888"
     81                 android:paddingTop="20dip"
     82                 android:paddingLeft="40dip"
     83                 android:paddingBottom="30dip"
     84                 android:paddingRight="50dip"
     85                 android:layoutDirection="ltr">
     86 
     87             <FrameLayout
     88                     android:layout_width="100dp"
     89                     android:layout_height="100dp"
     90                     android:layout_gravity="top|left"
     91                     android:background="#FF0000FF">
     92             </FrameLayout>
     93 
     94             <FrameLayout
     95                     android:layout_width="100dp"
     96                     android:layout_height="100dp"
     97                     android:layout_gravity="bottom|right"
     98                     android:background="#FF00FF00">
     99             </FrameLayout>
    100         </FrameLayout>
    101 
    102         <FrameLayout
    103                 android:layout_width="300dp"
    104                 android:layout_height="300dp"
    105                 android:layout_gravity="bottom|left"
    106                 android:background="#FF888888"
    107                 android:paddingTop="20dip"
    108                 android:paddingLeft="40dip"
    109                 android:paddingBottom="30dip"
    110                 android:paddingRight="50dip"
    111                 android:layoutDirection="rtl">
    112 
    113             <FrameLayout
    114                     android:layout_width="100dp"
    115                     android:layout_height="100dp"
    116                     android:layout_gravity="top|left"
    117                     android:background="#FF0000FF">
    118             </FrameLayout>
    119 
    120             <FrameLayout
    121                     android:layout_width="100dp"
    122                     android:layout_height="100dp"
    123                     android:layout_gravity="bottom|right"
    124                     android:background="#FF00FF00">
    125             </FrameLayout>
    126         </FrameLayout>
    127 
    128         <FrameLayout
    129                 android:layout_width="300dp"
    130                 android:layout_height="300dp"
    131                 android:layout_gravity="bottom|center_horizontal"
    132                 android:background="#FF888888"
    133                 android:paddingTop="20dip"
    134                 android:paddingLeft="40dip"
    135                 android:paddingBottom="30dip"
    136                 android:paddingRight="50dip"
    137                 android:layoutDirection="locale">
    138 
    139             <FrameLayout
    140                     android:layout_width="100dp"
    141                     android:layout_height="100dp"
    142                     android:layout_gravity="top|left"
    143                     android:background="#FF0000FF">
    144             </FrameLayout>
    145 
    146             <FrameLayout
    147                     android:layout_width="100dp"
    148                     android:layout_height="100dp"
    149                     android:layout_gravity="bottom|right"
    150                     android:background="#FF00FF00">
    151             </FrameLayout>
    152         </FrameLayout>
    153 
    154     </FrameLayout>
    155 
    156 </FrameLayout>
    157