How can Google+ for Android be so fluid? [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Google+ is a rather fluid app in my old Dell Venue (Android 2.3.3), even with animations. One thing that intrigues me is that while you scroll the lists it paints images in the view (user pictures, post pictures, etc.) and it doesn't lag the scroll.
Currently, we already use the most common best practices in the ListView:
- Using the view holder pattern
- Recycling views
- Loading images async
- Loading images only when the user is not scrolling (by using onScrollStateChanged)
We're using AndroidUniversalImageLoader library. The problem is whenever the image gets drawn in the UI, the list scrolls lags.
What do you guys suggest to make it smoother?

with AsyncTasks and caching of images, you can see when the app first loads that it gets a certain number of posts, then when you scroll to the end of the list it fetches more.

you can check more on below link
http://lucasr.org/2012/04/05/performance-tips-for-androids-listview/

Related

Create Big forms Android best practices [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I want to create big forms in an Android applications, with a lot of questions and inputs, what is the best way to do that ? Did I need to user Scroll View, List View ? If it's a List View what kind of adapter is the best ?
Generally, it is not a good idea to present a huge form on a single page on a mobile device. Users don't like to scroll pages after pages of views to fill forms. It can be disorienting and hard to navigate. On smaller devices, things will be even worse.
Consider breaking a big form down by functional areas and present a smaller UI instead. This will make it easier for the user. You could organize your form in a view pager where you can have several pages.
My experience with ListView (this may apply to RecyclerView too) is that adding an edit field to a row has some challenges in terms of handling focus, touch events etc. The listView does not handle it very smoothly. So it is possible to use these but it can be tricky. Unless there are lots of similar rows, listView does not give you much. Doing a ScrollView or a TableLayout will be fine.

Android : What's the best way to display an article with images? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to display an article with paragraphs, images, quotes, etc. My backend currently returns an article as a list of paragraphs, images, etc. but this can be changed if needed.
I tried the following :
Using a WebView and loading the whole article. Works fine but WebViews are very consuming and I can't customize content appearance as I would like to.
Using a ScrollView and populating it with TextViews for each paragraph and ImageViews for each image. Works OK but is very laggy at the beginning while populating the ScrollView
Using a ListView (and later a RecyclerView) to benefit from recycling. The problem with this solution is that some items may be quite long (ie : a long paragraphe) and it can be laggy when a long item appears on screen while scrolling.
None of the solutions above seems to be optimal, so I wonder : what's the best way to display an article?
Thanks for your answers
Edit 2:
All the solutions above work, my question is not about how to make it work but about how to make it as optimized and smooth as possible.
Edit: This is the kind of things I'm trying to display.
RecyclerView is the best practice. It has the best optimization.

Image Carousel in Android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to create image viewer and it should show 3-4 previews of images like image carousel. Here it is an example
How can I create such effect in android .If someone has code example , I would be very grateful if you share it.
Thanks in advance.
Check out 3D carousel controll in android.
A Data controls take various forms, one of the mostly used being the Listview. With the emerging "finger friendly" technologies, various controls have been developed to take advantage of easier data browsing. Android's natively supports the Gallery view which is implemented from the Coverflow Control
Hope this will guide you.

UI for Handset & Tablet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make an app that runs both in handset & Tablet as shown in figure:
This custom listview would contains around 200 items, its title & description can be loaded from SQLite
For loading 200 images should I use blob in SQLite or from the drawable folder,which would be a better approach ?
I read the android documentation Supporting Tablets & Handsets, it states that we should use fragments. So can anyone recommend me some tutorials to use fragments
that fits my question ?
I am new to it so any type of help is appreciated.
Thanks..
I think Master/Detail Flow is what you need. Luckily it's already built into Android Framework.
Creating a new project, when you reach this page, instead of selecting Blank Activity, select the third template, that is Master/Detail Flow.
The best way to learn it is to scrutinize the pre-written code in the template.
However, you can also get a grip on it with this tutorial.
About the second question, go for blob only if you have just a few pictures. But in case you have many pictures, decoding and encoding the pictures can be a pain in the back, so I recommend using simple Drawables.

Best way to handle many comments in android [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Currently in the app I'm working on as an ongoing project we have a limit of 100 comments per item.
Items can be stuff like forums, journals, and many more stuff. Some of these items are pretty custom and are added to a ScrollView instead of a generic Listview.
Now one client wants to be able to see even more comments since he needs to keep reading for his research.
What would be a good or even a better option could someone advise? What I"m thinking off now are the following.
At the end of our limit, add an "Show all comments" button which loads a simplified listView containing all the comments.
This way avatars will be easely hidden when not visible etc.
Pagination, load the next hundred by using pagination.
You should use a ListView in the first place because the views will get recycled and will not consume all the memory like the scrollView is doing

Categories

Resources