Add layout bound metadata to 9-patch files and make layouts take them into account. This CL contains a proposed API for dealing with layout bounds. This solution exposes: 1. Class: Insets - for storing layout Insets (and later possibly padding). 2. Methods: View:(get/set)LayoutInsets() - for storing layoutBounds. 3. Methods: ViewGroup:(get/set)LayoutMode() - for controlling layoutMode. It also iuncudes the changes to GridLayout to support layout bounds. Change-Id: I60c836b6530b61c5abf37f93ee9c44aad73573f1
42 lines
1.2 KiB
XML
42 lines
1.2 KiB
XML
<!-- Copyright (C) 2010 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<GridLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<Space
|
|
android:layout_row="0"
|
|
android:layout_column="0"
|
|
android:layout_width="109dip"
|
|
android:layout_height="108dip"/>
|
|
|
|
<Button
|
|
android:text="Button 1"
|
|
android:layout_row="0"
|
|
android:layout_column="1"
|
|
/>
|
|
|
|
<Button
|
|
android:text="Button 2"
|
|
android:layout_row="1"
|
|
android:layout_column="1"
|
|
/>
|
|
|
|
</GridLayout>
|
|
|
|
|