Please expand on it @ https://github.com/Yinten/AndroidRadTools and check in and
Right click an android XML layout, go to Fast Layout -> Generate Activity. It'll generate those tedious findViewById declarations. For the layout below, it produces:
/**********DECLARES*************/
private EditText addmanualname;
private EditText addmanualnumber;
private EditText addmanualemail;
private EditText addmanualmessage;
private EditText addmanualaddress;
private Button addmanualcontinueButton;
private Button addmanualbackButton;
/**********INITIALIZES*************/
addmanualname = (EditText) findViewById(R.id.addmanualname);
addmanualnumber = (EditText) findViewById(R.id.addmanualnumber);
addmanualemail = (EditText) findViewById(R.id.addmanualemail);
addmanualmessage = (EditText) findViewById(R.id.addmanualmessage);
addmanualaddress = (EditText) findViewById(R.id.addmanualaddress);
addmanualcontinueButton = (Button) findViewById(R.id.addmanualcontinueButton);
addmanualbackButton = (Button) findViewById(R.id.addmanualbackButton);
<?xml version="1.0" encoding="utf-8"?>
android:layout_height="wrap_content">
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content" android:orientation="vertical"
android:paddingLeft="5px">
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:textSize="24px"
android:textStyle="bold" android:text="Add Contact"
android:paddingBottom="5px" android:layout_centerHorizontal="true" />
android:layout_height="wrap_content" android:textSize="18px"
android:text="Name:" android:paddingBottom="5px" />
android:layout_height="wrap_content" android:text="" android:gravity="top|left" />
android:layout_height="wrap_content" android:text="And/Or"
android:textSize="26dip" android:textStyle="bold" android:paddingTop="5dip"
android:paddingBottom="5dip" />
android:layout_height="wrap_content" android:textSize="18dip"
android:text="Number:" android:paddingBottom="5dip" />
android:layout_height="wrap_content" android:text="" android:gravity="top|left" />
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@+drawable/settings_divider" android:padding="10dip" />
android:layout_height="wrap_content" android:textSize="18dip">
android:layout_height="wrap_content" android:text="" android:gravity="top|left"
android:padding="10dip" />
android:layout_height="wrap_content" android:textSize="18dip"
android:text="Message:" android:paddingBottom="5dip" />
android:layout_height="150dip" android:text="" android:gravity="top|left" />
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@+drawable/settings_divider" android:padding="10dip" />
android:layout_height="wrap_content" android:textSize="18dip"
android:text="Address:" android:paddingBottom="5dip" />
android:layout_height="150dip" android:text="" android:gravity="top|left" />
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:paddingTop="5dip"
android:orientation="horizontal" android:layout_centerHorizontal="true" android:paddingBottom="5dip">
android:layout_width="100dip" android:layout_height="34dip"
style="?android:attr/buttonStyleSmall" android:text="Save"
android:textSize="13sp" android:typeface="sans" android:textColor="#5C5D60"
android:textStyle="bold">
android:layout_width="100dip" android:layout_height="34dip"
style="?android:attr/buttonStyleSmall" android:text="Cancel"
android:textSize="13sp" android:typeface="sans" android:textColor="#5C5D60"
android:textStyle="normal">
Categories: Application Development Frameworks, General Purpose Tools, Linux Tools, Mobile and Device Development, Tools
Additional Details
Eclipse Versions: Mars (4.5), Luna (4.4), Kepler (4.3), Juno (4.2, 3.8), Previous to Juno (<=4.1), Neon (4.6), Oxygen (4.7), Photon (4.8), 2018-09 (4.9)
Platform Support: Windows, Mac, Linux/GTK
Organization Name: Calculating a Surface Normal
Development Status: Alpha
Date Created: Thursday, September 1, 2011 - 23:31
Date Updated: Monday, February 4, 2019 - 13:51
Submitted by: Ryan Mattison
Date | Ranking | Installs | Clickthroughs |
---|---|---|---|
December 2024 | 0/0 | 0 | 4 |
November 2024 | 0/0 | 0 | 13 |
October 2024 | 0/0 | 0 | 7 |
September 2024 | 0/0 | 0 | 10 |
August 2024 | 0/0 | 0 | 20 |
July 2024 | 0/0 | 0 | 13 |
June 2024 | 0/0 | 0 | 14 |
May 2024 | 0/0 | 0 | 18 |
April 2024 | 673/687 | 1 | 11 |
March 2024 | 617/694 | 2 | 9 |
February 2024 | 0/0 | 0 | 17 |
January 2024 | 618/691 | 2 | 24 |
Reviews Add new review
Extra additions
Submitted by jim vell on Thu, 11/05/2015 - 05:52
Hi. Just came across this. (havnt been active lately) but this is a handy, quick/dirty way to generate code on the go...
How about adding support for event handlers per resid var generated, but in a more robust way.
Ie:
which ever res is generated attach an option beside it so developer can select which event listener to attach to this res view.
(Optional) Present this option as a Dialog in Preview mode before code is generated
This way (while coding) we wont need to do this manually ourselves.
Another macro addition would serve for quicker code generation less extra time spent to attach the listener to the generated view.
UpdateSite isn't reachable
Submitted by Marco Schmitz on Thu, 10/11/2012 - 05:15
Hi,
I'd like to install this one, but I am stuck with the error
Unable to read repository at [LazyAndroidUpdateSite].
[LazyAndroidUpdateSite] is not a valid repository location.
Best Regards,
Marco
Sorry
Submitted by Ryan Mattison on Thu, 03/27/2014 - 03:30
In reply to UpdateSite isn't reachable by Marco Schmitz
Updated, nothing has changed --- can use on all eclipse versions & download again.
Interesting idea
Submitted by Justin Buser on Tue, 06/26/2012 - 23:06
I didn't actually install or try it but I did watch the demonstration video. I prefer to do most of my layouts programmatic-ally but I do occasionally use xml layouts. Not really often enough where something like this would be useful for me but it did make me think about it a bit. I think if you were able to alter it a bit so someone would right click on a layout and click generate activity and then have the standard create class / package dialog pop up it would be pretty handy. Basically it would be just like creating a new class, except after you picked the name/package you would end up with a new activity class preloaded with your variables / oncreate function / listeners for buttons / lists / etc... You could even have it generate custom view instances per each internal layout...
Anyway, it's a good start, I'll be keeping an eye on your progress...
Thanks for the plugin
Submitted by Ryan Winsauer on Sat, 06/09/2012 - 08:18
Thanks for spending your time on this and sharing it with the community.
Awesome plugin!
Submitted by Gareth Murfin on Fri, 05/25/2012 - 10:08
Thanks for this amazing plugin, it removes a HUGE HUGE amount of tedium from android coding, good work Ive just saved myself tons of time!
great plugins
Submitted by Tomas Prochazka on Sat, 10/15/2011 - 05:43
Great plugin! More like this.
I only would prefer call it directly from code, like quick action (like "Generate toString()") if cursor will be on layout reference or open dialog with layout search.
More with it
Submitted by Ryan Mattison on Sun, 11/20/2011 - 17:50
In reply to great plugins by Tomas Prochazka
Hey Tomas,
I'd love to do a lot more with it. Not as much time as I would like. The source code is open on my blog if you'd like to add more shortcuts to it, please check them in and i'll update the tool =).
Thanks,
Ryan Mattison
Thanks
Submitted by Ryan Mattison on Tue, 12/06/2011 - 07:37
In reply to great plugins by Tomas Prochazka
Thanks a ton for the positive feedback by the way! I felt like I saved a chunk of people a fair amount of time, and you're the ONLY response or feedback I've had thus far! I've added a # of changes that impact development for rapid developers and help avoid repetitive injuries, I'm waiting for a few more comments or for people to check into the source control branch. I've had about 10 people rip it off and blog about it, 0 check in anything to the source control branch. Makes me feel like open source development is a joke.
If you still doing Android
Submitted by Ryan Mattison on Thu, 03/27/2014 - 03:31
In reply to great plugins by Tomas Prochazka
I just got back into it a little bit, but source is here if you have ideas to add.
https://github.com/Yinten/AndroidRadTools