Skip to content

Commit 13b8948

Browse files
committed
Update Emergency Dialer to match Dialer (5/7).
Emergency dialer style updated to match style in Dialer and InCallUI. Moved all dialpad resources to PhoneCommon. Change-Id: Ia3b937c12fc133a04c10ba842df9e89012ba331d
1 parent 4aac9d2 commit 13b8948

39 files changed

+1716
-3
lines changed

Android.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
# limitations under the License.
1414

1515
LOCAL_PATH:= $(call my-dir)
16-
1716
include $(CLEAR_VARS)
1817

18+
LOCAL_MODULE_TAGS := optional
19+
1920
LOCAL_SRC_FILES := $(call all-java-files-under, src)
21+
LOCAL_RESOURCE_FILES := $(addprefix $(LOCAL_PATH)/, res)
2022

21-
LOCAL_MODULE := com.android.phone.shared
23+
LOCAL_PACKAGE_NAME := com.android.phone.common
2224

23-
include $(BUILD_STATIC_JAVA_LIBRARY)
25+
include $(BUILD_PACKAGE)
26+
include $(CLEAR_VARS)

AndroidManifest.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright (C) 2014 The Android Open Source Project
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License
16+
-->
17+
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19+
package="com.android.phone.common">
20+
</manifest>
21+

res/anim/dialpad_slide_in_bottom.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
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+
<translate xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:interpolator="@android:interpolator/fast_out_slow_in"
18+
android:duration="@integer/dialpad_slide_in_duration"
19+
android:fromYDelta="67%p"
20+
android:toYDelta="0" />

res/anim/dialpad_slide_in_right.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2014, 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+
<translate xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:fromXDelta="100%p"
19+
android:toXDelta="0"
20+
android:interpolator="@android:anim/decelerate_interpolator"
21+
android:duration="@integer/dialpad_slide_in_duration"/>

res/anim/dialpad_slide_out_bottom.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
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+
<translate xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:interpolator="@android:interpolator/fast_out_linear_in"
18+
android:duration="@integer/dialpad_slide_out_duration"
19+
android:fromYDelta="0"
20+
android:toYDelta="80%p" />

res/anim/dialpad_slide_out_right.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2014, 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+
<translate xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:fromXDelta="0"
19+
android:toXDelta="100%"
20+
android:interpolator="@android:anim/decelerate_interpolator"
21+
android:duration="@integer/dialpad_slide_out_duration"/>
805 Bytes
Loading

res/drawable-hdpi/ic_dialpad_vm.png

554 Bytes
Loading
503 Bytes
Loading
669 Bytes
Loading

res/drawable-mdpi/ic_dialpad_vm.png

450 Bytes
Loading
424 Bytes
Loading
1.08 KB
Loading

res/drawable-xhdpi/ic_dialpad_vm.png

672 Bytes
Loading
550 Bytes
Loading
1.7 KB
Loading

res/drawable-xxhdpi/ic_dialpad_vm.png

1.47 KB
Loading
1.35 KB
Loading

res/drawable/btn_dialpad_key.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2014 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+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:color="?android:attr/colorControlHighlight" />

res/layout-land/dialpad_key.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
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+
17+
<!-- A layout representing a single key in the dialpad -->
18+
<com.android.phone.common.dialpad.DialpadKeyButton
19+
xmlns:android="http://schemas.android.com/apk/res/android"
20+
style="@style/DialpadKeyButtonStyle" >
21+
22+
<LinearLayout style="@style/DialpadKeyInternalLayoutStyle"
23+
android:orientation="horizontal"
24+
android:baselineAligned="false"
25+
android:layout_gravity="right|center_vertical" >
26+
27+
<!-- Note in the referenced styles that we assign hard widths to these components
28+
because we want them to line up vertically when we arrange them in an MxN grid -->
29+
30+
<com.android.phone.common.dialpad.DialpadTextView
31+
android:id="@+id/dialpad_key_number"
32+
style="@style/DialpadKeyNumberStyle"
33+
android:layout_gravity="right"
34+
android:layout_marginBottom="0dp"
35+
android:layout_marginRight="@dimen/dialpad_key_margin_right" />
36+
37+
<TextView
38+
android:id="@+id/dialpad_key_letters"
39+
style="@style/DialpadKeyLettersStyle"
40+
android:layout_width="@dimen/dialpad_key_text_width"
41+
android:layout_gravity="right|bottom" />
42+
</LinearLayout>
43+
</com.android.phone.common.dialpad.DialpadKeyButton>

res/layout-land/dialpad_key_one.xml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2006 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+
<com.android.phone.common.dialpad.DialpadKeyButton
17+
xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:id="@+id/one"
19+
style="@style/DialpadKeyButtonStyle">
20+
<LinearLayout
21+
style="@style/DialpadKeyInternalLayoutStyle"
22+
android:orientation="horizontal"
23+
android:baselineAligned="false"
24+
android:layout_gravity="right|center_vertical" >
25+
<com.android.phone.common.dialpad.DialpadTextView
26+
android:id="@+id/dialpad_key_number"
27+
style="@style/DialpadKeyNumberStyle"
28+
android:layout_gravity="right"
29+
android:layout_marginBottom="0dp"
30+
android:layout_marginRight="@dimen/dialpad_key_margin_right" />
31+
<RelativeLayout
32+
android:layout_width="@dimen/dialpad_key_text_width"
33+
android:layout_height="wrap_content"
34+
android:layout_gravity="right|bottom" >
35+
<ImageView
36+
android:layout_width="wrap_content"
37+
android:layout_height="wrap_content"
38+
android:paddingTop="@dimen/dialpad_voicemail_icon_padding_top"
39+
android:id="@+id/dialpad_key_voicemail"
40+
android:src="@drawable/ic_dialpad_vm"
41+
android:scaleType="fitCenter"
42+
android:layout_centerInParent="true"
43+
android:tint="@color/dialpad_secondary_text_color" />
44+
<!-- Place empty text view so vertical height is same as other dialpad keys. -->
45+
<TextView style="@style/DialpadKeyLettersStyle" />
46+
</RelativeLayout>
47+
</LinearLayout>
48+
</com.android.phone.common.dialpad.DialpadKeyButton>

res/layout/dialpad.xml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2006 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+
<!-- Dialpad in the Phone app. -->
18+
<LinearLayout
19+
xmlns:android="http://schemas.android.com/apk/res/android"
20+
android:id="@+id/dialpad"
21+
android:layout_width="match_parent"
22+
android:layout_height="match_parent"
23+
android:orientation="vertical"
24+
android:clipChildren="false">
25+
<LinearLayout
26+
android:layout_width="match_parent"
27+
android:layout_height="0dp"
28+
android:layout_weight="1"
29+
android:orientation="horizontal">
30+
<Space style="@style/DialpadSpaceStyle" />
31+
<include layout="@layout/dialpad_key_one" />
32+
<include layout="@layout/dialpad_key"
33+
android:id="@+id/two"
34+
style="@style/DialpadKeyButtonStyle" />
35+
<include layout="@layout/dialpad_key"
36+
android:id="@+id/three"
37+
style="@style/DialpadKeyButtonStyle" />
38+
<Space style="@style/DialpadSpaceStyle" />
39+
</LinearLayout>
40+
41+
<LinearLayout
42+
android:layout_width="match_parent"
43+
android:layout_height="0dp"
44+
android:layout_weight="1"
45+
android:orientation="horizontal">
46+
<Space style="@style/DialpadSpaceStyle" />
47+
<include layout="@layout/dialpad_key"
48+
android:id="@+id/four"
49+
style="@style/DialpadKeyButtonStyle" />
50+
<include layout="@layout/dialpad_key"
51+
android:id="@+id/five"
52+
style="@style/DialpadKeyButtonStyle" />
53+
<include layout="@layout/dialpad_key"
54+
android:id="@+id/six"
55+
style="@style/DialpadKeyButtonStyle" />
56+
<Space style="@style/DialpadSpaceStyle" />
57+
</LinearLayout>
58+
59+
<LinearLayout
60+
android:layout_width="match_parent"
61+
android:layout_height="0dp"
62+
android:layout_weight="1"
63+
android:orientation="horizontal">
64+
<Space style="@style/DialpadSpaceStyle" />
65+
<include layout="@layout/dialpad_key"
66+
android:id="@+id/seven"
67+
style="@style/DialpadKeyButtonStyle" />
68+
<include layout="@layout/dialpad_key"
69+
android:id="@+id/eight"
70+
style="@style/DialpadKeyButtonStyle" />
71+
<include layout="@layout/dialpad_key"
72+
android:id="@+id/nine"
73+
style="@style/DialpadKeyButtonStyle" />
74+
<Space style="@style/DialpadSpaceStyle" />
75+
</LinearLayout>
76+
77+
<LinearLayout
78+
android:layout_width="match_parent"
79+
android:layout_height="0dp"
80+
android:layout_weight="1"
81+
android:orientation="horizontal">
82+
<Space style="@style/DialpadSpaceStyle" />
83+
<com.android.phone.common.dialpad.DialpadKeyButton
84+
android:id="@+id/star"
85+
style="@style/DialpadKeyButtonStyle">
86+
<LinearLayout
87+
style="@style/DialpadKeyInternalLayoutStyle">
88+
<com.android.phone.common.dialpad.DialpadTextView
89+
android:id="@+id/dialpad_key_number"
90+
style="@style/DialpadKeyStarStyle" />
91+
</LinearLayout>
92+
</com.android.phone.common.dialpad.DialpadKeyButton>
93+
<include layout="@layout/dialpad_key"
94+
android:id="@+id/zero"
95+
style="@style/DialpadKeyButtonStyle" />
96+
<com.android.phone.common.dialpad.DialpadKeyButton
97+
android:id="@+id/pound"
98+
style="@style/DialpadKeyButtonStyle">
99+
<LinearLayout
100+
style="@style/DialpadKeyInternalLayoutStyle">
101+
<com.android.phone.common.dialpad.DialpadTextView
102+
android:id="@id/dialpad_key_number"
103+
style="@style/DialpadKeyPoundStyle" />
104+
</LinearLayout>
105+
</com.android.phone.common.dialpad.DialpadKeyButton>
106+
<Space style="@style/DialpadSpaceStyle" />
107+
</LinearLayout>
108+
<Space
109+
android:layout_width="match_parent"
110+
android:layout_height="@dimen/dialpad_bottom_key_height" />
111+
</LinearLayout>

res/layout/dialpad_key.xml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
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+
17+
<!-- A layout representing a single key in the dialpad -->
18+
<com.android.phone.common.dialpad.DialpadKeyButton
19+
xmlns:android="http://schemas.android.com/apk/res/android"
20+
style="@style/DialpadKeyButtonStyle" >
21+
22+
<LinearLayout style="@style/DialpadKeyInternalLayoutStyle">
23+
24+
<!-- Note in the referenced styles that we assign hard widths to these components
25+
because we want them to line up vertically when we arrange them in an MxN grid -->
26+
27+
<com.android.phone.common.dialpad.DialpadTextView
28+
android:id="@+id/dialpad_key_number"
29+
style="@style/DialpadKeyNumberStyle" />
30+
31+
<TextView
32+
android:id="@+id/dialpad_key_letters"
33+
style="@style/DialpadKeyLettersStyle" />
34+
</LinearLayout>
35+
</com.android.phone.common.dialpad.DialpadKeyButton>

0 commit comments

Comments
 (0)