A terminal based templates generator for Android!
It's similar to what 'rails generate' command does on Ruby on Rails.
Because terminals are awesome! And some [other reasons] (https://medium.com/@ahmedrizwan/andgen-generating-android-templates-from-terminal-616e2cb3afa6#.uf1tstpsu)...
Using HomeBrew
brew tap ahmedrizwan/andgen
brew install andgen
Step 0: Navigate to the module directory of your project
To see available commands and format, do
andgen --help
To check the format and examples, execute
andgen activity
andgen activity SomeActivity
Generated file will look like
andgen activity -l SomeActivity
andgen activity -bl SomeActivity
andgen activity SomeActivity com.example
No one wants to write down full package! So simply do this
andgen activity SomeActivity example
But what if there's a conflict!? No worries, andgen will ask you to select the package
Same commands and format as Activities
andgen fragment SomeFragment
andgen fragment -l SomeFragment
andgen fragment -bl SomeFragment
This will generate code like
For a simple layout
andgen layout my_layout
And for bindable layout (which is enclosed inside layout tag)
andgen layout -bl my_layout
- Add more templates : EmptyActivity, ListActivity and so on
- Add third party templates for : Mosby, Conductor etc
Copyright 2016 Ahmed Rizwan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.