I am working on an application that shows news feeds based on different categories. I have a list of categories stored on a server in a XML file which is parsed and its content is stored in a SQLite table.
The structure of the XML looks like this:
<categories>
<category>
<name>Lajme</name>
<image>
http://apps.shqip.mobi/Apps/An/Shqipcom/data/source/img/category/lajmet.png
</image>
<order>1</order>
</category>
</categories>
The idea is that I want to reorder the categories manually, i.e. i want the category "Maqedoni" to be shown above other categories in the news feed. (see screenshots below)
How can i retrieve somehow the current postition of the row and whenever the user moves it up or down to increase or descrease the order number from the database?
I have no idea how to approach this problem because this is one of my first projects. Any help would be appreciated.
Thanks in advance.
Granit.