I am a beginner in Android development and starting my second Android project – a network based file sharing application. I want to show a list of files, that I’ll fetch from a network resource, on the screen in which the user can scroll through the files and select multiple files. Each file information will have the filename in larger point size followed by filesize and source info in the next line in small point size. I want the list exactly like the list which appears when you press Options > Multi-select in Root Explorer android application. Any inputs, how may I go about laying out the user interface, will be highly appreciated.
A bit of search revealed that it is a frequently used pattern
http://www.androidpatterns.com/uap_pattern/slide-to-scroll
but being a beginner in Android Development(UI development broadly) I am unable to lay out my UI. I tried ScrollView as a parent of vertically oriented LinearLayout with several TextViews inside but that doesn’t seem to be what I need.
Update:And yeah, I also want to place some buttons like Download, View information in the bottom just like they are placed in Root Explorer
You need a
ListViewwith a custom adapter.This example that you can find on the Internet provides an exact behavior of what you want to achieve as in Root Explorer.
The difference is that where that example
extends ArrayAdapter, you would need to set theTextViewtext size to something smaller or bigger, depending on what you need.I can clarify if you need. But I don’t think you’ll need more than that if you follow the link I gave to you.
Start experimenting and you’ll see that it’s quite easy once you get the feeling.
*edit: oops, I forgot the link. Here it is.