• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4 * Copyright (C) 2008 Esmertec AG.
5 * Copyright (C) 2008 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19-->
20<com.android.im.app.ChatView
21    xmlns:android="http://schemas.android.com/apk/res/android"
22    android:id="@+id/chatView"
23    android:orientation="vertical"
24    android:background="#ffffffff"
25    android:layout_width="fill_parent"
26    android:layout_height="fill_parent">
27
28    <!-- The title bar -->
29    <LinearLayout style="?android:attr/windowTitleBackgroundStyle"
30        android:layout_width="fill_parent"
31        android:layout_height="wrap_content"
32        android:gravity="center_vertical"
33        android:orientation="horizontal">
34
35        <ImageView android:id="@+id/statusIcon"
36            android:layout_marginRight="3dip"
37            android:layout_width="16dip"
38            android:layout_height="16dip"
39            android:scaleType="fitCenter" />
40
41        <TextView android:id="@+id/title"
42            style="?android:attr/windowTitleStyle"
43            android:layout_width="fill_parent"
44            android:layout_height="wrap_content"
45            android:layout_weight="1"
46            android:background="@null"
47            android:fadingEdge="horizontal"
48            android:scrollHorizontally="true"
49            android:layout_marginRight="20dip" />
50    </LinearLayout>
51
52    <View android:layout_width="fill_parent"
53        android:layout_height="1dip"
54        android:background="#ff202020" />
55
56    <ListView android:id="@+id/history"
57        android:cacheColorHint="#00000000"
58        android:layout_width="fill_parent"
59        android:layout_height="0dip"
60        android:layout_weight="1"
61        android:drawSelectorOnTop="true"
62        android:listSelector="@drawable/chat_history_selector"
63        android:stackFromBottom="true"
64        android:transcriptMode="normal"
65        android:scrollbarAlwaysDrawVerticalTrack="true" />
66
67    <LinearLayout android:id="@+id/invitationPanel"
68        android:layout_width="fill_parent"
69        android:layout_height="wrap_content"
70        android:layout_gravity="bottom"
71        android:orientation="vertical"
72        android:visibility="gone"
73        android:background="@drawable/text_divider_horizontal">
74
75        <TextView android:id="@+id/txtInvitation"
76            android:layout_width="fill_parent"
77            android:layout_height="wrap_content"
78            android:textColor="#ffad45d6"
79            android:text="@string/invitation_prompt" />
80
81        <LinearLayout android:layout_width="fill_parent"
82            android:layout_height="wrap_content"
83            android:orientation="horizontal">
84
85            <Button android:id="@+id/btnAccept"
86                android:layout_width="wrap_content"
87                android:layout_height="wrap_content"
88                android:text="@string/accept_invitation" />
89
90            <Button android:id="@+id/btnDecline"
91                android:layout_width="wrap_content"
92                android:layout_height="wrap_content"
93                android:paddingLeft="10dip"
94                android:text="@string/decline_invitation" />
95        </LinearLayout>
96    </LinearLayout>
97
98    <LinearLayout android:id="@+id/subscription"
99        android:layout_width="fill_parent"
100        android:layout_height="wrap_content"
101        android:layout_gravity="bottom"
102        android:orientation="vertical"
103        android:visibility="gone"
104        android:background="@drawable/text_divider_horizontal">
105
106        <TextView android:id="@+id/txtSubscription"
107            android:layout_width="fill_parent"
108            android:layout_height="wrap_content"
109            android:textColor="#ffad45d6"
110            android:text="@string/subscription_prompt" />
111
112        <LinearLayout android:layout_width="fill_parent"
113            android:layout_height="wrap_content"
114            android:orientation="horizontal">
115
116            <Button android:id="@+id/btnApproveSubscription"
117                android:layout_width="wrap_content"
118                android:layout_height="wrap_content"
119                android:text="@string/approve_subscription" />
120
121            <Button android:id="@+id/btnDeclineSubscription"
122                android:layout_width="wrap_content"
123                android:layout_height="wrap_content"
124                android:paddingLeft="10dip"
125                android:text="@string/decline_subscription" />
126        </LinearLayout>
127    </LinearLayout>
128
129    <LinearLayout android:id="@+id/warning"
130        android:layout_width="fill_parent"
131        android:layout_height="wrap_content"
132        android:layout_gravity="bottom"
133        android:orientation="horizontal"
134        android:background="#ffffffff"
135        android:visibility="gone">
136
137        <ImageView android:id="@+id/warningIcon"
138            android:layout_width="wrap_content"
139            android:layout_height="fill_parent"
140            android:src="@drawable/ic_im_message_not_sent" />
141
142        <TextView android:id="@+id/warningText"
143            android:layout_width="fill_parent"
144            android:layout_height="wrap_content"
145            android:paddingLeft="5dip"
146            android:textColor="#ffff0000"
147            android:text="@string/disconnected_warning" />
148
149    </LinearLayout>
150
151    <LinearLayout android:layout_width="fill_parent"
152        android:layout_height="wrap_content"
153        android:baselineAligned="false"
154        android:orientation="horizontal"
155        android:background="@drawable/background_textfield">
156
157        <EditText android:id="@+id/edtInput"
158            android:layout_width="0dip"
159            android:layout_height="wrap_content"
160            android:layout_weight="1"
161            android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine|textImeMultiLine"
162            android:imeOptions="actionSend|flagNoEnterAction"
163            android:maxLines="4"
164            android:maxLength="2000"
165            android:hint="@string/compose_hint"/>
166
167        <Button android:id="@+id/btnSend"
168            android:layout_width="wrap_content"
169            android:layout_height="fill_parent"
170            android:text="@string/send" />
171    </LinearLayout>
172</com.android.im.app.ChatView>
173