diff options
author | nadlabak <pavel@doshaska.net> | 2014-04-17 15:35:50 +0200 |
---|---|---|
committer | nadlabak <pavel@doshaska.net> | 2014-04-17 23:59:07 +0200 |
commit | a690f7fa1014f450f2e927f7f296c86be9d718ca (patch) | |
tree | e40f015d1b0b7806a865a10a0655fa8870cf2e4e | |
parent | 1a4b19d0c019ce966e5ec5a5e87b07735141fdd3 (diff) | |
download | android_packages_apps_Dialer-a690f7fa1014f450f2e927f7f296c86be9d718ca.tar.gz android_packages_apps_Dialer-a690f7fa1014f450f2e927f7f296c86be9d718ca.tar.bz2 android_packages_apps_Dialer-a690f7fa1014f450f2e927f7f296c86be9d718ca.zip |
Dialer: Landscape support (for in-dock use / qwerty sliders)
Change-Id: I3dedd339c59f8ffb184bd685712d73732b3d884b
-rw-r--r-- | AndroidManifest.xml | 10 | ||||
-rw-r--r-- | res/layout-land/call_detail.xml | 217 | ||||
-rw-r--r-- | res/layout-land/call_detail_history_header.xml | 61 | ||||
-rw-r--r-- | res/layout-land/call_log_activity.xml | 26 | ||||
-rw-r--r-- | res/layout-land/call_stats_detail.xml | 225 | ||||
-rw-r--r-- | res/layout-land/dialpad_fragment.xml | 178 | ||||
-rw-r--r-- | res/layout-land/dialtacts_activity.xml | 128 |
7 files changed, 840 insertions, 5 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index a17c17a7a..7b6b2a6db 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -76,7 +76,7 @@ android:launchMode="singleTask" android:clearTaskOnLaunch="true" android:icon="@mipmap/ic_launcher_phone" - android:screenOrientation="portrait" + android:screenOrientation="nosensor" android:enabled="@*android:bool/config_voice_capable" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing"> <intent-filter> @@ -142,7 +142,7 @@ <activity android:name="com.android.dialer.calllog.CallLogActivity" android:label="@string/call_log_activity_title" android:theme="@style/DialtactsThemeWithActionBarOverlay" - android:screenOrientation="portrait" + android:screenOrientation="nosensor" android:icon="@mipmap/ic_launcher_phone"> <intent-filter> <action android:name="android.intent.action.VIEW" /> @@ -155,13 +155,13 @@ <activity android:name="com.android.dialer.list.AllContactsActivity" android:label="@string/show_all_contacts_title" android:theme="@style/DialtactsThemeWithActionBarOverlay" - android:screenOrientation="portrait"> + android:screenOrientation="nosensor"> </activity> <activity android:name="com.android.dialer.CallDetailActivity" android:label="@string/callDetailTitle" android:theme="@style/CallDetailActivityTheme" - android:screenOrientation="portrait" + android:screenOrientation="nosensor" android:icon="@mipmap/ic_launcher_phone" android:parentActivityName="com.android.dialer.calllog.CallLogActivity" > @@ -175,7 +175,7 @@ <activity android:name=".callstats.CallStatsDetailActivity" android:label="@string/callStatsDetailTitle" android:theme="@style/CallDetailActivityTheme" - android:screenOrientation="portrait" + android:screenOrientation="nosensor" android:icon="@mipmap/ic_launcher_phone" > <intent-filter> <action android:name="android.intent.action.VIEW" /> diff --git a/res/layout-land/call_detail.xml b/res/layout-land/call_detail.xml new file mode 100644 index 000000000..7024e1c3c --- /dev/null +++ b/res/layout-land/call_detail.xml @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 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. +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:ex="http://schemas.android.com/apk/res-auto" + android:id="@+id/call_detail" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone" +> + <!-- + The list view is under everything. + It contains a first header element which is hidden under the controls UI. + When scrolling, the controls move up until the name bar hits the top. + --> + <ListView + android:id="@+id/history" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + /> + + <!-- All the controls which are part of the pinned header are in this layout. --> + <RelativeLayout + android:id="@+id/controls" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + > + <FrameLayout + android:id="@+id/voicemail_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:visibility="gone" + > + <include layout="@layout/call_log_voicemail_status"/> + </FrameLayout> + + <view + class="com.android.contacts.common.widget.ProportionalLayout" + android:id="@+id/contact_background_sizer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/voicemail_status" + ex:ratio="0.25" + ex:direction="widthToHeight" + > + <ImageView + android:id="@+id/contact_background" + android:layout_width="match_parent" + android:layout_height="0dip" + android:adjustViewBounds="true" + android:scaleType="centerCrop" + /> + </view> + + <LinearLayout + android:id="@+id/separator" + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="@color/background_dialer_light" + android:layout_below="@+id/contact_background_sizer" + /> + <View + android:id="@+id/photo_text_bar" + android:layout_width="match_parent" + android:layout_height="42dip" + android:background="@color/call_detail_photo_bg" + android:layout_alignParentStart="true" + android:layout_alignBottom="@id/contact_background_sizer" + /> + <ImageView + android:id="@+id/main_action" + android:layout_width="wrap_content" + android:layout_height="0dip" + android:scaleType="center" + android:layout_alignEnd="@id/photo_text_bar" + android:layout_alignBottom="@id/photo_text_bar" + android:layout_alignTop="@id/photo_text_bar" + android:layout_marginEnd="@dimen/call_log_outer_margin" + /> + <TextView + android:id="@+id/header_text" + android:layout_width="wrap_content" + android:layout_height="0dip" + android:layout_alignStart="@id/photo_text_bar" + android:layout_toLeftOf="@id/main_action" + android:layout_alignTop="@id/photo_text_bar" + android:layout_alignBottom="@id/photo_text_bar" + android:layout_marginEnd="@dimen/call_log_inner_margin" + android:layout_marginStart="@dimen/call_detail_contact_name_margin" + android:gravity="center_vertical" + android:textColor="?attr/call_log_header_color" + android:textAppearance="?android:attr/textAppearanceMedium" + android:singleLine="true" + /> + <ImageButton + android:id="@+id/main_action_push_layer" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignStart="@id/contact_background_sizer" + android:layout_alignTop="@id/contact_background_sizer" + android:layout_alignEnd="@id/contact_background_sizer" + android:layout_alignBottom="@id/contact_background_sizer" + android:background="?android:attr/selectableItemBackground" + /> + <LinearLayout + android:id="@+id/voicemail_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/separator" + android:paddingBottom="@dimen/call_detail_button_spacing"> + <!-- The voicemail fragment will be put here. --> + </LinearLayout> + <FrameLayout + android:id="@+id/call_and_sms" + android:layout_width="match_parent" + android:layout_height="@dimen/call_log_list_item_height" + android:layout_marginBottom="@dimen/call_detail_button_spacing" + android:layout_below="@id/voicemail_container" + android:gravity="center_vertical" + android:background="@color/background_dialer_list_items" + > + + <LinearLayout + android:id="@+id/call_and_sms_main_action" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" + > + + <LinearLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:paddingStart="@dimen/call_log_indent_margin" + android:orientation="vertical" + android:gravity="center_vertical" + > + + <TextView android:id="@+id/call_and_sms_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingEnd="@dimen/call_log_icon_margin" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?attr/call_log_primary_text_color" + android:singleLine="true" + android:ellipsize="end" + /> + + <TextView android:id="@+id/call_and_sms_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingEnd="@dimen/call_log_icon_margin" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="?attr/call_log_primary_text_color" + android:textAllCaps="true" + android:singleLine="true" + android:ellipsize="end" + /> + </LinearLayout> + + <View android:id="@+id/call_and_sms_divider" + android:layout_width="1px" + android:layout_height="32dip" + android:background="@color/background_dialer_light" + android:layout_gravity="center_vertical" + /> + + <ImageView android:id="@+id/call_and_sms_icon" + android:layout_width="@color/call_log_voicemail_highlight_color" + android:layout_height="match_parent" + android:paddingStart="@dimen/call_log_inner_margin" + android:paddingEnd="@dimen/call_log_outer_margin" + android:gravity="center" + android:scaleType="centerInside" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" + /> + </LinearLayout> + </FrameLayout> + </RelativeLayout> + <!-- + Used to hide the UI when playing a voicemail and the proximity sensor + is detecting something near the screen. + --> + <View + android:id="@+id/blank" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:background="@android:color/black" + android:visibility="gone" + android:clickable="true" + /> +</RelativeLayout> diff --git a/res/layout-land/call_detail_history_header.xml b/res/layout-land/call_detail_history_header.xml new file mode 100644 index 000000000..58728b9f7 --- /dev/null +++ b/res/layout-land/call_detail_history_header.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 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. +--> + +<!-- This layout is supposed to match the content of the controls in call_detail.xml --> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:ex="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <!-- Contact photo. --> + <view + class="com.android.contacts.common.widget.ProportionalLayout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/voicemail_status" + ex:ratio="0.25" + ex:direction="widthToHeight" + > + <!-- Proportional layout requires a view in it. --> + <View + android:layout_width="wrap_content" + android:layout_height="wrap_content" + /> + </view> + <!-- Separator line --> + <View + android:layout_width="match_parent" + android:layout_height="1dip" + /> + <!-- Voicemail controls --> + <!-- TODO: Make the height be based on a constant. --> + <View + android:id="@+id/header_voicemail_container" + android:layout_width="match_parent" + android:layout_height="140dip" + android:layout_marginBottom="@dimen/call_detail_button_spacing" + /> + <!-- Call and SMS --> + <View + android:id="@+id/header_call_and_sms_container" + android:layout_width="match_parent" + android:layout_height="@dimen/call_log_list_item_height" + /> + +</LinearLayout> diff --git a/res/layout-land/call_log_activity.xml b/res/layout-land/call_log_activity.xml new file mode 100644 index 000000000..397f8c82c --- /dev/null +++ b/res/layout-land/call_log_activity.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginTop="?android:attr/actionBarSize" + android:id="@+id/calllog_frame"> + <android.support.v4.view.ViewPager + android:id="@+id/call_log_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" /> +</FrameLayout> diff --git a/res/layout-land/call_stats_detail.xml b/res/layout-land/call_stats_detail.xml new file mode 100644 index 000000000..24c5d01ae --- /dev/null +++ b/res/layout-land/call_stats_detail.xml @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2009 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. +--> + +<com.android.dialer.widget.AnchoredScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:ex="http://schemas.android.com/apk/res/com.android.dialer" + android:layout_width="match_parent" + android:layout_height="match_parent" + ex:anchorView="@+id/photo_text_bar_dummy" + ex:anchoredView="@+id/controls" > + + <RelativeLayout + android:id="@+id/call_stats_detail" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone" > + + <!-- This layout defines the position of the scroll anchor. + Sizes are supposed to match their counterpart in controls --> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_alignParentTop="true" > + + <!-- Contact photo placeholder --> + <com.android.contacts.common.widget.ProportionalLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:id="@+id/photo_dummy" + ex:direction="widthToHeight" + ex:ratio="0.25" > + + <!-- Proportional layout requires a view in it. --> + <View + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </com.android.contacts.common.widget.ProportionalLayout> + + <!-- Contact name placeholder --> + <View + android:id="@+id/photo_text_bar_dummy" + android:layout_width="match_parent" + android:layout_height="42dip" + android:layout_alignBottom="@id/photo_dummy" + android:layout_alignParentStart="true" /> + + </RelativeLayout> + + <!-- The actual details --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/controls" > + + <include layout="@layout/call_stats_detail_info" /> + </LinearLayout> + + <!-- The contents of the title block --> + + <RelativeLayout + android:id="@+id/controls" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" > + + <com.android.contacts.common.widget.ProportionalLayout + android:id="@+id/contact_background_sizer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + ex:direction="widthToHeight" + ex:ratio="0.25" > + + <ImageView + android:id="@+id/contact_background" + android:layout_width="match_parent" + android:layout_height="0dip" + android:adjustViewBounds="true" + android:scaleType="centerCrop" /> + + </com.android.contacts.common.widget.ProportionalLayout> + + <LinearLayout + android:id="@+id/separator" + android:layout_width="match_parent" + android:layout_height="1dip" + android:layout_below="@+id/contact_background_sizer" + android:background="@color/background_dialer_light" /> + + <View + android:id="@+id/photo_text_bar" + android:layout_width="match_parent" + android:layout_height="42dip" + android:layout_alignBottom="@id/contact_background_sizer" + android:layout_alignParentStart="true" + android:background="@color/call_detail_photo_bg" /> + + <ImageView + android:id="@+id/main_action" + android:layout_width="wrap_content" + android:layout_height="0dip" + android:layout_alignBottom="@id/photo_text_bar" + android:layout_alignEnd="@id/photo_text_bar" + android:layout_alignTop="@id/photo_text_bar" + android:layout_marginEnd="@dimen/call_log_outer_margin" + android:scaleType="center" /> + + <TextView + android:id="@+id/header_text" + android:layout_width="wrap_content" + android:layout_height="0dip" + android:layout_alignBottom="@id/photo_text_bar" + android:layout_alignStart="@id/photo_text_bar" + android:layout_alignTop="@id/photo_text_bar" + android:layout_marginStart="@dimen/call_detail_contact_name_margin" + android:layout_marginEnd="@dimen/call_log_inner_margin" + android:layout_toStartOf="@id/main_action" + android:gravity="center_vertical" + android:singleLine="true" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?attr/call_log_header_color" /> + + <ImageButton + android:id="@+id/main_action_push_layer" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignBottom="@id/contact_background_sizer" + android:layout_alignStart="@id/contact_background_sizer" + android:layout_alignEnd="@id/contact_background_sizer" + android:layout_alignTop="@id/contact_background_sizer" + android:background="?android:attr/selectableItemBackground" /> + + <FrameLayout + android:id="@+id/call_and_sms" + android:layout_width="match_parent" + android:layout_height="@dimen/call_log_list_item_height" + android:layout_below="@id/main_action_push_layer" + android:layout_marginBottom="@dimen/call_detail_button_spacing" + android:layout_marginTop="@dimen/call_detail_button_spacing" + android:background="@color/background_dialer_list_items" + android:gravity="center_vertical" > + + <LinearLayout + android:id="@+id/call_and_sms_main_action" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackground" + android:focusable="true" + android:orientation="horizontal" > + + <LinearLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_vertical" + android:orientation="vertical" + android:paddingStart="@dimen/call_log_indent_margin" > + + <TextView + android:id="@+id/call_and_sms_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:paddingEnd="@dimen/call_log_icon_margin" + android:singleLine="true" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?attr/call_log_primary_text_color" /> + + <TextView + android:id="@+id/call_and_sms_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:paddingEnd="@dimen/call_log_icon_margin" + android:singleLine="true" + android:textAllCaps="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="?attr/call_log_primary_text_color" /> + </LinearLayout> + + <View + android:id="@+id/call_and_sms_divider" + android:layout_width="1px" + android:layout_height="32dip" + android:layout_gravity="center_vertical" + android:background="@color/background_dialer_light" /> + + <ImageView + android:id="@+id/call_and_sms_icon" + android:layout_width="@color/call_log_voicemail_highlight_color" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackground" + android:focusable="true" + android:gravity="center" + android:paddingStart="@dimen/call_log_inner_margin" + android:paddingEnd="@dimen/call_log_outer_margin" + android:scaleType="centerInside" /> + + </LinearLayout> + + </FrameLayout> + + </RelativeLayout> + + </RelativeLayout> + +</com.android.dialer.widget.AnchoredScrollView> diff --git a/res/layout-land/dialpad_fragment.xml b/res/layout-land/dialpad_fragment.xml new file mode 100644 index 000000000..fca823519 --- /dev/null +++ b/res/layout-land/dialpad_fragment.xml @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> +<view class="com.android.dialer.dialpad.DialpadFragment$DialpadSlidingLinearLayout" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal"> + <LinearLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical"> + <!-- spacer view --> + <View + android:id="@+id/spacer" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + <view class="com.android.dialer.dialpad.DialpadFragment$HoverIgnoringLinearLayout" + android:id="@+id/top" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="3" + android:orientation="vertical" + android:paddingStart="@dimen/dialpad_horizontal_margin" + android:paddingEnd="@dimen/dialpad_horizontal_margin" + android:layoutDirection="ltr" + android:background="@color/background_dialpad"> + + <!-- Text field and possibly soft menu button above the keypad where + the digits are displayed. --> + <LinearLayout + android:id="@+id/digits_container" + android:layout_width="match_parent" + android:layout_height="0px" + android:layout_weight="@integer/dialpad_layout_weight_digits" + android:gravity="center" + android:background="@color/background_digits_dialpad"> + + <com.android.dialer.dialpad.DigitsEditText + android:id="@+id/digits" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="match_parent" + android:paddingLeft="10dp" + android:gravity="center" + android:scrollHorizontally="true" + android:singleLine="true" + android:textAppearance="@style/DialtactsDigitsTextAppearance" + android:textColor="@color/dialpad_text_color" + android:textCursorDrawable="@null" + android:fontFamily="sans-serif-light" + android:nextFocusRight="@+id/overflow_menu" + android:background="@android:color/transparent" /> + + <ImageButton + android:id="@+id/deleteButton" + android:layout_width="56dip" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:gravity="center" + android:state_enabled="false" + android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/description_delete_button" + android:src="@drawable/ic_dial_action_delete" /> + + <!-- recipients replaces digits and deleteButton when + dial conference controls are made visible. --> + <EditText + android:id="@+id/recipients" + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_gravity="center" + android:layout_marginLeft="8dip" + android:layout_weight="1" + android:autoText="true" + android:background="@android:color/transparent" + android:hint="@string/to_hint" + android:maxLength="2000" + android:maxLines="3" + android:minHeight="48dip" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp" /> + </LinearLayout> + + <!-- Keypad section --> + <include layout="@layout/dialpad" /> + + <View style="@style/DialpadHorizontalSeparator" /> + + <!-- dialpadStub values are copied from dialpad.xml. dialpadStub replaces dialpad when + dial conference controls are made visible. --> + <View + android:id="@+id/dialpadStub" + android:layout_width="match_parent" + android:layout_height="0px" + android:layout_gravity="center_horizontal" + android:layout_marginTop="@dimen/dialpad_vertical_margin" + android:layout_weight="@integer/dialpad_layout_weight_dialpad" + android:background="@drawable/dialpad_background" + android:paddingBottom="10dip" + android:paddingLeft="5dip" + android:paddingRight="5dip" /> + + <!-- "Dialpad chooser" UI, shown only when the user brings up the + Dialer while a call is already in progress. + When this UI is visible, the other Dialer elements + (the textfield/button and the dialpad) are hidden. --> + <ListView android:id="@+id/dialpadChooser" + android:layout_width="match_parent" + android:layout_height="1dip" + android:layout_weight="1" /> + </view> + </LinearLayout> + <View + android:layout_height="match_parent" + android:layout_width="2dp" + android:background="#66000000" /> + <LinearLayout + android:id="@+id/dialButtonContainer" + android:layout_width="@dimen/fake_action_bar_height" + android:layout_height="match_parent" + android:orientation="vertical" + android:background="@color/dialpad_call_button_color" + android:layoutDirection="locale"> + <ImageButton + android:id="@+id/overflow_menu_on_dialpad" + android:layout_height="@dimen/fake_menu_button_min_width" + android:layout_width="match_parent" + android:layout_gravity="top|center_horizontal" + android:background="@drawable/btn_call" + android:src="@drawable/ic_menu_overflow_lt" + android:contentDescription="@string/action_menu_overflow_description" /> + <ImageButton + android:id="@+id/dialButton" + android:layout_width="match_parent" + android:layout_weight="1" + android:layout_height="0dp" + android:layout_gravity="center" + android:state_enabled="false" + android:background="@drawable/btn_call" + android:contentDescription="@string/description_dial_button" + android:src="@drawable/ic_dial_action_call" /> + <ImageButton + android:id="@+id/call_history_on_dialpad_button" + android:layout_height="@dimen/fake_menu_button_min_width" + android:layout_width="match_parent" + android:layout_gravity="bottom|center_horizontal" + android:background="@drawable/btn_call" + android:contentDescription="@string/action_menu_call_history_description" + android:src="@drawable/ic_menu_history_lt"/> + <!-- src for image for the button will be changed dynamically in the code. + See DialpadFragment.--> + <ImageButton + android:id="@+id/dialConferenceButton" + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1" + android:layout_gravity="center" + android:state_enabled="false" + android:background="@drawable/btn_call" + android:contentDescription="@string/description_dial_button" + android:src="@drawable/ic_add_group_holo_dark" /> + </LinearLayout> +</view> diff --git a/res/layout-land/dialtacts_activity.xml b/res/layout-land/dialtacts_activity.xml new file mode 100644 index 000000000..f7737ebbe --- /dev/null +++ b/res/layout-land/dialtacts_activity.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:focusable="true" + android:focusableInTouchMode="true" + android:clipChildren="false" + android:id="@+id/dialtacts_container"> + <!-- Overlapping dialpad fragment is inserted here --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal"> + <LinearLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:clipChildren="false" + android:orientation="vertical"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/search_view_container" + android:orientation="vertical"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:paddingLeft="16dp" + android:paddingRight="23dp" + android:background="@color/searchbox_background_color" + android:gravity="center_vertical"> + <EditText + android:id="@+id/search_view" + android:layout_width="0dp" + android:layout_height="56dp" + android:layout_weight="1" + android:textSize="@dimen/search_text_size" + android:inputType="textFilter" /> + <ImageView + android:id="@+id/search_close_button" + android:layout_height="40dp" + android:layout_width="40dp" + android:padding="6dp" + android:src="@drawable/ic_close_dk" + android:clickable="true" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" /> + <ImageView + android:id="@+id/voice_search_button" + android:layout_height="40dp" + android:layout_width="40dp" + android:padding="3dp" + android:src="@drawable/ic_voice_search" + android:clickable="true" + android:contentDescription="@string/description_start_voice_search" + android:background="?android:attr/selectableItemBackground" /> + </LinearLayout> + <View + android:id="@+id/searchbox_divider" + android:layout_height="1dp" + android:layout_width="match_parent" + android:background="@color/background_dialer_light" /> + </LinearLayout> + <FrameLayout + android:layout_height="0dp" + android:layout_weight="1" + android:layout_width="match_parent" + android:id="@+id/dialtacts_frame" + android:clipChildren="false"> + </FrameLayout> + <View + android:id="@+id/dialtacts_bottom_padding" + android:layout_width="match_parent" + android:layout_height="?android:attr/actionBarSize" + android:visibility="gone" /> + </LinearLayout> + <View + android:layout_height="match_parent" + android:layout_width="2dp" + android:background="@color/dialtacts_frame_color" /> + <FrameLayout + android:layout_height="match_parent" + android:layout_width="@dimen/fake_action_bar_height" + android:id="@+id/fake_action_bar" + android:background="@color/actionbar_background_color"> + <ImageButton + android:id="@+id/call_history_button" + android:layout_width="@dimen/fake_menu_button_min_width" + android:layout_height="@dimen/fake_menu_button_min_width" + android:layout_gravity="bottom|center_horizontal" + android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/action_menu_call_history_description" + android:src="@drawable/ic_menu_history_dk"/> + <ImageButton + android:id="@+id/dialpad_button" + android:layout_width="@dimen/fake_menu_button_min_width" + android:layout_height="@dimen/fake_menu_button_min_width" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/action_menu_dialpad_button" + android:src="@drawable/ic_menu_dialpad_dk"/> + <ImageButton + android:id="@+id/overflow_menu" + android:layout_width="@dimen/fake_menu_button_min_width" + android:layout_height="@dimen/fake_menu_button_min_width" + android:layout_gravity="top|center_horizontal" + android:src="@drawable/ic_menu_overflow_dk" + android:contentDescription="@string/action_menu_overflow_description" + android:background="?android:attr/selectableItemBackground"/> + </FrameLayout> + </LinearLayout> +</FrameLayout> |