This is akin to passing a query string to another page to populate it with data from a database using server-side technology like PHP, ASP, JSP or ColdFusion. In this part of the project, we will pass a single value from the MainActivity to the DetailActivity and then have the DetailActivity use that value to get a complex object from the DataProvider class to display the requested detail information. When navigating from one activity to another, you can pass data as an Extra that can be one of many Java data types (e.g., string, number, array, Boolean or collections of name/value pairs called bundles which is similar to a Java HashMap). When working with Master/Detail activities, while you could create a separate detail activity for each list item, a better approach is to create a single detail activity that can change dynamically to accommodate data that is passed to it or data from a data source. Android Product Directory PART 3: Pass Data To Detail Activity
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |