Reputation: 1661
I'm implementing a series of UI screens that collect information for a new 'thing' that the App keeps track of. Think of a new 'event' in a Calendar with a group of associated data: event, from, to, location, etc.
At first I attempted to design a single activity (on a single view, but with popups and such) that would collect the user's choices. Since several of the items are lists to pick from, there was a lot of clicking involved in these choices. Plus, the entire View felt crowded on a phone.
I'm trying another approach now: presenting each distinct data entry as a new View. At first I literally created separate Views for each choice and managed the flow and data through a parent activity. This seemed to make sense from a data point-of-view. It was easy to build up a object with choices from each screen.
However, I've read here that my first approach is not good practice. So, I've switched tacks and am trying to use separate activities for each "choice". As I pursue this, I'm now figuring out how to pass data between these activities and how to build an object of this data to ultimately be entered as a database record.
My App is a schedule keeper for very specific jobs. The users add new jobs as they receive them. Each job is defined by the place it takes place at, the time period it is active for, and other descriptors. I'm trying to design an elegant UI to handle collecting details about a new "job". Like I said above, it didn't feel right on one View. In theory I like the idea of multiple screens to collect each detail, but I'm not sure how to architect it.
Before I go to far down the "Parcelable" rabbit hole, I'd love to clarify the best approach to this type of UI scenario.
Upvotes: 0
Views: 110
Reputation: 1196
IMO parcelable is your best bet. I remember reading somewhere that it is much more efficient than Java's default serializable.
Sorry, what I meant is -- parcelable is your best bet for sending data across activities if that's the road you're planning on going down. As far as your design, I'm a bit confused as to what you mean, but I really don't see the problem with having one activity.
Upvotes: 1