diff options
Diffstat (limited to 'java/com/android/dialer/main/impl/bottomnav/res')
6 files changed, 204 insertions, 0 deletions
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml b/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml new file mode 100644 index 000000000..67e3f375d --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<shape + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@color/dialer_theme_color"/> + <corners android:radius="18dp"/> + <stroke android:color="@color/background_dialer_white" android:width="2dp"/> +</shape>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml new file mode 100644 index 000000000..02ba3abd5 --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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.main.impl.bottomnav.BottomNavBar + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/background_dialer_white" + android:elevation="8dp"> + + <include + android:id="@+id/speed_dial_tab" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + layout="@layout/bottom_nav_item"/> + + <include + android:id="@+id/call_log_tab" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + layout="@layout/bottom_nav_item"/> + + <include + android:id="@+id/contacts_tab" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + layout="@layout/bottom_nav_item"/> + + <include + android:id="@+id/voicemail_tab" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + layout="@layout/bottom_nav_item"/> +</com.android.dialer.main.impl.bottomnav.BottomNavBar>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml new file mode 100644 index 000000000..5dddd3de5 --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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.main.impl.bottomnav.BottomNavItem + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="80dp" + android:minHeight="56dp" + android:gravity="center" + android:background="?android:selectableItemBackgroundBorderless"> + + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/bottom_nav_item_image" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginTop="7dp"/> + + <TextView + android:id="@+id/notification_badge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|end" + android:paddingStart="6dp" + android:paddingEnd="6dp" + android:minHeight="20dp" + android:minWidth="18dp" + android:gravity="center" + android:textSize="12sp" + android:textColor="@color/dialer_primary_text_color_white" + android:background="@drawable/notification_badge" + android:fontFamily="sans-serif-medium" + android:visibility="invisible"/> + </FrameLayout> + + <TextView + android:id="@+id/bottom_nav_item_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:textSize="12sp" + android:textColor="@color/dialer_theme_color" + android:gravity="center_horizontal"/> +</com.android.dialer.main.impl.bottomnav.BottomNavItem>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml new file mode 100644 index 000000000..b858b4f8c --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<resources> + <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color> + <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color> +</resources> diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/dimens.xml b/java/com/android/dialer/main/impl/bottomnav/res/values/dimens.xml new file mode 100644 index 000000000..8fd376bda --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/values/dimens.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<resources> + <dimen name="badge_margin_length_1">10dp</dimen> + <dimen name="badge_margin_length_2">14dp</dimen> + <dimen name="badge_margin_length_3">22dp</dimen> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/strings.xml b/java/com/android/dialer/main/impl/bottomnav/res/values/strings.xml new file mode 100644 index 000000000..ca5db1f49 --- /dev/null +++ b/java/com/android/dialer/main/impl/bottomnav/res/values/strings.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<resources> + <!-- Tab text to show users their call log/call history [CHAR LIMIT=10] --> + <string name="tab_title_call_history">Recents</string> + <!-- Tab text to show users their favorite contacts that they can call in 1 click [CHAR LIMIT=10] --> + <string name="tab_title_speed_dial">Favorites</string> + <!-- Tab text to show users their voicemails [CHAR LIMIT=10] --> + <string name="tab_title_voicemail">Voicemail</string> + <!-- Tab text to show users their contacts [CHAR LIMIT=10] --> + <string name="tab_title_contacts">Contacts</string> +</resources>
\ No newline at end of file |