xref: /aosp_15_r20/development/samples/devbytes/telephony/SmsSampleProject/app/src/main/res/layout/activity_main.xml (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1<!--
2  Copyright (C) 2013 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:tools="http://schemas.android.com/tools"
18    android:layout_width="match_parent"
19    android:layout_height="match_parent"
20    android:orientation="vertical"
21    tools:context=".MainActivity">
22
23    <RelativeLayout
24        android:id="@+id/set_default_sms_layout"
25        android:layout_width="match_parent"
26        android:layout_height="wrap_content"
27        android:visibility="gone"
28        android:background="@color/alert_orange">
29
30        <Button
31            android:id="@+id/set_default_sms_button"
32            android:layout_width="wrap_content"
33            android:layout_height="wrap_content"
34            android:layout_alignParentRight="true"
35            android:layout_centerVertical="true"
36            android:layout_margin="@dimen/standard_margin"
37            android:text="@string/choose_sms_app" />
38
39        <TextView
40            android:id="@+id/set_default_sms_textview"
41            android:layout_width="match_parent"
42            android:layout_height="wrap_content"
43            android:layout_toLeftOf="@+id/set_default_sms_button"
44            android:layout_centerVertical="true"
45            android:layout_margin="@dimen/standard_margin"
46            android:text="@string/set_default_sms_text" />
47
48    </RelativeLayout>
49
50    <ListView
51        android:id="@android:id/list"
52        android:layout_height="0dp"
53        android:layout_width="match_parent"
54        android:layout_weight="1"
55        android:fastScrollEnabled="true" />
56
57    <TextView
58            android:id="@android:id/empty"
59            android:layout_height="0dp"
60            android:layout_width="match_parent"
61            android:layout_weight="1"
62            android:gravity="center"
63            android:visibility="gone"
64            android:layout_margin="@dimen/standard_margin"
65            style="?android:textAppearanceMedium"
66            android:text="@string/sms_empty" />
67
68    <RelativeLayout
69            android:id="@+id/send_sms_layout"
70            android:layout_width="match_parent"
71            android:layout_height="wrap_content"
72            android:padding="@dimen/standard_margin"
73            android:background="@color/light_gray">
74
75        <Button
76                android:id="@+id/send_sms_button"
77                android:layout_width="wrap_content"
78                android:layout_height="wrap_content"
79                android:layout_alignParentRight="true"
80                android:layout_centerVertical="true"
81                android:text="@string/sms_send" />
82
83        <EditText
84                android:id="@+id/send_sms_edittext"
85                android:layout_width="match_parent"
86                android:layout_height="wrap_content"
87                android:layout_toLeftOf="@+id/send_sms_button"
88                android:layout_centerVertical="true"
89                android:hint="@string/sms_send_new_hint"/>
90
91    </RelativeLayout>
92
93</LinearLayout>
94