Skip to content

Commit ead7592

Browse files
author
farfromrefug
committed
fix(textfield,textview,android): allow to override themes
1 parent 9ab1507 commit ead7592

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

packages/textfield/platforms/android/res/layout/ns_material_text_field_filled.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717

1818
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
19-
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
19+
style="@style/TextInputLayout.Filled"
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent">
2222
<com.nativescript.material.textfield.TextInputEditText

packages/textfield/platforms/android/res/layout/ns_material_text_field_outline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717

1818
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
19-
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
19+
style="@style/TextInputLayout.Outlined"
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent">
2222
<com.nativescript.material.textfield.TextInputEditText
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<resources
33
xmlns:android="http://schemas.android.com/apk/res/android">
4-
<style name="TextInputEditText" parent="@style/Widget.MaterialComponents.TextInputEditText.FilledBox">
4+
<style name="TextInputEditText"
5+
parent="@style/Widget.MaterialComponents.TextInputEditText.FilledBox">
56
<item name="backgroundColor">@null</item>
67
<item name="android:paddingLeft">0dp</item>
78
<item name="android:paddingRight">0dp</item>
89
<item name="android:paddingTop">0dp</item>
910
<item name="android:paddingBottom">0dp</item>
1011
</style>
11-
<style name="ThemeOverlay" parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
12+
<style name="ThemeOverlay"
13+
parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
1214
<item name="editTextStyle">@style/TextInputEditText</item>
1315
</style>
1416
<style name="ShapeAppearanceOverlay" parent="">
1517
</style>
16-
<style name="TextInputLayout" parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
18+
<style name="TextInputLayout"
19+
parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
1720
<item name="materialThemeOverlay">@style/ThemeOverlay</item>
1821
<item name="boxBackgroundColor">@null</item>
1922
<item name="boxBackgroundMode">none</item>
@@ -24,21 +27,11 @@
2427
<item name="boxCornerRadiusTopEnd">0dp</item>
2528
<item name="boxCornerRadiusBottomStart">0dp</item>
2629
<item name="boxCornerRadiusBottomEnd">0dp</item>
27-
28-
<!-- <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay</item> -->
29-
</style>
30-
<style name="ThemeOverlay.Filled" parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
31-
<!-- <item name="editTextStyle">@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox</item> -->
32-
</style>
33-
<style name="TextInputLayout.Filled" parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
34-
<!-- <item name="materialThemeOverlay">@style/ThemeOverlay.Filled</item> -->
35-
3630
</style>
37-
<style name="ThemeOverlay.Outlined" parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
38-
<!-- <item name="editTextStyle">@style/ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox</item> -->
31+
<style name="TextInputLayout.Filled"
32+
parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
3933
</style>
40-
<style name="TextInputLayout.Outlined" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
41-
<!-- <item name="materialThemeOverlay">@style/ThemeOverlay.Outlined</item> -->
42-
34+
<style name="TextInputLayout.Outlined"
35+
parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
4336
</style>
4437
</resources>

packages/textview/platforms/android/res/layout/ns_material_text_view_filled.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717

1818
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
19-
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
19+
style="@style/TextInputLayout.Filled"
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent">
2222
<com.nativescript.material.textview.TextViewInputEditText

packages/textview/platforms/android/res/layout/ns_material_text_view_outline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717

1818
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
19-
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
19+
style="@style/TextInputLayout.Outlined"
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent">
2222
<com.nativescript.material.textview.TextViewInputEditText
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<resources
33
xmlns:android="http://schemas.android.com/apk/res/android">
4-
<style name="TextInputEditText" parent="@style/Widget.MaterialComponents.TextInputEditText.FilledBox">
4+
<style name="TextInputEditText"
5+
parent="@style/Widget.MaterialComponents.TextInputEditText.FilledBox">
56
<item name="backgroundColor">@null</item>
67
<item name="android:paddingLeft">0dp</item>
78
<item name="android:paddingRight">0dp</item>
89
<item name="android:paddingTop">13dp</item>
910
<item name="android:paddingBottom">13dp</item>
1011
</style>
11-
<style name="ThemeOverlay" parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
12+
<style name="ThemeOverlay"
13+
parent="@style/ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox">
1214
<item name="editTextStyle">@style/TextInputEditText</item>
1315
</style>
1416
<style name="ShapeAppearanceOverlay" parent="">
15-
17+
1618
</style>
17-
<style name="TextInputLayout" parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
19+
<style name="TextInputLayout"
20+
parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
1821
<item name="materialThemeOverlay">@style/ThemeOverlay</item>
1922
<item name="boxBackgroundColor">@null</item>
2023
<item name="boxBackgroundMode">none</item>
@@ -25,7 +28,11 @@
2528
<item name="boxCornerRadiusTopEnd">0dp</item>
2629
<item name="boxCornerRadiusBottomStart">0dp</item>
2730
<item name="boxCornerRadiusBottomEnd">0dp</item>
28-
29-
<!-- <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay</item> -->
31+
</style>
32+
<style name="TextInputLayout.Filled"
33+
parent="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
34+
</style>
35+
<style name="TextInputLayout.Outlined"
36+
parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
3037
</style>
3138
</resources>

0 commit comments

Comments
 (0)