google-code-export / droiddraw

Automatically exported from code.google.com/p/droiddraw
1 stars 1 forks source link

Feature request: double-click a widget to produce onClickListener() code #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(This should be an Enhancement, not an Issue.)

DroidDraw is a fantastic time-saving tool! What I would really like to see
(if you have the time and donation money to motivate you! :) is a feature
where you double-click a widget and the onClickListener() code is
automatically generated for you.

The code could go into a separate text box so it could be easily copied and
pasted into your .java file. This would only apply to widgets that have
onClickListener() implemented, of course.

You could use the widget's id to generate the name of the corresponding
Java object, and also to create the method that onClick() uses. For example:

If you had the following ImageButton:

<ImageButton
    android:id="@+id/butSaveSettings"
    android:layout_width="100dip"
    android:layout_height="wrap_content"
    android:src="@drawable/save_button" />

Then when you double-click it this code would be automatically generated:

final ImageButton butSaveSettings = (ImageButton)
findViewById(R.id.butSaveSettings);
butSaveSettings.setOnClickListener(new OnClickListener() {
    public void onClick(View v) { butSaveSettings_Click(); }
});

private void butSaveSettings_Click()
{
    // CODE FOR USER CLICKING butSaveSettings GOES HERE...
}

Yes, I come from a Visual Studio development background where this feature
is standard... but it comes in very handy!!

Keep up the great work Brendan!

Original issue reported on code.google.com by ToneD...@gmail.com on 6 Mar 2009 at 12:50

GoogleCodeExporter commented 9 years ago
This is very much the direction that I would like to take DroidDraw.  There is 
*very*
rudimentary support for this in SVN, I will be moving this forward (slowly) 
over the
next few months.

Original comment by brendan....@gmail.com on 9 Mar 2009 at 5:26

GoogleCodeExporter commented 9 years ago

Original comment by brendan....@gmail.com on 9 Mar 2009 at 5:33

GoogleCodeExporter commented 9 years ago
well, i think it would be awesome to add it as a netbeans plugin, if that is 
droiddraw's direction, and IDE would be needed to generate proper code. 
Netbeans needs more of droiddraw than eclipse, maybe we can merge it with 
nbandroid netbeans.
If you need help i am a volunteer since i have been very benefited from 
droiddraw.

Original comment by panzerfa...@gmail.com on 8 Aug 2012 at 7:43

GoogleCodeExporter commented 9 years ago
I;m using droidraw and I want to read the text in the text box using netbeans, 
and direct from page to page. 

Original comment by NourAlla...@gmail.com on 8 Dec 2012 at 9:48