xref: /aosp_15_r20/sdk/testapps/customViewTest/libWithCustomView/res/layout/main.xml (revision 1789df15502f1991eff51ff970dce5df8404dd56)
1*1789df15SXin Li<?xml version="1.0" encoding="utf-8"?>
2*1789df15SXin Li<!--
3*1789df15SXin Li     Copyright (C) 2007 The Android Open Source Project
4*1789df15SXin Li
5*1789df15SXin Li     Licensed under the Apache License, Version 2.0 (the "License");
6*1789df15SXin Li     you may not use this file except in compliance with the License.
7*1789df15SXin Li     You may obtain a copy of the License at
8*1789df15SXin Li
9*1789df15SXin Li          http://www.apache.org/licenses/LICENSE-2.0
10*1789df15SXin Li
11*1789df15SXin Li     Unless required by applicable law or agreed to in writing, software
12*1789df15SXin Li     distributed under the License is distributed on an "AS IS" BASIS,
13*1789df15SXin Li     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*1789df15SXin Li     See the License for the specific language governing permissions and
15*1789df15SXin Li     limitations under the License.
16*1789df15SXin Li-->
17*1789df15SXin Li
18*1789df15SXin Li<!-- Demonstrates defining custom views in a layout file. -->
19*1789df15SXin Li
20*1789df15SXin Li<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
21*1789df15SXin Li    xmlns:app="http://schemas.android.com/apk/res-auto"
22*1789df15SXin Li    android:layout_width="match_parent"
23*1789df15SXin Li    android:layout_height="wrap_content"
24*1789df15SXin Li    android:orientation="vertical" >
25*1789df15SXin Li
26*1789df15SXin Li    <com.android.tests.libwithcustom.LabelView
27*1789df15SXin Li        android:layout_width="match_parent"
28*1789df15SXin Li        android:layout_height="wrap_content"
29*1789df15SXin Li        android:background="@drawable/red"
30*1789df15SXin Li        app:text="Red" />
31*1789df15SXin Li
32*1789df15SXin Li    <com.android.tests.libwithcustom.LabelView
33*1789df15SXin Li        android:layout_width="match_parent"
34*1789df15SXin Li        android:layout_height="wrap_content"
35*1789df15SXin Li        android:background="@drawable/blue"
36*1789df15SXin Li        app:text="Blue"
37*1789df15SXin Li        app:textSize="20dp" />
38*1789df15SXin Li
39*1789df15SXin Li    <com.android.tests.libwithcustom.LabelView
40*1789df15SXin Li        android:layout_width="match_parent"
41*1789df15SXin Li        android:layout_height="wrap_content"
42*1789df15SXin Li        android:background="@drawable/green"
43*1789df15SXin Li        app:text="Green"
44*1789df15SXin Li        app:textColor="#ffffffff" />
45*1789df15SXin Li
46*1789df15SXin Li</LinearLayout>