• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

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

mjhendricks

Lurker
Aug 20, 2010
1
0
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:)
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones