Add half sheet apk to nearby
Test: start activity show avaiable device to pairing click connect to
start pairing process pair success
Bug: 202335820
Change-Id: I454527f11a396ecf8acd55649dc740ed2d09c6fc
diff --git a/nearby/halfsheet/res/values/colors.xml b/nearby/halfsheet/res/values/colors.xml
new file mode 100644
index 0000000..2a2ed41
--- /dev/null
+++ b/nearby/halfsheet/res/values/colors.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Use original background color -->
+ <color name="fast_pair_notification_background">#00000000</color>
+ <color name="fast_pair_half_sheet_button_color">@android:color/system_accent1_100</color>
+ <color name="fast_pair_half_sheet_button_text">@android:color/system_neutral1_900</color>
+ <color name="fast_pair_half_sheet_button_accent_text">@android:color/system_neutral1_900</color>
+ <color name="fast_pair_progress_color">@android:color/system_accent1_600</color>
+ <color name="fast_pair_half_sheet_subtitle_color">@android:color/system_neutral2_700</color>
+ <color name="fast_pair_half_sheet_text_color">@android:color/system_neutral1_900</color>
+
+ <!-- Nearby Discoverer -->
+ <color name="discovery_activity_accent">#4285F4</color>
+
+ <!-- Fast Pair -->
+ <color name="fast_pair_primary_text">#DE000000</color>
+ <color name="fast_pair_notification_image_outline">#24000000</color>
+ <color name="fast_pair_battery_level_low">#D93025</color>
+ <color name="fast_pair_battery_level_normal">#80868B</color>
+ <color name="fast_pair_half_sheet_background">#FFFFFF</color>
+ <color name="fast_pair_half_sheet_color_accent">#1A73E8</color>
+ <color name="fast_pair_fail_progress_color">#F44336</color>
+ <color name="fast_pair_progress_back_ground">#24000000</color>
+</resources>
diff --git a/nearby/halfsheet/res/values/dimens.xml b/nearby/halfsheet/res/values/dimens.xml
new file mode 100644
index 0000000..f843042
--- /dev/null
+++ b/nearby/halfsheet/res/values/dimens.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Fast Pair notification values -->
+ <dimen name="fast_pair_halfsheet_mid_image_size">160dp</dimen>
+ <dimen name="fast_pair_notification_text_size">14sp</dimen>
+ <dimen name="fast_pair_notification_text_size_small">11sp</dimen>
+ <dimen name="fast_pair_battery_notification_empty_view_height">4dp</dimen>
+ <dimen name="fast_pair_battery_notification_margin_top">8dp</dimen>
+ <dimen name="fast_pair_battery_notification_margin_bottom">8dp</dimen>
+ <dimen name="fast_pair_battery_notification_content_height">40dp</dimen>
+ <dimen name="fast_pair_battery_notification_content_height_v2">64dp</dimen>
+ <dimen name="fast_pair_battery_notification_image_size">32dp</dimen>
+ <dimen name="fast_pair_battery_notification_image_padding">3dp</dimen>
+ <dimen name="fast_pair_half_sheet_min_height">350dp</dimen>
+ <dimen name="fast_pair_half_sheet_image_size">215dp</dimen>
+ <dimen name="fast_pair_half_sheet_land_image_size">136dp</dimen>
+ <dimen name="fast_pair_connect_button_height">36dp</dimen>
+ <dimen name="accessibility_required_min_touch_target_size">48dp</dimen>
+ <dimen name="fast_pair_half_sheet_battery_case_image_size">152dp</dimen>
+ <dimen name="fast_pair_half_sheet_battery_bud_image_size">100dp</dimen>
+ <integer name="half_sheet_battery_case_width_dp">156</integer>
+ <integer name="half_sheet_battery_case_height_dp">182</integer>
+
+ <!-- Maximum height for SliceView, override on slices/view/src/main/res/values/dimens.xml -->
+ <dimen name="abc_slice_large_height">360dp</dimen>
+
+ <dimen name="action_dialog_content_margin_left">16dp</dimen>
+ <dimen name="action_dialog_content_margin_top">70dp</dimen>
+ <dimen name="action_button_focused_elevation">4dp</dimen>
+ <!-- Subsequent Notification -->
+ <dimen name="fast_pair_notification_padding">4dp</dimen>
+ <dimen name="fast_pair_notification_large_image_size">32dp</dimen>
+ <dimen name="fast_pair_notification_small_image_size">32dp</dimen>
+ <!-- Battery Notification -->
+ <dimen name="fast_pair_battery_notification_main_view_padding">0dp</dimen>
+ <dimen name="fast_pair_battery_notification_title_image_margin_start">0dp</dimen>
+ <dimen name="fast_pair_battery_notification_title_text_margin_start">0dp</dimen>
+ <dimen name="fast_pair_battery_notification_title_text_margin_start_v2">0dp</dimen>
+ <dimen name="fast_pair_battery_notification_image_margin_start">0dp</dimen>
+
+ <dimen name="fast_pair_half_sheet_bottom_button_height">48dp</dimen>
+</resources>
diff --git a/nearby/halfsheet/res/values/ints.xml b/nearby/halfsheet/res/values/ints.xml
new file mode 100644
index 0000000..07bf9d2
--- /dev/null
+++ b/nearby/halfsheet/res/values/ints.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <integer name="half_sheet_slide_in_duration">250</integer>
+ <integer name="half_sheet_fade_out_duration">250</integer>
+</resources>
diff --git a/nearby/halfsheet/res/values/strings.xml b/nearby/halfsheet/res/values/strings.xml
index 22f78d7..a3a2b00 100644
--- a/nearby/halfsheet/res/values/strings.xml
+++ b/nearby/halfsheet/res/values/strings.xml
@@ -16,4 +16,9 @@
<resources>
<string name="app_name">Nearby HalfSheet Dialog</string>
+ <string name="common_done" description="After pairing process finish button text to dismiss halfsheet">Done</string>
+ <string name="common_save">Save</string>
+ <string name="common_connect" description="Button text to start connecting process">Connect</string>
+ <string name="fast_pair_app_launch_button" description="String on app launch half sheet button.">Set up</string>
+
</resources>
\ No newline at end of file
diff --git a/nearby/halfsheet/res/values/styles.xml b/nearby/halfsheet/res/values/styles.xml
new file mode 100644
index 0000000..b48da70
--- /dev/null
+++ b/nearby/halfsheet/res/values/styles.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="HalfSheetStyle" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+ <item name="android:windowFrame">@null</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowEnterAnimation">@anim/fast_pair_half_sheet_slide_in</item>
+ <item name="android:windowExitAnimation">@anim/fast_pair_half_sheet_slide_out</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:fitsSystemWindows">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+
+ <style name="HalfSheetButton" parent="@style/Widget.MaterialComponents.Button.TextButton">
+ <item name="android:textColor">@color/fast_pair_half_sheet_button_accent_text</item>
+ <item name="android:backgroundTint">@color/fast_pair_half_sheet_button_color</item>
+ <item name="android:textSize">@dimen/fast_pair_notification_text_size</item>
+ <item name="android:fontFamily">google-sans-medium</item>
+ <item name="android:textAlignment">center</item>
+ <item name="android:textAllCaps">false</item>
+ </style>
+
+ <style name="HalfSheetButtonBorderless"
+ parent="@style/Widget.MaterialComponents.Button.OutlinedButton">
+ <item name="android:textColor">@color/fast_pair_half_sheet_button_text</item>
+ <item name="android:strokeColor">@color/fast_pair_half_sheet_button_color</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:textSize">@dimen/fast_pair_notification_text_size</item>
+ <item name="android:fontFamily">google-sans-medium</item>
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textAlignment">center</item>
+ <item name="android:minHeight">@dimen/accessibility_required_min_touch_target_size</item>
+ </style>
+
+</resources>