react-native-unit-components 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +27 -0
  2. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsEvent.kt +21 -0
  3. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +2 -1
  4. package/android/src/main/java/com/unitreactnativecomponents/visapresentation/UNGooglePayView.kt +197 -0
  5. package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
  6. package/android/src/main/res/drawable/un_add_to_googlepay_button_content.xml +54 -0
  7. package/android/src/main/res/drawable/un_black_add_to_googlepay_button_content.xml +54 -0
  8. package/android/src/main/res/drawable/un_black_googlepay_button_background.xml +6 -0
  9. package/android/src/main/res/drawable/un_black_googlepay_button_background_image.9.png +0 -0
  10. package/android/src/main/res/drawable/un_black_googlepay_button_content.xml +48 -0
  11. package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background.xml +6 -0
  12. package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
  13. package/android/src/main/res/drawable/un_black_googlepay_button_overlay.xml +12 -0
  14. package/android/src/main/res/drawable/un_border.xml +6 -0
  15. package/android/src/main/res/drawable/un_condensed_googlepay.xml +27 -0
  16. package/android/src/main/res/drawable/un_googlepay_button_background.xml +18 -0
  17. package/android/src/main/res/drawable/un_googlepay_button_background_image.9.png +0 -0
  18. package/android/src/main/res/drawable/un_googlepay_button_background_image_focused.9.png +0 -0
  19. package/android/src/main/res/drawable/un_googlepay_button_background_image_pressed.9.png +0 -0
  20. package/android/src/main/res/drawable/un_googlepay_button_content.xml +48 -0
  21. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background.xml +18 -0
  22. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image.9.png +0 -0
  23. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  24. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  25. package/android/src/main/res/drawable/un_googlepay_button_overlay.xml +11 -0
  26. package/android/src/main/res/drawable/un_ic_launcher_foreground.xml +30 -0
  27. package/android/src/main/res/drawable/un_ic_unit_logo.xml +25 -0
  28. package/android/src/main/res/drawable/un_ic_visa.xml +13 -0
  29. package/android/src/main/res/drawable-bg/un_add_to_googlepay_button_content.xml +54 -0
  30. package/android/src/main/res/drawable-bg/un_black_add_to_googlepay_button_content.xml +54 -0
  31. package/android/src/main/res/drawable-ca/un_add_to_googlepay_button_content.xml +30 -0
  32. package/android/src/main/res/drawable-ca/un_black_add_to_googlepay_button_content.xml +30 -0
  33. package/android/src/main/res/drawable-cs/un_add_to_googlepay_button_content.xml +54 -0
  34. package/android/src/main/res/drawable-cs/un_black_add_to_googlepay_button_content.xml +54 -0
  35. package/android/src/main/res/drawable-da/un_add_to_googlepay_button_content.xml +30 -0
  36. package/android/src/main/res/drawable-da/un_black_add_to_googlepay_button_content.xml +30 -0
  37. package/android/src/main/res/drawable-de/un_add_to_googlepay_button_content.xml +60 -0
  38. package/android/src/main/res/drawable-de/un_black_add_to_googlepay_button_content.xml +60 -0
  39. package/android/src/main/res/drawable-el/un_add_to_googlepay_button_content.xml +67 -0
  40. package/android/src/main/res/drawable-el/un_black_add_to_googlepay_button_content.xml +67 -0
  41. package/android/src/main/res/drawable-es/un_add_to_googlepay_button_content.xml +54 -0
  42. package/android/src/main/res/drawable-es/un_black_add_to_googlepay_button_content.xml +54 -0
  43. package/android/src/main/res/drawable-et/un_add_to_googlepay_button_content.xml +64 -0
  44. package/android/src/main/res/drawable-et/un_black_add_to_googlepay_button_content.xml +64 -0
  45. package/android/src/main/res/drawable-fi/un_add_to_googlepay_button_content.xml +39 -0
  46. package/android/src/main/res/drawable-fi/un_black_add_to_googlepay_button_content.xml +39 -0
  47. package/android/src/main/res/drawable-fr/un_add_to_googlepay_button_content.xml +54 -0
  48. package/android/src/main/res/drawable-fr/un_black_add_to_googlepay_button_content.xml +54 -0
  49. package/android/src/main/res/drawable-hr/un_add_to_googlepay_button_content.xml +54 -0
  50. package/android/src/main/res/drawable-hr/un_black_add_to_googlepay_button_content.xml +54 -0
  51. package/android/src/main/res/drawable-hu/un_add_to_googlepay_button_content.xml +64 -0
  52. package/android/src/main/res/drawable-hu/un_black_add_to_googlepay_button_content.xml +64 -0
  53. package/android/src/main/res/drawable-in/un_add_to_googlepay_button_content.xml +54 -0
  54. package/android/src/main/res/drawable-in/un_black_add_to_googlepay_button_content.xml +54 -0
  55. package/android/src/main/res/drawable-it/un_add_to_googlepay_button_content.xml +54 -0
  56. package/android/src/main/res/drawable-it/un_black_add_to_googlepay_button_content.xml +54 -0
  57. package/android/src/main/res/drawable-iw/un_add_to_googlepay_button_content.xml +41 -0
  58. package/android/src/main/res/drawable-iw/un_black_add_to_googlepay_button_content.xml +41 -0
  59. package/android/src/main/res/drawable-ja/un_add_to_googlepay_button_content.xml +54 -0
  60. package/android/src/main/res/drawable-ja/un_black_add_to_googlepay_button_content.xml +54 -0
  61. package/android/src/main/res/drawable-ko/un_add_to_googlepay_button_content.xml +54 -0
  62. package/android/src/main/res/drawable-ko/un_black_add_to_googlepay_button_content.xml +54 -0
  63. package/android/src/main/res/drawable-lt/un_add_to_googlepay_button_content.xml +70 -0
  64. package/android/src/main/res/drawable-lt/un_black_add_to_googlepay_button_content.xml +70 -0
  65. package/android/src/main/res/drawable-lv/un_add_to_googlepay_button_content.xml +61 -0
  66. package/android/src/main/res/drawable-lv/un_black_add_to_googlepay_button_content.xml +61 -0
  67. package/android/src/main/res/drawable-ms/un_add_to_googlepay_button_content.xml +54 -0
  68. package/android/src/main/res/drawable-ms/un_black_add_to_googlepay_button_content.xml +54 -0
  69. package/android/src/main/res/drawable-nb/un_add_to_googlepay_button_content.xml +30 -0
  70. package/android/src/main/res/drawable-nb/un_black_add_to_googlepay_button_content.xml +30 -0
  71. package/android/src/main/res/drawable-nl/un_add_to_googlepay_button_content.xml +58 -0
  72. package/android/src/main/res/drawable-nl/un_black_add_to_googlepay_button_content.xml +54 -0
  73. package/android/src/main/res/drawable-pl/un_add_to_googlepay_button_content.xml +30 -0
  74. package/android/src/main/res/drawable-pl/un_black_add_to_googlepay_button_content.xml +30 -0
  75. package/android/src/main/res/drawable-pt/un_add_to_googlepay_button_content.xml +54 -0
  76. package/android/src/main/res/drawable-pt/un_black_add_to_googlepay_button_content.xml +54 -0
  77. package/android/src/main/res/drawable-ro/un_add_to_googlepay_button_content.xml +58 -0
  78. package/android/src/main/res/drawable-ro/un_black_add_to_googlepay_button_content.xml +58 -0
  79. package/android/src/main/res/drawable-ru/un_add_to_googlepay_button_content.xml +54 -0
  80. package/android/src/main/res/drawable-ru/un_black_add_to_googlepay_button_content.xml +54 -0
  81. package/android/src/main/res/drawable-sk/un_add_to_googlepay_button_content.xml +54 -0
  82. package/android/src/main/res/drawable-sk/un_black_add_to_googlepay_button_content.xml +54 -0
  83. package/android/src/main/res/drawable-sl/un_add_to_googlepay_button_content.xml +54 -0
  84. package/android/src/main/res/drawable-sl/un_black_add_to_googlepay_button_content.xml +54 -0
  85. package/android/src/main/res/drawable-sr/un_add_to_googlepay_button_content.xml +54 -0
  86. package/android/src/main/res/drawable-sr/un_black_add_to_googlepay_button_content.xml +54 -0
  87. package/android/src/main/res/drawable-sv/un_add_to_googlepay_button_content.xml +30 -0
  88. package/android/src/main/res/drawable-sv/un_black_add_to_googlepay_button_content.xml +30 -0
  89. package/android/src/main/res/drawable-th/un_add_to_googlepay_button_content.xml +54 -0
  90. package/android/src/main/res/drawable-th/un_black_add_to_googlepay_button_content.xml +54 -0
  91. package/android/src/main/res/drawable-tr/un_add_to_googlepay_button_content.xml +54 -0
  92. package/android/src/main/res/drawable-tr/un_black_add_to_googlepay_button_content.xml +54 -0
  93. package/android/src/main/res/drawable-uk/un_add_to_googlepay_button_content.xml +54 -0
  94. package/android/src/main/res/drawable-uk/un_black_add_to_googlepay_button_content.xml +54 -0
  95. package/android/src/main/res/drawable-v21/un_black_googlepay_button_background.xml +7 -0
  96. package/android/src/main/res/drawable-v21/un_black_googlepay_button_background_image.9.png +0 -0
  97. package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background.xml +7 -0
  98. package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
  99. package/android/src/main/res/drawable-v24/ic_launcher_background.xml +170 -0
  100. package/android/src/main/res/drawable-v24/un_border.xml +6 -0
  101. package/android/src/main/res/drawable-v24/un_ic_launcher_foreground.xml +30 -0
  102. package/android/src/main/res/drawable-v24/un_ic_unit_logo.xml +25 -0
  103. package/android/src/main/res/drawable-v24/un_ic_visa.xml +13 -0
  104. package/android/src/main/res/drawable-zh/un_add_to_googlepay_button_content.xml +54 -0
  105. package/android/src/main/res/drawable-zh/un_black_add_to_googlepay_button_content.xml +54 -0
  106. package/android/src/main/res/layout/un_black_add_to_googlepay_button.xml +32 -0
  107. package/android/src/main/res/layout/un_view_google_push_provisioning.xml +45 -0
  108. package/android/src/main/res/layout/un_white_add_to_googlepay_button.xml +31 -0
  109. package/android/src/main/res/layout/un_white_add_to_googlepay_button_no_shadow.xml +31 -0
  110. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  111. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  112. package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  113. package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  114. package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  115. package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  116. package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_background_image.9.png +0 -0
  117. package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  118. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image.9.png +0 -0
  119. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_focused.9.png +0 -0
  120. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  121. package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  122. package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  123. package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  124. package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  125. package/android/src/main/res/mipmap-xhdpi/white_googlepay_button_no_shadow_background_image.9.png +0 -0
  126. package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_background_image.9.png +0 -0
  127. package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  128. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image.9.png +0 -0
  129. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_focused.9.png +0 -0
  130. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  131. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
  132. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  133. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  134. package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  135. package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  136. package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_background_image.9.png +0 -0
  137. package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  138. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image.9.png +0 -0
  139. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_focused.9.png +0 -0
  140. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  141. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
  142. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  143. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  144. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  145. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  146. package/android/src/main/res/values/colors.xml +14 -0
  147. package/android/src/main/res/values/googlepay_strings.xml +7 -0
  148. package/android/src/main/res/values/strings.xml +4 -0
  149. package/android/src/main/res/values/themes.xml +16 -0
  150. package/android/src/main/res/values-night/themes.xml +16 -0
  151. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +8 -8
  152. package/ios/UnitReactNativeComponentsViewManager.m +3 -2
  153. package/ios/UnitReactNativeComponentsViewManager.swift +39 -25
  154. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +1 -1
  155. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  156. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +1 -1
  157. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  158. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +39 -6
  159. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  160. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +1 -1
  161. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  162. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +7 -6
  163. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
  164. package/lib/commonjs/messages/webMessages/pageMessage.js.map +1 -1
  165. package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js +13 -0
  166. package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
  167. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
  168. package/lib/commonjs/webComponent/WebComponent.js +14 -2
  169. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  170. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +1 -1
  171. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  172. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +1 -1
  173. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  174. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +37 -5
  175. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  176. package/lib/module/components/UNCardComponent/UNCardComponent.js +1 -1
  177. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  178. package/lib/module/helpers/BottomSheet/BottomSheet.js +7 -6
  179. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
  180. package/lib/module/messages/webMessages/pageMessage.js.map +1 -1
  181. package/lib/module/nativeComponent/UNNativeAddToWalletButton.js +4 -0
  182. package/lib/module/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
  183. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
  184. package/lib/module/webComponent/WebComponent.js +14 -2
  185. package/lib/module/webComponent/WebComponent.js.map +1 -1
  186. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +6 -0
  187. package/lib/typescript/helpers/BottomSheet/BottomSheet.d.ts +2 -0
  188. package/lib/typescript/nativeComponent/UNNativeAddToWalletButton.d.ts +6 -0
  189. package/lib/typescript/unitSdkManager/UnitSdkManager.d.ts +1 -1
  190. package/lib/typescript/webComponent/WebComponent.d.ts +3 -2
  191. package/package.json +1 -1
  192. package/src/components/UNActivityComponent/UNActivityComponent.tsx +1 -1
  193. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +1 -1
  194. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +35 -4
  195. package/src/components/UNCardComponent/UNCardComponent.tsx +1 -1
  196. package/src/helpers/BottomSheet/BottomSheet.tsx +7 -5
  197. package/src/messages/webMessages/pageMessage.ts +1 -1
  198. package/src/nativeComponent/UNNativeAddToWalletButton.tsx +12 -0
  199. package/src/unitSdkManager/UnitSdkManager.ts +1 -1
  200. package/src/webComponent/WebComponent.tsx +16 -4
  201. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsViewManager.kt +0 -19
  202. package/lib/commonjs/nativeComponenet/NativeComponentExample.js +0 -19
  203. package/lib/commonjs/nativeComponenet/NativeComponentExample.js.map +0 -1
  204. package/lib/module/nativeComponenet/NativeComponentExample.js +0 -10
  205. package/lib/module/nativeComponenet/NativeComponentExample.js.map +0 -1
  206. package/lib/typescript/nativeComponenet/NativeComponentExample.d.ts +0 -7
  207. package/src/nativeComponenet/NativeComponentExample.tsx +0 -26
@@ -0,0 +1,27 @@
1
+ package com.unitreactnativecomponents
2
+ import com.facebook.react.common.MapBuilder
3
+ import com.facebook.react.uimanager.SimpleViewManager
4
+ import com.facebook.react.uimanager.ThemedReactContext
5
+ import com.facebook.react.uimanager.UIManagerHelper
6
+ import com.unitreactnativecomponents.visapresentation.UNGooglePayView
7
+
8
+
9
+ class UnitAddToWalletButtonViewManager : SimpleViewManager<UNGooglePayView>() {
10
+ override fun getName() = "UnitAddToWalletButtonView"
11
+
12
+ override fun createViewInstance(reactContext: ThemedReactContext): UNGooglePayView {
13
+ val unGooglePayView = UNGooglePayView(reactContext)
14
+ unGooglePayView.onAddToWalletClicked {
15
+ val surfaceId = UIManagerHelper.getSurfaceId(reactContext)
16
+ UIManagerHelper.getEventDispatcherForReactTag(reactContext, unGooglePayView.id)
17
+ ?.dispatchEvent(UnitReactNativeComponentsEvent(surfaceId, unGooglePayView.id))
18
+ }
19
+ return unGooglePayView
20
+ }
21
+
22
+ override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any> {
23
+ return MapBuilder.of(
24
+ "onAddToWalletClicked", MapBuilder.of("registrationName","onAddToWalletClicked")
25
+ )
26
+ }
27
+ }
@@ -0,0 +1,21 @@
1
+ package com.unitreactnativecomponents
2
+ import com.facebook.react.bridge.Arguments
3
+ import com.facebook.react.bridge.WritableMap
4
+ import com.facebook.react.uimanager.events.Event
5
+
6
+ class UnitReactNativeComponentsEvent (surfaceId: Int, viewTag: Int) : Event<UnitReactNativeComponentsEvent>() {
7
+ private val kEventName = "onAddToWalletClicked"
8
+
9
+ init {
10
+ super.init(surfaceId, viewTag)
11
+ }
12
+
13
+ override fun getEventData(): WritableMap? {
14
+ //empty data response
15
+ return Arguments.createMap();
16
+ }
17
+
18
+ override fun getEventName(): String {
19
+ return kEventName
20
+ }
21
+ }
@@ -11,6 +11,7 @@ class UnitReactNativeComponentsPackage : ReactPackage {
11
11
  }
12
12
 
13
13
  override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
14
- return listOf(UnitReactNativeComponentsViewManager())
14
+ return listOf(UnitAddToWalletButtonViewManager())
15
15
  }
16
+
16
17
  }
@@ -0,0 +1,197 @@
1
+ package com.unitreactnativecomponents.visapresentation
2
+
3
+ import android.content.Context
4
+ import android.content.res.Configuration
5
+ import android.util.AttributeSet
6
+ import android.view.LayoutInflater
7
+ import android.view.View
8
+ import android.widget.ImageView
9
+ import android.widget.RelativeLayout
10
+ import android.widget.TextView
11
+ import com.unitreactnativecomponents.R
12
+
13
+ /**
14
+ * This theme enum outlines the background color of your activity
15
+ */
16
+ enum class UNGooglePayButtonTheme {
17
+ Dark,
18
+ Colorful,
19
+ Light;
20
+ }
21
+
22
+ /**
23
+ * This style enum outlines the desired style for your button(Outlined can be applied only with a 'Dark' or 'Colorful' theme)
24
+ */
25
+ enum class UNGooglePayButtonStyle {
26
+ Regular,
27
+ Outlined;
28
+ }
29
+
30
+ /**
31
+ * A class that was created to make Google's branding review implementation easier for Unit customers.
32
+ */
33
+
34
+ class UNGooglePayView @JvmOverloads constructor(
35
+ context: Context,
36
+ attrs: AttributeSet? = null,
37
+ defStyleAttr: Int = 0
38
+ ) : RelativeLayout(context, attrs, defStyleAttr) {
39
+
40
+ private var whiteAddToGooglePayButtonNoShadow: RelativeLayout
41
+ private var blackAddToGooglePayButton: RelativeLayout
42
+ private var whiteAddToGooglePayButton: RelativeLayout
43
+ private var viewLayout: RelativeLayout
44
+ private var onAddToWalletClicked: (() -> Unit)? = null
45
+ private var shouldSetThemeAccordingToSystemTheme = false
46
+ private var isDarkMode = false
47
+
48
+
49
+
50
+ /**
51
+ * This variable holds the style of the 'Add To GPay button'.
52
+ * when it is set it will redisplay the button if it is necessary.
53
+ */
54
+ private var currentStyle: UNGooglePayButtonStyle = UNGooglePayButtonStyle.Regular
55
+ set(value) {
56
+ val hasChanged = field != value
57
+ field = value
58
+ if (hasChanged) {
59
+ display()
60
+ }
61
+ }
62
+
63
+ /**
64
+ * This variable holds the theme of the app's background color.
65
+ * when it is set it will redisplay the button if it is necessary.
66
+ */
67
+ private var currentTheme: UNGooglePayButtonTheme = UNGooglePayButtonTheme.Light
68
+ set(value) {
69
+ val hasChanged = field != value
70
+ field = value
71
+ if (hasChanged) {
72
+ display()
73
+ }
74
+ }
75
+
76
+ init {
77
+ val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
78
+ inflater.inflate(R.layout.un_view_google_push_provisioning, this)
79
+
80
+ whiteAddToGooglePayButtonNoShadow =
81
+ findViewById(R.id.white_add_to_googlepay_button_no_shadow)
82
+ blackAddToGooglePayButton = findViewById(R.id.black_add_to_googlepay_button)
83
+ whiteAddToGooglePayButton = findViewById(R.id.white_add_to_googlepay_button)
84
+ viewLayout = findViewById(R.id.google_view_push_provisioning_layout)
85
+
86
+ blackAddToGooglePayButton.setOnClickListener {
87
+ onAddToWalletClicked?.invoke()
88
+ }
89
+
90
+ whiteAddToGooglePayButton.setOnClickListener {
91
+ onAddToWalletClicked?.invoke()
92
+ }
93
+
94
+ showAddToGooglePlayButton(blackAddToGooglePayButton)
95
+ }
96
+
97
+ fun setStyle(style: UNGooglePayButtonStyle) {
98
+ this.currentStyle = style
99
+ }
100
+
101
+ fun setTheme(theme: UNGooglePayButtonTheme) {
102
+ setThemeAccordingToSystemTheme(false)
103
+ this.currentTheme = theme
104
+ }
105
+
106
+ fun onAddToWalletClicked(callback: () -> Unit) {
107
+ onAddToWalletClicked = callback
108
+ }
109
+
110
+ /**
111
+ * This method will remove all the views related to this class off the screen.
112
+ */
113
+ fun clearGooglePayViews() {
114
+ viewLayout.visibility = INVISIBLE
115
+ whiteAddToGooglePayButtonNoShadow.visibility = INVISIBLE
116
+ blackAddToGooglePayButton.visibility = INVISIBLE
117
+ whiteAddToGooglePayButton.visibility = INVISIBLE
118
+ }
119
+
120
+ /**
121
+ * This private method will display the view according to night mode or it's theme and style.
122
+ */
123
+ private fun display() {
124
+ clearGooglePayViews()
125
+ viewLayout.visibility = VISIBLE
126
+ if (shouldSetThemeAccordingToSystemTheme) {
127
+ showAddToGooglePlayButtonByUserUiMode()
128
+ } else {
129
+ updateViewsAccordingToThemeAndStyle()
130
+ }
131
+ }
132
+
133
+ private fun updateViewsAccordingToThemeAndStyle() {
134
+ when (currentTheme) {
135
+ UNGooglePayButtonTheme.Light -> {
136
+ when (currentStyle) {
137
+ UNGooglePayButtonStyle.Regular -> {
138
+ showAddToGooglePlayButton(blackAddToGooglePayButton)
139
+ }
140
+ UNGooglePayButtonStyle.Outlined -> {
141
+ showAddToGooglePlayButton(whiteAddToGooglePayButtonNoShadow)
142
+ }
143
+ }
144
+ }
145
+ UNGooglePayButtonTheme.Dark, UNGooglePayButtonTheme.Colorful -> {
146
+ when (currentStyle) {
147
+ UNGooglePayButtonStyle.Regular -> {
148
+ showAddToGooglePlayButton(whiteAddToGooglePayButton)
149
+ }
150
+ else -> {
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+
157
+ /**
158
+ * This method will determine the 'Add to GPay' button theme according to the mobile phone's Night mode if it is set to 'true'.
159
+ */
160
+ fun setThemeAccordingToSystemTheme(shouldSetThemeAccordingToSystemTheme: Boolean) {
161
+ this.shouldSetThemeAccordingToSystemTheme = shouldSetThemeAccordingToSystemTheme
162
+ updateViewAccordingToSystemIfNeeded()
163
+ }
164
+
165
+ fun updateThemeAccordingToSystem() {
166
+ updateViewAccordingToSystemIfNeeded()
167
+ }
168
+
169
+ private fun updateViewAccordingToSystemIfNeeded() {
170
+ if (shouldSetThemeAccordingToSystemTheme) {
171
+ changeThemeAccordingToSystem()
172
+ }
173
+ }
174
+
175
+ private fun changeThemeAccordingToSystem() {
176
+ when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
177
+ Configuration.UI_MODE_NIGHT_YES -> {
178
+ isDarkMode = true
179
+ currentTheme = UNGooglePayButtonTheme.Dark
180
+ }
181
+
182
+ Configuration.UI_MODE_NIGHT_NO -> {
183
+ isDarkMode = false
184
+ currentTheme = UNGooglePayButtonTheme.Light
185
+ }
186
+ }
187
+ }
188
+
189
+ private fun showAddToGooglePlayButtonByUserUiMode() {
190
+ val buttonType = if (isDarkMode) whiteAddToGooglePayButton else blackAddToGooglePayButton
191
+ showAddToGooglePlayButton(buttonType)
192
+ }
193
+
194
+ private fun showAddToGooglePlayButton(button: RelativeLayout) {
195
+ button.visibility = VISIBLE
196
+ }
197
+ }
@@ -0,0 +1,170 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path
8
+ android:fillColor="#3DDC84"
9
+ android:pathData="M0,0h108v108h-108z" />
10
+ <path
11
+ android:fillColor="#00000000"
12
+ android:pathData="M9,0L9,108"
13
+ android:strokeWidth="0.8"
14
+ android:strokeColor="#33FFFFFF" />
15
+ <path
16
+ android:fillColor="#00000000"
17
+ android:pathData="M19,0L19,108"
18
+ android:strokeWidth="0.8"
19
+ android:strokeColor="#33FFFFFF" />
20
+ <path
21
+ android:fillColor="#00000000"
22
+ android:pathData="M29,0L29,108"
23
+ android:strokeWidth="0.8"
24
+ android:strokeColor="#33FFFFFF" />
25
+ <path
26
+ android:fillColor="#00000000"
27
+ android:pathData="M39,0L39,108"
28
+ android:strokeWidth="0.8"
29
+ android:strokeColor="#33FFFFFF" />
30
+ <path
31
+ android:fillColor="#00000000"
32
+ android:pathData="M49,0L49,108"
33
+ android:strokeWidth="0.8"
34
+ android:strokeColor="#33FFFFFF" />
35
+ <path
36
+ android:fillColor="#00000000"
37
+ android:pathData="M59,0L59,108"
38
+ android:strokeWidth="0.8"
39
+ android:strokeColor="#33FFFFFF" />
40
+ <path
41
+ android:fillColor="#00000000"
42
+ android:pathData="M69,0L69,108"
43
+ android:strokeWidth="0.8"
44
+ android:strokeColor="#33FFFFFF" />
45
+ <path
46
+ android:fillColor="#00000000"
47
+ android:pathData="M79,0L79,108"
48
+ android:strokeWidth="0.8"
49
+ android:strokeColor="#33FFFFFF" />
50
+ <path
51
+ android:fillColor="#00000000"
52
+ android:pathData="M89,0L89,108"
53
+ android:strokeWidth="0.8"
54
+ android:strokeColor="#33FFFFFF" />
55
+ <path
56
+ android:fillColor="#00000000"
57
+ android:pathData="M99,0L99,108"
58
+ android:strokeWidth="0.8"
59
+ android:strokeColor="#33FFFFFF" />
60
+ <path
61
+ android:fillColor="#00000000"
62
+ android:pathData="M0,9L108,9"
63
+ android:strokeWidth="0.8"
64
+ android:strokeColor="#33FFFFFF" />
65
+ <path
66
+ android:fillColor="#00000000"
67
+ android:pathData="M0,19L108,19"
68
+ android:strokeWidth="0.8"
69
+ android:strokeColor="#33FFFFFF" />
70
+ <path
71
+ android:fillColor="#00000000"
72
+ android:pathData="M0,29L108,29"
73
+ android:strokeWidth="0.8"
74
+ android:strokeColor="#33FFFFFF" />
75
+ <path
76
+ android:fillColor="#00000000"
77
+ android:pathData="M0,39L108,39"
78
+ android:strokeWidth="0.8"
79
+ android:strokeColor="#33FFFFFF" />
80
+ <path
81
+ android:fillColor="#00000000"
82
+ android:pathData="M0,49L108,49"
83
+ android:strokeWidth="0.8"
84
+ android:strokeColor="#33FFFFFF" />
85
+ <path
86
+ android:fillColor="#00000000"
87
+ android:pathData="M0,59L108,59"
88
+ android:strokeWidth="0.8"
89
+ android:strokeColor="#33FFFFFF" />
90
+ <path
91
+ android:fillColor="#00000000"
92
+ android:pathData="M0,69L108,69"
93
+ android:strokeWidth="0.8"
94
+ android:strokeColor="#33FFFFFF" />
95
+ <path
96
+ android:fillColor="#00000000"
97
+ android:pathData="M0,79L108,79"
98
+ android:strokeWidth="0.8"
99
+ android:strokeColor="#33FFFFFF" />
100
+ <path
101
+ android:fillColor="#00000000"
102
+ android:pathData="M0,89L108,89"
103
+ android:strokeWidth="0.8"
104
+ android:strokeColor="#33FFFFFF" />
105
+ <path
106
+ android:fillColor="#00000000"
107
+ android:pathData="M0,99L108,99"
108
+ android:strokeWidth="0.8"
109
+ android:strokeColor="#33FFFFFF" />
110
+ <path
111
+ android:fillColor="#00000000"
112
+ android:pathData="M19,29L89,29"
113
+ android:strokeWidth="0.8"
114
+ android:strokeColor="#33FFFFFF" />
115
+ <path
116
+ android:fillColor="#00000000"
117
+ android:pathData="M19,39L89,39"
118
+ android:strokeWidth="0.8"
119
+ android:strokeColor="#33FFFFFF" />
120
+ <path
121
+ android:fillColor="#00000000"
122
+ android:pathData="M19,49L89,49"
123
+ android:strokeWidth="0.8"
124
+ android:strokeColor="#33FFFFFF" />
125
+ <path
126
+ android:fillColor="#00000000"
127
+ android:pathData="M19,59L89,59"
128
+ android:strokeWidth="0.8"
129
+ android:strokeColor="#33FFFFFF" />
130
+ <path
131
+ android:fillColor="#00000000"
132
+ android:pathData="M19,69L89,69"
133
+ android:strokeWidth="0.8"
134
+ android:strokeColor="#33FFFFFF" />
135
+ <path
136
+ android:fillColor="#00000000"
137
+ android:pathData="M19,79L89,79"
138
+ android:strokeWidth="0.8"
139
+ android:strokeColor="#33FFFFFF" />
140
+ <path
141
+ android:fillColor="#00000000"
142
+ android:pathData="M29,19L29,89"
143
+ android:strokeWidth="0.8"
144
+ android:strokeColor="#33FFFFFF" />
145
+ <path
146
+ android:fillColor="#00000000"
147
+ android:pathData="M39,19L39,89"
148
+ android:strokeWidth="0.8"
149
+ android:strokeColor="#33FFFFFF" />
150
+ <path
151
+ android:fillColor="#00000000"
152
+ android:pathData="M49,19L49,89"
153
+ android:strokeWidth="0.8"
154
+ android:strokeColor="#33FFFFFF" />
155
+ <path
156
+ android:fillColor="#00000000"
157
+ android:pathData="M59,19L59,89"
158
+ android:strokeWidth="0.8"
159
+ android:strokeColor="#33FFFFFF" />
160
+ <path
161
+ android:fillColor="#00000000"
162
+ android:pathData="M69,19L69,89"
163
+ android:strokeWidth="0.8"
164
+ android:strokeColor="#33FFFFFF" />
165
+ <path
166
+ android:fillColor="#00000000"
167
+ android:pathData="M79,19L79,89"
168
+ android:strokeWidth="0.8"
169
+ android:strokeColor="#33FFFFFF" />
170
+ </vector>
@@ -0,0 +1,54 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="91dp"
3
+ android:height="17dp"
4
+ android:viewportWidth="91"
5
+ android:viewportHeight="17">
6
+ <path
7
+ android:pathData="M3.976,2.976L5.768,2.976L9.534,13L7.798,13L6.902,10.438L2.856,10.438L1.946,13L0.21,13L3.976,2.976ZM6.37,8.982L5.306,6L4.914,4.838L4.83,4.838L4.438,6L3.374,8.982L6.37,8.982ZM13.632,13.224C12.988,13.224 12.4047,13.0607 11.882,12.734C11.3593,12.4073 10.9463,11.957 10.643,11.383C10.3397,10.809 10.188,10.158 10.188,9.43C10.188,8.702 10.3397,8.051 10.643,7.477C10.9463,6.903 11.3593,6.4527 11.882,6.126C12.4047,5.7993 12.988,5.636 13.632,5.636C14.136,5.636 14.5887,5.748 14.99,5.972C15.3913,6.196 15.6947,6.4713 15.9,6.798L15.97,6.798L15.9,5.79L15.9,2.976L17.44,2.976L17.44,13L15.97,13L15.97,12.076L15.9,12.076C15.6947,12.3933 15.3913,12.664 14.99,12.888C14.5887,13.112 14.136,13.224 13.632,13.224ZM13.856,11.81C14.2293,11.81 14.577,11.712 14.899,11.516C15.221,11.32 15.48,11.04 15.676,10.676C15.872,10.312 15.97,9.8967 15.97,9.43C15.97,8.9633 15.872,8.5503 15.676,8.191C15.48,7.8317 15.221,7.554 14.899,7.358C14.577,7.162 14.2293,7.064 13.856,7.064C13.4827,7.064 13.1327,7.162 12.806,7.358C12.4793,7.554 12.218,7.8317 12.022,8.191C11.826,8.5503 11.728,8.9633 11.728,9.43C11.728,9.8967 11.826,10.312 12.022,10.676C12.218,11.04 12.4793,11.32 12.806,11.516C13.1327,11.712 13.4827,11.81 13.856,11.81ZM22.364,13.224C21.72,13.224 21.1367,13.0607 20.614,12.734C20.0913,12.4073 19.6783,11.957 19.375,11.383C19.0717,10.809 18.92,10.158 18.92,9.43C18.92,8.702 19.0717,8.051 19.375,7.477C19.6783,6.903 20.0913,6.4527 20.614,6.126C21.1367,5.7993 21.72,5.636 22.364,5.636C22.868,5.636 23.3207,5.748 23.722,5.972C24.1233,6.196 24.4267,6.4713 24.632,6.798L24.702,6.798L24.632,5.79L24.632,2.976L26.172,2.976L26.172,13L24.702,13L24.702,12.076L24.632,12.076C24.4267,12.3933 24.1233,12.664 23.722,12.888C23.3207,13.112 22.868,13.224 22.364,13.224ZM22.588,11.81C22.9613,11.81 23.309,11.712 23.631,11.516C23.953,11.32 24.212,11.04 24.408,10.676C24.604,10.312 24.702,9.8967 24.702,9.43C24.702,8.9633 24.604,8.5503 24.408,8.191C24.212,7.8317 23.953,7.554 23.631,7.358C23.309,7.162 22.9613,7.064 22.588,7.064C22.2147,7.064 21.8647,7.162 21.538,7.358C21.2113,7.554 20.95,7.8317 20.754,8.191C20.558,8.5503 20.46,8.9633 20.46,9.43C20.46,9.8967 20.558,10.312 20.754,10.676C20.95,11.04 21.2113,11.32 21.538,11.516C21.8647,11.712 22.2147,11.81 22.588,11.81ZM34.466,13.112C34.1487,13.112 33.85,13.0607 33.57,12.958C33.29,12.8553 33.0613,12.72 32.884,12.552C32.4827,12.1507 32.282,11.6047 32.282,10.914L32.282,7.218L31.036,7.218L31.036,5.86L32.282,5.86L32.282,3.844L33.822,3.844L33.822,5.86L35.558,5.86L35.558,7.218L33.822,7.218L33.822,10.578C33.822,10.9607 33.8967,11.2313 34.046,11.39C34.186,11.5767 34.4287,11.67 34.774,11.67C34.9327,11.67 35.0727,11.649 35.194,11.607C35.3153,11.565 35.446,11.4973 35.586,11.404L35.586,12.902C35.278,13.042 34.9047,13.112 34.466,13.112ZM40.244,13.224C39.5253,13.224 38.8813,13.0583 38.312,12.727C37.7427,12.3957 37.2993,11.9407 36.982,11.362C36.6647,10.7833 36.506,10.1393 36.506,9.43C36.506,8.7207 36.6647,8.0767 36.982,7.498C37.2993,6.9193 37.7427,6.4643 38.312,6.133C38.8813,5.8017 39.5253,5.636 40.244,5.636C40.9627,5.636 41.6067,5.804 42.176,6.14C42.7453,6.476 43.1887,6.9333 43.506,7.512C43.8233,8.0907 43.982,8.73 43.982,9.43C43.982,10.1393 43.8233,10.7833 43.506,11.362C43.1887,11.9407 42.7453,12.3957 42.176,12.727C41.6067,13.0583 40.9627,13.224 40.244,13.224ZM40.244,11.81C40.636,11.81 41,11.7143 41.336,11.523C41.672,11.3317 41.9403,11.0563 42.141,10.697C42.3417,10.3377 42.442,9.9153 42.442,9.43C42.442,8.9447 42.3417,8.5247 42.141,8.17C41.9403,7.8153 41.672,7.5423 41.336,7.351C41,7.1597 40.636,7.064 40.244,7.064C39.852,7.064 39.488,7.1597 39.152,7.351C38.816,7.5423 38.5477,7.8153 38.347,8.17C38.1463,8.5247 38.046,8.9447 38.046,9.43C38.046,9.9153 38.1463,10.3377 38.347,10.697C38.5477,11.0563 38.816,11.3317 39.152,11.523C39.488,11.7143 39.852,11.81 40.244,11.81Z"
8
+ android:strokeWidth="1"
9
+ android:fillColor="#3C4043"
10
+ android:fillType="evenOdd"
11
+ android:strokeColor="#00000000"/>
12
+ <path
13
+ android:pathData="M69.526,2.6348L69.526,6.7179L72.0439,6.7179C72.6438,6.7179 73.1398,6.5163 73.5322,6.1131C73.9348,5.7109 74.1367,5.2312 74.1367,4.6759C74.1367,4.1318 73.9348,3.6577 73.5322,3.2545C73.1398,2.841 72.6438,2.6339 72.0439,2.6339L69.526,2.6339L69.526,2.6348ZM69.526,8.1551L69.526,12.8914L68.0218,12.8914L68.0218,1.1976L72.0112,1.1976C73.0249,1.1976 73.8854,1.5354 74.5945,2.2102C75.3139,2.8849 75.6736,3.7071 75.6736,4.6759C75.6736,5.667 75.3139,6.4948 74.5945,7.1584C73.8965,7.8228 73.0351,8.1542 72.0112,8.1542L69.526,8.1542L69.526,8.1551Z"
14
+ android:strokeWidth="1"
15
+ android:fillColor="#5F6368"
16
+ android:fillType="evenOdd"
17
+ android:strokeColor="#00000000"/>
18
+ <path
19
+ android:pathData="M77.1936,10.4416C77.1936,10.8336 77.3599,11.1602 77.6926,11.4215C78.0251,11.6828 78.4147,11.8135 78.8614,11.8135C79.4938,11.8135 80.0572,11.5792 80.5533,11.1117C81.0495,10.6432 81.297,10.0935 81.297,9.4626C80.828,9.0921 80.174,8.9073 79.335,8.9073C78.7241,8.9073 78.2149,9.0547 77.8066,9.3487C77.3982,9.6426 77.1936,10.0058 77.1936,10.4416M79.1397,4.6273C80.2515,4.6273 81.1288,4.9241 81.7726,5.5177C82.4154,6.1112 82.7367,6.925 82.7367,7.9591L82.7367,12.8914L81.298,12.8914L81.298,11.7808L81.2325,11.7808C80.6112,12.6953 79.7825,13.1527 78.7474,13.1527C77.8645,13.1527 77.1255,12.8914 76.5321,12.3688C75.938,11.8462 75.6409,11.1929 75.6409,10.4089C75.6409,9.5811 75.9538,8.9231 76.5807,8.4332C77.2076,7.9432 78.0439,7.6978 79.0903,7.6978C79.9834,7.6978 80.7196,7.8611 81.297,8.1877L81.297,7.8443C81.297,7.3217 81.0896,6.8784 80.6758,6.5135C80.2609,6.1485 79.7769,5.9666 79.221,5.9666C78.3811,5.9666 77.7169,6.3203 77.2264,7.0286L75.9015,6.1952C76.6321,5.1499 77.7112,4.6273 79.1397,4.6273"
20
+ android:strokeWidth="1"
21
+ android:fillColor="#5F6368"
22
+ android:fillType="evenOdd"
23
+ android:strokeColor="#00000000"/>
24
+ <path
25
+ android:pathData="M90.993,4.8886l-5.0198,11.5305l-1.5529,0l1.864,-4.0345l-3.3028,-7.496l1.635,0l2.3871,5.7489l0.0327,0l2.3217,-5.7489z"
26
+ android:strokeWidth="1"
27
+ android:fillColor="#5F6368"
28
+ android:fillType="evenOdd"
29
+ android:strokeColor="#00000000"/>
30
+ <path
31
+ android:pathData="M63.448,7.1341C63.448,6.6609 63.4078,6.2045 63.3321,5.7678L56.9883,5.7678L56.9883,8.3557L60.6218,8.3557C60.4657,9.1993 59.9939,9.9171 59.2783,10.3977L59.2783,12.0785L61.4468,12.0785C62.7164,10.9082 63.448,9.1789 63.448,7.1341"
32
+ android:strokeWidth="1"
33
+ android:fillColor="#4285F4"
34
+ android:fillType="evenOdd"
35
+ android:strokeColor="#00000000"/>
36
+ <path
37
+ android:pathData="M56.9883,13.7006C58.8036,13.7006 60.3321,13.1051 61.4467,12.0785L59.2783,10.3977C58.6747,10.8037 57.8974,11.0407 56.9883,11.0407C55.2337,11.0407 53.7445,9.8592 53.2119,8.2671L50.9781,8.2671L50.9781,9.9983C52.0852,12.1933 54.3602,13.7006 56.9883,13.7006"
38
+ android:strokeWidth="1"
39
+ android:fillColor="#34A853"
40
+ android:fillType="evenOdd"
41
+ android:strokeColor="#00000000"/>
42
+ <path
43
+ android:pathData="M53.212,8.267C53.0756,7.8611 53.0008,7.428 53.0008,6.981C53.0008,6.534 53.0756,6.1009 53.212,5.695L53.212,3.9637L50.9781,3.9637C50.5203,4.8709 50.2615,5.8956 50.2615,6.981C50.2615,8.0664 50.5203,9.0912 50.9781,9.9983L53.212,8.267Z"
44
+ android:strokeWidth="1"
45
+ android:fillColor="#FABB05"
46
+ android:fillType="evenOdd"
47
+ android:strokeColor="#00000000"/>
48
+ <path
49
+ android:pathData="M56.9883,2.9213C57.9796,2.9213 58.8681,3.2619 59.5688,3.9292L59.5688,3.9302L61.4888,2.0123C60.3228,0.9278 58.8027,0.2615 56.9883,0.2615C54.3602,0.2615 52.0852,1.7687 50.9781,3.9638L53.2119,5.695C53.7445,4.1028 55.2337,2.9213 56.9883,2.9213"
50
+ android:strokeWidth="1"
51
+ android:fillColor="#E94235"
52
+ android:fillType="evenOdd"
53
+ android:strokeColor="#00000000"/>
54
+ </vector>
@@ -0,0 +1,54 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="91dp"
3
+ android:height="17dp"
4
+ android:viewportWidth="91"
5
+ android:viewportHeight="17">
6
+ <path
7
+ android:pathData="M3.976,2.976L5.768,2.976L9.534,13L7.798,13L6.902,10.438L2.856,10.438L1.946,13L0.21,13L3.976,2.976ZM6.37,8.982L5.306,6L4.914,4.838L4.83,4.838L4.438,6L3.374,8.982L6.37,8.982ZM13.632,13.224C12.988,13.224 12.4047,13.0607 11.882,12.734C11.3593,12.4073 10.9463,11.957 10.643,11.383C10.3397,10.809 10.188,10.158 10.188,9.43C10.188,8.702 10.3397,8.051 10.643,7.477C10.9463,6.903 11.3593,6.4527 11.882,6.126C12.4047,5.7993 12.988,5.636 13.632,5.636C14.136,5.636 14.5887,5.748 14.99,5.972C15.3913,6.196 15.6947,6.4713 15.9,6.798L15.97,6.798L15.9,5.79L15.9,2.976L17.44,2.976L17.44,13L15.97,13L15.97,12.076L15.9,12.076C15.6947,12.3933 15.3913,12.664 14.99,12.888C14.5887,13.112 14.136,13.224 13.632,13.224ZM13.856,11.81C14.2293,11.81 14.577,11.712 14.899,11.516C15.221,11.32 15.48,11.04 15.676,10.676C15.872,10.312 15.97,9.8967 15.97,9.43C15.97,8.9633 15.872,8.5503 15.676,8.191C15.48,7.8317 15.221,7.554 14.899,7.358C14.577,7.162 14.2293,7.064 13.856,7.064C13.4827,7.064 13.1327,7.162 12.806,7.358C12.4793,7.554 12.218,7.8317 12.022,8.191C11.826,8.5503 11.728,8.9633 11.728,9.43C11.728,9.8967 11.826,10.312 12.022,10.676C12.218,11.04 12.4793,11.32 12.806,11.516C13.1327,11.712 13.4827,11.81 13.856,11.81ZM22.364,13.224C21.72,13.224 21.1367,13.0607 20.614,12.734C20.0913,12.4073 19.6783,11.957 19.375,11.383C19.0717,10.809 18.92,10.158 18.92,9.43C18.92,8.702 19.0717,8.051 19.375,7.477C19.6783,6.903 20.0913,6.4527 20.614,6.126C21.1367,5.7993 21.72,5.636 22.364,5.636C22.868,5.636 23.3207,5.748 23.722,5.972C24.1233,6.196 24.4267,6.4713 24.632,6.798L24.702,6.798L24.632,5.79L24.632,2.976L26.172,2.976L26.172,13L24.702,13L24.702,12.076L24.632,12.076C24.4267,12.3933 24.1233,12.664 23.722,12.888C23.3207,13.112 22.868,13.224 22.364,13.224ZM22.588,11.81C22.9613,11.81 23.309,11.712 23.631,11.516C23.953,11.32 24.212,11.04 24.408,10.676C24.604,10.312 24.702,9.8967 24.702,9.43C24.702,8.9633 24.604,8.5503 24.408,8.191C24.212,7.8317 23.953,7.554 23.631,7.358C23.309,7.162 22.9613,7.064 22.588,7.064C22.2147,7.064 21.8647,7.162 21.538,7.358C21.2113,7.554 20.95,7.8317 20.754,8.191C20.558,8.5503 20.46,8.9633 20.46,9.43C20.46,9.8967 20.558,10.312 20.754,10.676C20.95,11.04 21.2113,11.32 21.538,11.516C21.8647,11.712 22.2147,11.81 22.588,11.81ZM34.466,13.112C34.1487,13.112 33.85,13.0607 33.57,12.958C33.29,12.8553 33.0613,12.72 32.884,12.552C32.4827,12.1507 32.282,11.6047 32.282,10.914L32.282,7.218L31.036,7.218L31.036,5.86L32.282,5.86L32.282,3.844L33.822,3.844L33.822,5.86L35.558,5.86L35.558,7.218L33.822,7.218L33.822,10.578C33.822,10.9607 33.8967,11.2313 34.046,11.39C34.186,11.5767 34.4287,11.67 34.774,11.67C34.9327,11.67 35.0727,11.649 35.194,11.607C35.3153,11.565 35.446,11.4973 35.586,11.404L35.586,12.902C35.278,13.042 34.9047,13.112 34.466,13.112ZM40.244,13.224C39.5253,13.224 38.8813,13.0583 38.312,12.727C37.7427,12.3957 37.2993,11.9407 36.982,11.362C36.6647,10.7833 36.506,10.1393 36.506,9.43C36.506,8.7207 36.6647,8.0767 36.982,7.498C37.2993,6.9193 37.7427,6.4643 38.312,6.133C38.8813,5.8017 39.5253,5.636 40.244,5.636C40.9627,5.636 41.6067,5.804 42.176,6.14C42.7453,6.476 43.1887,6.9333 43.506,7.512C43.8233,8.0907 43.982,8.73 43.982,9.43C43.982,10.1393 43.8233,10.7833 43.506,11.362C43.1887,11.9407 42.7453,12.3957 42.176,12.727C41.6067,13.0583 40.9627,13.224 40.244,13.224ZM40.244,11.81C40.636,11.81 41,11.7143 41.336,11.523C41.672,11.3317 41.9403,11.0563 42.141,10.697C42.3417,10.3377 42.442,9.9153 42.442,9.43C42.442,8.9447 42.3417,8.5247 42.141,8.17C41.9403,7.8153 41.672,7.5423 41.336,7.351C41,7.1597 40.636,7.064 40.244,7.064C39.852,7.064 39.488,7.1597 39.152,7.351C38.816,7.5423 38.5477,7.8153 38.347,8.17C38.1463,8.5247 38.046,8.9447 38.046,9.43C38.046,9.9153 38.1463,10.3377 38.347,10.697C38.5477,11.0563 38.816,11.3317 39.152,11.523C39.488,11.7143 39.852,11.81 40.244,11.81Z"
8
+ android:strokeWidth="1"
9
+ android:fillColor="#FFFFFF"
10
+ android:fillType="evenOdd"
11
+ android:strokeColor="#00000000"/>
12
+ <path
13
+ android:pathData="M69.526,2.6348L69.526,6.7179L72.0439,6.7179C72.6438,6.7179 73.1398,6.5163 73.5322,6.1131C73.9348,5.7109 74.1367,5.2312 74.1367,4.6759C74.1367,4.1318 73.9348,3.6577 73.5322,3.2545C73.1398,2.841 72.6438,2.6339 72.0439,2.6339L69.526,2.6339L69.526,2.6348ZM69.526,8.1551L69.526,12.8914L68.0218,12.8914L68.0218,1.1976L72.0112,1.1976C73.0249,1.1976 73.8854,1.5354 74.5945,2.2102C75.3139,2.8849 75.6736,3.7071 75.6736,4.6759C75.6736,5.667 75.3139,6.4948 74.5945,7.1584C73.8965,7.8228 73.0351,8.1542 72.0112,8.1542L69.526,8.1542L69.526,8.1551Z"
14
+ android:strokeWidth="1"
15
+ android:fillColor="#FFFFFF"
16
+ android:fillType="evenOdd"
17
+ android:strokeColor="#00000000"/>
18
+ <path
19
+ android:pathData="M77.1936,10.4416C77.1936,10.8336 77.3599,11.1602 77.6926,11.4215C78.0251,11.6828 78.4147,11.8135 78.8614,11.8135C79.4938,11.8135 80.0572,11.5792 80.5533,11.1117C81.0495,10.6432 81.297,10.0935 81.297,9.4626C80.828,9.0921 80.174,8.9073 79.335,8.9073C78.7241,8.9073 78.2149,9.0547 77.8066,9.3487C77.3982,9.6426 77.1936,10.0058 77.1936,10.4416M79.1397,4.6273C80.2515,4.6273 81.1288,4.9241 81.7726,5.5177C82.4154,6.1112 82.7367,6.925 82.7367,7.9591L82.7367,12.8914L81.298,12.8914L81.298,11.7808L81.2325,11.7808C80.6112,12.6953 79.7825,13.1527 78.7474,13.1527C77.8645,13.1527 77.1255,12.8914 76.5321,12.3688C75.938,11.8462 75.6409,11.1929 75.6409,10.4089C75.6409,9.5811 75.9538,8.9231 76.5807,8.4332C77.2076,7.9432 78.0439,7.6978 79.0903,7.6978C79.9834,7.6978 80.7196,7.8611 81.297,8.1877L81.297,7.8443C81.297,7.3217 81.0896,6.8784 80.6758,6.5135C80.2609,6.1485 79.7769,5.9666 79.221,5.9666C78.3811,5.9666 77.7169,6.3203 77.2264,7.0286L75.9015,6.1952C76.6321,5.1499 77.7112,4.6273 79.1397,4.6273"
20
+ android:strokeWidth="1"
21
+ android:fillColor="#FFFFFF"
22
+ android:fillType="evenOdd"
23
+ android:strokeColor="#00000000"/>
24
+ <path
25
+ android:pathData="M90.993,4.8886l-5.0198,11.5305l-1.5529,0l1.864,-4.0345l-3.3028,-7.496l1.635,0l2.3871,5.7489l0.0327,0l2.3217,-5.7489z"
26
+ android:strokeWidth="1"
27
+ android:fillColor="#FFFFFF"
28
+ android:fillType="evenOdd"
29
+ android:strokeColor="#00000000"/>
30
+ <path
31
+ android:pathData="M63.448,7.1341C63.448,6.6609 63.4078,6.2045 63.3321,5.7678L56.9883,5.7678L56.9883,8.3557L60.6218,8.3557C60.4657,9.1993 59.9939,9.9171 59.2783,10.3977L59.2783,12.0785L61.4468,12.0785C62.7164,10.9082 63.448,9.1789 63.448,7.1341"
32
+ android:strokeWidth="1"
33
+ android:fillColor="#4285F4"
34
+ android:fillType="evenOdd"
35
+ android:strokeColor="#00000000"/>
36
+ <path
37
+ android:pathData="M56.9883,13.7006C58.8036,13.7006 60.3321,13.1051 61.4467,12.0785L59.2783,10.3977C58.6747,10.8037 57.8974,11.0407 56.9883,11.0407C55.2337,11.0407 53.7445,9.8592 53.2119,8.2671L50.9781,8.2671L50.9781,9.9983C52.0852,12.1933 54.3602,13.7006 56.9883,13.7006"
38
+ android:strokeWidth="1"
39
+ android:fillColor="#34A853"
40
+ android:fillType="evenOdd"
41
+ android:strokeColor="#00000000"/>
42
+ <path
43
+ android:pathData="M53.212,8.267C53.0756,7.8611 53.0008,7.428 53.0008,6.981C53.0008,6.534 53.0756,6.1009 53.212,5.695L53.212,3.9637L50.9781,3.9637C50.5203,4.8709 50.2615,5.8956 50.2615,6.981C50.2615,8.0664 50.5203,9.0912 50.9781,9.9983L53.212,8.267Z"
44
+ android:strokeWidth="1"
45
+ android:fillColor="#FABB05"
46
+ android:fillType="evenOdd"
47
+ android:strokeColor="#00000000"/>
48
+ <path
49
+ android:pathData="M56.9883,2.9213C57.9796,2.9213 58.8681,3.2619 59.5688,3.9292L59.5688,3.9302L61.4888,2.0123C60.3228,0.9278 58.8027,0.2615 56.9883,0.2615C54.3602,0.2615 52.0852,1.7687 50.9781,3.9638L53.2119,5.695C53.7445,4.1028 55.2337,2.9213 56.9883,2.9213"
50
+ android:strokeWidth="1"
51
+ android:fillColor="#E94235"
52
+ android:fillType="evenOdd"
53
+ android:strokeColor="#00000000"/>
54
+ </vector>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android" >
3
+ <item
4
+ android:drawable="@drawable/un_black_googlepay_button_background_image" />
5
+ </selector>
6
+
@@ -0,0 +1,48 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="41dp"
3
+ android:height="17dp"
4
+ android:viewportWidth="41.0"
5
+ android:viewportHeight="17.0">
6
+ <path
7
+ android:pathData="M19.526,2.635L19.526,6.718L22.044,6.718C22.644,6.718 23.14,6.516 23.532,6.113C23.935,5.711 24.137,5.231 24.137,4.676C24.137,4.132 23.935,3.658 23.532,3.254C23.14,2.841 22.644,2.634 22.044,2.634L19.526,2.634L19.526,2.635ZM19.526,8.155L19.526,12.891L18.022,12.891L18.022,1.198L22.011,1.198C23.025,1.198 23.885,1.535 24.594,2.21C25.314,2.885 25.674,3.707 25.674,4.676C25.674,5.667 25.314,6.495 24.594,7.158C23.897,7.823 23.035,8.154 22.011,8.154L19.526,8.154L19.526,8.155Z"
8
+ android:strokeColor="#00000000"
9
+ android:fillType="evenOdd"
10
+ android:fillColor="#FFFFFF"
11
+ android:strokeWidth="1"/>
12
+ <path
13
+ android:pathData="M27.194,10.442C27.194,10.834 27.36,11.16 27.693,11.422C28.025,11.683 28.415,11.813 28.861,11.813C29.494,11.813 30.057,11.579 30.553,11.112C31.05,10.643 31.297,10.093 31.297,9.463C30.828,9.092 30.174,8.907 29.335,8.907C28.724,8.907 28.215,9.055 27.807,9.349C27.398,9.643 27.194,10.006 27.194,10.442M29.14,4.627C30.252,4.627 31.129,4.924 31.773,5.518C32.415,6.111 32.737,6.925 32.737,7.959L32.737,12.891L31.298,12.891L31.298,11.781L31.233,11.781C30.611,12.695 29.783,13.153 28.747,13.153C27.865,13.153 27.126,12.891 26.532,12.369C25.938,11.846 25.641,11.193 25.641,10.409C25.641,9.581 25.954,8.923 26.581,8.433C27.208,7.943 28.044,7.698 29.09,7.698C29.983,7.698 30.72,7.861 31.297,8.188L31.297,7.844C31.297,7.322 31.09,6.878 30.676,6.513C30.261,6.149 29.777,5.967 29.221,5.967C28.381,5.967 27.717,6.32 27.226,7.029L25.902,6.195C26.632,5.15 27.711,4.627 29.14,4.627"
14
+ android:strokeColor="#00000000"
15
+ android:fillType="evenOdd"
16
+ android:fillColor="#FFFFFF"
17
+ android:strokeWidth="1"/>
18
+ <path
19
+ android:pathData="M40.993,4.889l-5.02,11.531l-1.553,0l1.864,-4.035l-3.303,-7.496l1.635,0l2.387,5.749l0.033,0l2.322,-5.749z"
20
+ android:strokeColor="#00000000"
21
+ android:fillType="evenOdd"
22
+ android:fillColor="#FFFFFF"
23
+ android:strokeWidth="1"/>
24
+ <path
25
+ android:pathData="M13.448,7.134C13.448,6.661 13.408,6.205 13.332,5.768L6.988,5.768L6.988,8.356L10.622,8.356C10.466,9.199 9.994,9.917 9.278,10.398L9.278,12.079L11.447,12.079C12.716,10.908 13.448,9.179 13.448,7.134"
26
+ android:strokeColor="#00000000"
27
+ android:fillType="evenOdd"
28
+ android:fillColor="#4285F4"
29
+ android:strokeWidth="1"/>
30
+ <path
31
+ android:pathData="M6.988,13.701C8.804,13.701 10.332,13.105 11.447,12.079L9.278,10.398C8.675,10.804 7.897,11.041 6.988,11.041C5.234,11.041 3.744,9.859 3.212,8.267L0.978,8.267L0.978,9.998C2.085,12.193 4.36,13.701 6.988,13.701"
32
+ android:strokeColor="#00000000"
33
+ android:fillType="evenOdd"
34
+ android:fillColor="#34A853"
35
+ android:strokeWidth="1"/>
36
+ <path
37
+ android:pathData="M3.212,8.267C3.076,7.861 3.001,7.428 3.001,6.981C3.001,6.534 3.076,6.101 3.212,5.695L3.212,3.964L0.978,3.964C0.52,4.871 0.261,5.896 0.261,6.981C0.261,8.066 0.52,9.091 0.978,9.998L3.212,8.267Z"
38
+ android:strokeColor="#00000000"
39
+ android:fillType="evenOdd"
40
+ android:fillColor="#FABB05"
41
+ android:strokeWidth="1"/>
42
+ <path
43
+ android:pathData="M6.988,2.921C7.98,2.921 8.868,3.262 9.569,3.929L9.569,3.93L11.489,2.012C10.323,0.928 8.803,0.261 6.988,0.261C4.36,0.261 2.085,1.769 0.978,3.964L3.212,5.695C3.744,4.103 5.234,2.921 6.988,2.921"
44
+ android:strokeColor="#00000000"
45
+ android:fillType="evenOdd"
46
+ android:fillColor="#E94235"
47
+ android:strokeWidth="1"/>
48
+ </vector>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android" >
3
+ <item
4
+ android:drawable="@drawable/un_black_googlepay_button_no_shadow_background_image" />
5
+ </selector>
6
+
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android" >
3
+ <item android:state_enabled="false">
4
+ <shape
5
+ android:shape="rectangle" >
6
+ <corners android:radius="4dp"/>
7
+ <solid android:color="#7FFFFFFF"/>
8
+ </shape>
9
+ </item>
10
+ <item android:drawable="@android:color/transparent" />
11
+ </selector>
12
+
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
3
+ <solid android:color="@android:color/white" />
4
+ <stroke android:width="1dip" android:color="@color/black"/>
5
+ <padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp"/>
6
+ </shape>