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)

https://raw.githubusercontent.com/Yinten/AndroidRadTools/master/LazyAndroidUpdateSite

Learn more...
Solution Description

http://youtu.be/2t0c-x7HFJw

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">



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
February 2024 0/0 0 15
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
July 2023 0/0 0 10
June 2023 0/0 0 9
May 2023 633/671 2 9
April 2023 658/667 1 8
March 2023 0/0 0 5
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:

Output:

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.

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.

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

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 =).

Thanks,

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.