Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove default TextView from new activity layout

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)?

like image 458
Ilya Blokh Avatar asked Sep 27 '22 23:09

Ilya Blokh


2 Answers

you can go to your sdk path /sdk/platforms/[android-version]/templates and modify the template files

like image 68
M-N Avatar answered Oct 05 '22 23:10

M-N


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.

like image 26
The Holy Coder Avatar answered Oct 06 '22 00:10

The Holy Coder