1. Check out our companion app, Forums for Android! Download from Google Play

Packaging View+function for re-use (How)?

Discussion in 'Application Development' started by mjhendricks, Aug 20, 2010.

  1. mjhendricks

    mjhendricks New Member
    Thread Starter

    Aug 20, 2010
    Chauffeur (not for long)
    n00b with android, >10 years with VB/C++/.NET...

    I'm just starting with android, and am jumping in with both feet. I have been successful in creating a fully functional app, but want the entire thing to be reusable...how do I do this?? In other languages, I'd have created the function in a DLL which can be referenced in other apps. Android dox/books aren't clear on doing this.

    First task (working perfectly as a complete app) is linking a Button with a DatePicker. I can assign the Button to a variable in the class, and can manipulate the date that shows (as text property of button) via direct assignment (day, month and/or year) in code, as well as via a DatePicker.

    I want to use this in an upcoming full-functioned app, but am not sure how to "package" the function, so that I can assign this functionality to any Button on any Layout in any App that imports this code.

    A service doesn't make sense, since there is no foreseeable need to make it respond to anything in the background.

    PLEASE don't waste time asking why I want to do this, just accept that it is a learning path to greater capabilities:)


Share This Page