You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -52,18 +54,29 @@ fun createLayoutFileForActivityOrFragment(ic: ItemConfigBean,facet: AndroidFacet
52
54
if (className !=null) {
53
55
// val layoutFile = CreateResourceFileAction.createFileResource(facet, ResourceFolderType.LAYOUT, "activity_auto", null, null, true, "Create Layout For '$className'",
54
56
// resDirectory, null, false)
57
+
val nameSb =StringBuilder()
58
+
ic.name.forEach {
59
+
if (it >="A"[0] && it <="Z"[0]) {
60
+
nameSb.append("_")
61
+
}
62
+
nameSb.append(it)
63
+
}
64
+
65
+
val layoutFileOriginName =if (isActivity) "activity${nameSb.toString().toLowerCase()}"else"frag${nameSb.toString().toLowerCase()}"
66
+
67
+
val rootLayoutName =if (facet.module.dependsOnAndroidx()) "androidx.constraintlayout.widget.ConstraintLayout"else"android.support.constraint.ConstraintLayout"
55
68
56
69
val layoutFile =AndroidResourceUtil.createFileResource(
57
-
if (isActivity) "activity_${ic.name.toLowerCase()}"else"frag_${ic.name.toLowerCase()}", resDirectory.findSubdirectory("layout")!!,
0 commit comments