how to save/retrieve data image/text into android xml file - android-xml

I am building one feature of a fishing app.I will need to store picture and description of species of fish found in various lakes of my state. I will display a list view of those species and allow the user to choose which one to display. What is the best option to store and retrieve the data (species picture and description) I understand I can use a xml strings. How can I setup my xml string to do this?
Thanks

If I understood your question correctly, you need:
-a ListView showing species,
onClick: show new View with details of the selected species with photo.
And all this, from an XML?
If you're using a local XML file inserted in the assets you can use a Parser to Parse the data from the XML to Objects.
Then in the activity, you create a listview using the species objects.
Add an OnItemClickListener to the listview to determine who is clicked.
show a new view with the details of the selected species.
If you want extra information, ask ahead :) I hope this was helpful

Related

moodle - Customize the list of courses in the dashboard page

I'd like to modify the list of courses ( course overview ), to modify the display of the courses.
I'd like something like that:
Is there a way to save a thumbnail for each course in the database, and display it in the dashboard of the course list, each course with it's own picture, according to the subject
I have updated the file moodleDir\blocks\course_overview\renderer.php
I added a static HTML image next to each course
In the course settings form there is an option to add images in "Course Summary files"
You can upload an image there and retrieve it in the renderer using the function course_image($courseid) shown in this example:
https://gist.github.com/bmbrands/c1eb21dfa7f491b1205ea0ca806b5493

Create new contact view

I have been told to do the following:
Implement contact add view like below and let him store in SQL table,
contacts will have Name, phone no of mobile, work , fax, email . view
should look like below:
My question:
Can you clarify me, should I use Addressbook or simply a custom view and a sql database to save data from that custom view? I mean both the options are open here?
You can not use address book to create custom content in your application.
So you should implement your custom view to collect information to store in your database (sqlite?)
If you are creating contact / modifying existing contact information, you can use address book framework.
Answer for the question in comment (how to go about for this kinda UI)
Yes, Have the grouped table view to get the desired background
Among the many possible solutions, here is the simplest one perhaps:
Have 2 sections in your table.
First section has a special kinda cell. Only one row in this section.
You can use Interface Builder to create the cell contents or you could build from code.
Second section contains similar cells. It can contain as many as the fields you need.
Just specify UITableViewCell's style to be UITableViewCellStyleValue2 and specify the values accordingly

if rss feed has only one item how to go straight to its detail view without using a table

I have an rss feed with only one item in it.I am trying to go straight to showing its details without having to go through a table view to do it.
I have a different rss feed working in my app that has multiple items. I have this working with a table view.I was looking online and all I could find was how to display a feed through a table view.
Does anyone know how to display the singular item from the feed in an app?
or of any online tutorials?
Any and all help much appreciated.
Just parse the feed and insted of showing in tableview ,show it in a label or textview .
I don't understand what u trying to ask through your question. It sounds simple but can you elaborate or give url of Rss feed links for understaning ur query...
If you've parsed your data already, you have it stored in a set of variables, right?
So now you just want a particular data to display in detail view for this if you use (UIWebView for DetailView) used this or a particular you wish to publish in the details view:-
– loadHTMLString:baseURL:
Sets the main page content and base URL.
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
Parameters
string
The content for the main page.
baseURL
The base URL for the content.
k...

iPhone: Grouping records in multiple UITableView views

Let me first say, I know how to create sections and group records within a UITableView.
What I am wanting to do is something similar to creating a photo album. So, I have all my data objects coming from core data, and, I want to be able to create a custom group, such as "My Trip to Mexico" and "First Birthday". Then, the user should be able to add objects/records into new sections/albums. So, basically the user is creating custom sections with their own custom names, and then choosing what records should go into that section/album.
So, I am just wondering what is the best way to do this? I am thinking that I would just create some extra attributes for my core data model. Or, would I create a whole new "Album Section" object, and somehow use that?
Point me in the right direction. :)
I Would not recommend defining the album as an attribute within the image object, as the image could then only be part of a single album
datamodel http://www.freeimagehosting.net/uploads/d961b23681.png
I would recommend the datamodel above.
With this datamodel you could add images to multiple albums.
I assume groups albums and sections within your description are the same.
If not you should create an additional entity and relation for different "meanings"
for example: an image always has to be Part of one single Event, but can be added to multiple custom groups (like in iPhoto)

Applying user-entered data in one view to a second view

I'm trying to write an iphone OS app that includes a logbook feature. The problem that I'm having is that I want each new logbook to have its own categories that are user-defined, for example a chemical receipt log would have chemical name, vendor, receipt date, expiration date and comments.
The way that I'm trying to go about this is by calling an editCategory view controller when a new logbook is created that contains a number of UITextields where the user can enter the categories. I want to take those strings and apply them to a newLogEntry view controller, so that when the user creates a new log entry, they are presented with each category followed by a UITextfield so they can enter the relevant data.
The trick is, I have no idea how to grab the category data from editCategory and apply it to newLogEntry. I'm currently using Core Data, as that seems to be the easiest way to go about this, but I'm not married to it if it interferes with a good solution. Also, I'm still more comfortable with genetic code than objective-C code, so please bear with my ignorance.
Have you considered using the App Delegate? You could keep those values in the App Delegate, and call on them in the ViewDidLoad method of your newLogEntry view controller.