Multilple listviews in one single activity - android

I want to have more than one dynamic listview with title in one signle activity.each list item has the image and it's name.i have to do like below image.Please suggest any solution.
Thanks,

you have two options:
i) either partition screen in two parts using weight attribute and use different listviews.
or
ii) you can take a look at good tutorial here for an idea.
one more concept if you find easy is using MergeAdapter

Related

Grid with different item height and width

can someone help me and tell me is this possible in android. I need to have in my app a gridview alike widget, but with different item height and width, like this:
So is this possible, and if so, what can I use to achieve this.
Thanks
For this you need a work around or you can say a third party Library named as "AndroidStaggeredGrid"
You can check it on here
#Darko,
Yes, it it possible to do like this in Android.
There are many ways to implement this. As you said GridView cannot be used to achieve this. For a normal user this will appear has grids.
Ways:
Use fragment for each and every "grid" you can see and each fragment will have its layout to display either 2 or 3 images in grid (No gridview is required here too). Use ImageViews as usually.
If the layout design is same, then you can define a single layout with internal design in the same format. Each row with imageviews - This is not encouraged by the way.
Design layouts for each and every format of design per row. Inflate each particular row to a list (using custom adapter). Based on position in getView() you can control which row design to be added to list. Inbuilt scroll in ListView, so no problem!
I suggest you to go with number #1 or #3. Using fragments you will have better control.
If you come to know any better idea, please share!
It's StaggeredGridView
You can find an implementation at https://github.com/bulletnoid/StaggeredGridView
It's possible using GridLayout. More details in the link.
http://developer.android.com/reference/android/widget/GridLayout.html

How to Categorise Images in GridView to make Custom Gallery

I have made few Gallery modules by using GridView i have used this tutorial: http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/,
but now this time i want to make it more custom for my usage, i want to Categories Images, Please see below Screen Shot
I will be use static images under specific Categories
How to make this kind of Image Gallery:
I have never tried, but i have found this sample code, and please try to custom it as you like:
http://blog.blundell-apps.com/infinite-scrolling-gallery/
you can do it by implementing Jeff Shrkey's SeperatedListadapter
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/
and you can
Look 1
Look 2
There isn’t an easy way of creating these separated lists, so I’ve put
together SeparatedListAdapter which does it quickly. To summarize,
we’re creating a new BaseAdapter that can contain several other
Adapters, each with their own section headers.
Create a Layout having a TextView and custom ListView. in each listItem have a GridView. and Load GridItems.
The TextView is for the Category Name.
Basically you must combine, the Custom ListView Implementation and GridView Implementation to achieve your objective. You can find Separate Tutorials for doing the same in the same androidhive website. But, you must work on combining them into one.

how to make listview like android market . i.e divided into two columns

I was wondering how to implement the listview like the android market.
in the right hand panel a listview is divided into the two rows. This is very useful because it saves lot of space and user can look at almost double items in the listview at a time. how can I implement this ? any suggestions?
you can use GridView instead of ListView of two columns..
1. GridView
2. GridViewExample
Sample design :
The Android Market also uses the ViewPager to scroll between the pages. Here is an example on how you could implement it.
There is another question that is related to this one.Check the folling link, it might help you:
How to display a two column ListView in Android?
Modify you *.xml file to get what you want.
Good luck!
If you want to do this using listView, then each item (row) in the list view should consist of two views. You can do this using a relative layout (or linear layout) with two items side by side.
You can also implement this using a gridview having two columns.

How to Create ListView like this? (Traffic Counter)

Good Morning All,
I am creating an application to display List of applications with their data usage.
I want my list to look similar to Traffic Counter Pro on android Market
I have also added the print-screen on my box.net as SOF does allow me to upload image
So Can someone direct me how to create ListView like this?
My second Question related to this how to create a tab style Activity.
Two examples that helped me a lot:
http://www.codemobiles.com/forum/viewtopic.php?t=876
and
http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
i hope they are usefull to you.
You have to use custom ListView to embed images and format texts as given in the listview.
check out this example or this example or this example or even this example that gives you good understanding on listviews.
Good luck.
This is ListView which items consist of 4 Views objects, look through the tutorial of how to create ListViews and through the tutorial of how to create TabActivitys. And also use links suggested by #parag.
If you observe the screen shot carefully you can identify that group of these fields are available as list item.
They are
Application Icon
Application Name
Data Uploaded
Data Downloaded
Total Data Usage
So you have to create a layout with these fields as children with appropriate position and Use this custom layout as child layout for ListView.
I hope it may help you.

Hello adding different images to rows in a ListView

i am quite new to android and i was wondering how i could go about adding a listview with different images and text. What i am trying to achieve is a listview with four rows which have a different Icon? I don't know how to set that up using the xml layout provided. should i build this using different multiple linear layout or is there a better way to go about it?.. All the examples i have seen all seem to be using one particular Icon and no much detail of the xml layout. Any help will be greatly appreciated. Thank you
If you have a fixed number of rows you can just use a LinearLayout and save yourself some headache. If you need to have a dynamic number of rows then you need to make a custom adapter for your list. If you do a Google search, there are a lot of tutorials on how to do that.

Categories

Resources