mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
feat(templates): add no activity template
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AndroidIDE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.templates.impl.noActivity
|
||||
|
||||
import com.itsaky.androidide.templates.base.baseProject
|
||||
import com.itsaky.androidide.templates.base.modules.android.defaultAppModule
|
||||
import com.itsaky.androidide.templates.impl.base.emptyThemesAndColors
|
||||
|
||||
fun noActivityProjectTemplate() = baseProject {
|
||||
defaultAppModule {
|
||||
recipe = {
|
||||
res {
|
||||
emptyThemesAndColors(actionBar = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import com.itsaky.androidide.templates.impl.basicActivity.basicActivityProject
|
||||
import com.itsaky.androidide.templates.impl.bottomNavActivity.bottomNavActivityProject
|
||||
import com.itsaky.androidide.templates.impl.emptyActivity.emptyActivityProject
|
||||
import com.itsaky.androidide.templates.impl.navDrawerActivity.navDrawerActivityProject
|
||||
import com.itsaky.androidide.templates.impl.noActivity.noActivityProjectTemplate
|
||||
import com.itsaky.androidide.templates.impl.tabbedActivity.tabbedActivityProject
|
||||
import com.itsaky.androidide.xml.permissions.Permission.INTERNET
|
||||
import com.squareup.javapoet.ArrayTypeName
|
||||
@@ -164,4 +165,11 @@ class TemplateBuilderTest {
|
||||
tabbedActivityProject()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test no activity project`() {
|
||||
testTemplate("NoActivity") {
|
||||
noActivityProjectTemplate()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user