Reputation: 12293
When you create new activity using IDE constructor (new->activity) - in both Android Studio and Eclipse - it creates new java file, layout file, adds activity to the manifest etc.
And every time there's a TextView
with "Hello World" text at the layout file (if you choose "Blank Activity" pattern). Also string value "Hello World" is automatically added into strings res file.
Of course no special effort is needed to delete manually string value and TextView
but one day it becomes really annoying.
My question:
If there's a way to change the new activity creation mechanism and create just empty activity layout file (only with container layout, e.g. RelativeLayout
)?
Upvotes: 5
Views: 818
Reputation: 12293
I got it
layout.template
file should be modified.
Path is: Android Studio\plugins\android\lib\templates\activities\[Activity-Type]\root\res\layout
Upvotes: 0
Reputation: 4306
Go to your SDK Path. In my case
sdk\platforms\android-[version]\templates
And open layout.template
in any editor like Notepad++
Delete Textview
widget from this layout.template
file.
Upvotes: 1
Reputation: 310
you can go to your sdk path /sdk/platforms/[android-version]/templates and modify the template files
Upvotes: 3