I'm trying to build an application in android wherein I need to display the items in the list in a manner similar to the Icon View in Windows File Explorer (only the thumbnail and the name is displayed). In C#, I can achieved this through the ListView control. Is there an equivalent component in Android that has the same functionality as a ListView control in C#?
EDIT
Here's a link to an image similar to what I want to achieved.
http://goo.gl/vGsgJ
Based on your image, you're looking for the GridView widget:
http://developer.android.com/reference/android/widget/GridView.html
Also, there's a great tutorial on how to load images into a GridView on the Android training site:
http://developer.android.com/training/displaying-bitmaps/display-bitmap.html#gridview
Related
everybody
Currently i am working on Android Native App .I wish to create a expandable tab without any HTML or JavasScript file. My App is totally native App.
I wish to show something like above picture.
You can try background image for Button/image.
Set one background-1 for default, use another for hover/ click/ select effect.
I'm building an App for Android that already exists for iOS. On iOS, we really like to use the listview grouped style to show details and forms. It is really useful to show details of objects that we don't know how much properties they have before loading it.
I know that Android doesn't have a similar tableview style. And I don't want to use a custom library to recreate it, because I don't want to force an iOS like interface to my Android's users.
But how would you create a consistent Android interface that show similar information? Do you have example for me?
First of all, your instinct to not force iOS style UI onto Android users is correct and I respect you for it.
Android's ListView is roughly the equivalent of iOS's UITableView. There are important differences. For instance, you should never use a ListView inside another scrollable container. If a ListView is in a particular layout, it should (usually) be the only scrollable component. If you want multiple ListViews in a layout, you probably don't want ListViews at all. You should instead use (vertical) LinearLayouts and add the items in order.
Cyril Mottier writes excellent posts on implementing custom behavior for Android's ListView.
If you want to display data in a list then you can use the ListView. Here is a great article about how to use it.
Is it possible to get
this effect on a ListView in native Android? There are other alternatives like creating the list in HTML5 CSS and using phonegap etc; but it would be nice if it can be done by modifying the default behavior of Android ListView . Any ideas?
Would ExpandableListView work?
If you want rounded/beveled corners on the ListView, check this question out.
As for the individual items' backgrounds, you will probably have to make the graphics yourself.
I am trying to implement a basic text to speech software. I have a GridView consisting of images. I need to have another view above this to which thumbnail of the images clicked can be placed.
Can anyone help me which view supports placing the thumbnail images?
You can use simple imageviews or modify your gridview to that similar on the android dev site. search hello gridview
if you look at the API examples that googles has you will find what you are looking for. Have a look in the part of Views
To the examples of Gallery and the sample of Grid.
I am looking to build a button in my Android app which must contain:
A background picture
A picture
Some text
I am coming from iPhone dev and I am a little bit confused by Android development.
While I could addSubView: UIImageView or UILabel to my UIButton, I can't use addView() with a android.widget.Button :(
Does anyone have a solution?
EDIT : Thanks everybody for answers. I forgot to specify I have to do it programmatically, without using XML. I don't know how many element I will display (it depends on RSS).
android:background for background ... remeber that you can build your own 9 patch
android:drawableLeft, android:drawableRight, android:drawableTop, android:drawableBottom to add some picture to the left, right, ... of text
EDIT: i didn't mention ... but i was talking about android.widget.Button
2nd EDIT: after you provide more information i think that all what you need is ListView
check this sample http://esilo.pl/LooserSample.zip (don't take "looser" to yourself, it was sample for another guy)
it showing how to
download a JSON data
store it in db
build ContentProvider for sharing a data
use ContentProvider to take data from db and show it in ListView
dynamic loading images from internet
for simpler sample use your sdk samples like this C:\android\android-sdk-windows\samples\android-8\ApiDemos\src\com\example\android\apis\view\List*.java
if you alrady have code for downloading and storing data from RSS in array extend ArrayAdapter to fit your needs
Most, if not all, of the UI for android is built in the XML. Kind of like the UI builder in Xcode, but not near as advanced. The ADP will let you view the UI you have built in Eclipse, and adjust some basic widget properties.
I believe for what you are trying to do, if I understand right, you need to use an ImageButton widget. This widget allows you to use a complete image as a button. You can also define your own states (button pressed, gain focus, etc) with both the button and image button widgets. You can define a background and add images to both widgets.
More information here