Lazy Android

Add this URL to your Eclipse Installation to reach this solution's update site.

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)

Learn more...
Solution Description

Please expand on it @ 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:

private EditText addmanualname;
private EditText addmanualnumber;
private EditText addmanualemail;
private EditText addmanualmessage;
private EditText addmanualaddress;
private Button addmanualcontinueButton;
private Button addmanualbackButton;
addmanualname = (EditText) findViewById(;
addmanualnumber = (EditText) findViewById(;
addmanualemail = (EditText) findViewById(;
addmanualmessage = (EditText) findViewById(;
addmanualaddress = (EditText) findViewById(;
addmanualcontinueButton = (Button) findViewById(;
addmanualbackButton = (Button) findViewById(;

<?xml version="1.0" encoding="utf-8"?>

android:layout_height="wrap_content" android:orientation="vertical"


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: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:layout_width="100dip" android:layout_height="34dip"
style="?android:attr/buttonStyleSmall" android:text="Cancel"
android:textSize="13sp" android:typeface="sans" android:textColor="#5C5D60"

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
July 2024 0/0 0 6
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
December 2023 0/0 0 13
November 2023 0/0 0 15
October 2023 0/0 0 21
September 2023 0/0 0 18
August 2023 0/0 0 8
View Data for all Listings

Unsuccessful Installs

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)

Marketplace Drag to Install Button

By adding the following code below to your website you will be able to add an install button for Lazy Android.

HTML Code:

Markdown Syntax:


Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

Reviews Add new review

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.


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.


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,

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 this amazing plugin, it removes a HUGE HUGE amount of tedium from android coding, good work Ive just saved myself tons of time!

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.

In reply to 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 =).


Ryan Mattison

In reply to 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.