11package ru.hh.android.plugin.core.model.enums
22
3- import com.android.SdkConstants
43
54private const val ANDROID_WIDGET_PKG = " android.widget"
6- private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = " ${ SdkConstants . ANDROIDX_APPCOMPAT_PKG } .widget"
5+ private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = " androidx.appcompat .widget"
76
87/* *
98 * Enum for holding hh.ru code style for XML views identifiers.
@@ -18,28 +17,28 @@ enum class CodeStyleViewDeclaration(
1817 COLLAPSING_TOOLBAR_LAYOUT (
1918 idPrefix = " collapsing_toolbar" ,
2019 androidWidgetsClasses = listOf (
21- SdkConstants . COLLAPSING_TOOLBAR_LAYOUT .newName()
20+ " com.google.android.material.appbar.CollapsingToolbarLayout "
2221 )
2322 ),
2423
2524 APP_BAR_LAYOUT (
2625 idPrefix = " app_bar" ,
2726 androidWidgetsClasses = listOf (
28- SdkConstants . APP_BAR_LAYOUT .newName()
27+ " com.google.android.material.appbar.AppBarLayout "
2928 )
3029 ),
3130
3231 TOOLBAR (
3332 idPrefix = " toolbar" ,
3433 androidWidgetsClasses = listOf (
35- SdkConstants . TOOLBAR_V7 .newName()
34+ " androidx.appcompat.widget.Toolbar "
3635 )
3736 ),
3837
3938 RECYCLER_VIEW (
4039 idPrefix = " recycler" ,
4140 androidWidgetsClasses = listOf (
42- SdkConstants . RECYCLER_VIEW .newName()
41+ " androidx.recyclerview.widget.RecyclerView "
4342 )
4443 ),
4544
@@ -69,46 +68,46 @@ enum class CodeStyleViewDeclaration(
6968 PROGRESS_BAR (
7069 idPrefix = " progress" ,
7170 androidWidgetsClasses = listOf (
72- " $ANDROID_WIDGET_PKG .${ SdkConstants . PROGRESS_BAR } "
71+ " $ANDROID_WIDGET_PKG .ProgressBar "
7372 )
7473 ),
7574
7675 IMAGE_VIEW (
7776 idPrefix = " image" ,
7877 androidWidgetsClasses = listOf (
79- SdkConstants . FQCN_IMAGE_VIEW ,
78+ " android.widget.ImageView " ,
8079 " $ANDROIDX_APPCOMPAT_WIDGET_PKG .AppCompatImageView"
8180 )
8281 ),
8382
8483 CHECKBOX (
8584 idPrefix = " checkbox" ,
8685 androidWidgetsClasses = listOf (
87- SdkConstants . FQCN_CHECK_BOX ,
86+ " android.widget.CheckBox " ,
8887 " $ANDROIDX_APPCOMPAT_WIDGET_PKG .AppCompatCheckBox"
8988 )
9089 ),
9190
9291 BUTTON (
9392 idPrefix = " button" ,
9493 androidWidgetsClasses = listOf (
95- SdkConstants . FQCN_BUTTON ,
94+ " android.widget.Button " ,
9695 " $ANDROIDX_APPCOMPAT_WIDGET_PKG .AppCompatButton"
9796 )
9897 ),
9998
10099 EDIT_TEXT (
101100 idPrefix = " edit_text" ,
102101 androidWidgetsClasses = listOf (
103- SdkConstants . FQCN_EDIT_TEXT ,
102+ " android.widget.EditText " ,
104103 " $ANDROIDX_APPCOMPAT_WIDGET_PKG .AppCompatEditText"
105104 )
106105 ),
107106
108107 TEXT_VIEW (
109108 idPrefix = " text_view" ,
110109 androidWidgetsClasses = listOf (
111- SdkConstants . FQCN_TEXT_VIEW ,
110+ " android.widget.TextView " ,
112111 " $ANDROIDX_APPCOMPAT_WIDGET_PKG .AppCompatTextView"
113112 )
114113 ),
@@ -123,7 +122,7 @@ enum class CodeStyleViewDeclaration(
123122 VIEW (
124123 idPrefix = " view" ,
125124 androidWidgetsClasses = listOf (
126- SdkConstants . CLASS_VIEW
125+ " android.view.View "
127126 )
128127 )
129128}
0 commit comments