I want to discuss about the one of the project objective Support for custom form. From all the details I got , I understood that the objective is to make form by interpreting the html response we get from server.(response can be different hence the implementation should be generic).
Correct me, if I’m wrong. Please also provide some details.
REST API gives you JSON. We’re not parsing HTML at all. You’d serialize the form schema in some sane way and then parse that and generate the form widgets accordingly.
Here are some mockups which are a part of my proposed design overhaul:
They are pretty slick!
I have few ideas to improve the performance and UI/UX Android Client. I would like to discuss them.
The application currently uses the
ListViewfor displaying any kind of list. I would suggest upgrading to
RecyclerView. By using
RecyclerViewwe can have an edge over traditional list views.
It improves the performance and is highly customizable
We can animate the items easily using its
We can easily apply borders and margins at the run time using
For example, we have a list of past and current visits of a patient in Patient Dashboard, we can provide actions to end and start visit there itself with cool animations. it will save us from the overhead of opening a new activity or fragment.
Another one for UI improvement, we can use cards as list items, and creating a list of cards using
RecyclerViewwill be good in terms of performance and layout designs. Awesome looks can be given to UI using card views.
Interesting that as you were typing this I added some enhancement to the card layouts I had added long time back:
As for Recyclerview, the only obvious benefit I see are animations. Since we aren’t using anything other than vertical listviews, will it not be better to look at animation implementations using ListView? The additional coding overhead for the Recyclerview, combining with its tendency to recycle UI items (thereby being more prone to crashes) is a slightly riskier tradeoff, don’t you think?
As per the official documentation animations for adding and removing items are enabled by default in RecyclerView. For more customization we just need to define our own animations and the default
RecyclerView.ItemAnimator class’ method
RecyclerView.setItemAnimator() can be used. For reference check this library. It is going to be easier than adding animations in a
ListView.[quote=“avijitghosh82, post:28, topic:4903”]
The additional coding overhead for the recycler view, combining with its tendency to recycle UI items (thereby being more prone to crashes) is a slightly riskier tradeoff, don’t you think?
All the adapters in the project are already using
ViewHolder pattern to recycle views. I don’t see crashes in the app :). In a
ListView its an optional practice but we have adopted that. In recycler view, it is mandatory that you use View Holders.
Also, in the case of long lists recycler view is more efficient. Overheads as far as I can see is to change the binding method in the adapter and
listview tags in the layout files. This will give us more customization power.
One more thing that sets apart recycler view is that we can easily decorate our items with borders, dividers dynamically. In future, we might be using images in our lists, performance is better in the case of recycler view. Also, according to me with should go with latest trends and features, in future, they might save a lot of time.
Go ahead and send a pull request then, I will test your implementation
Continue discussion over in #software:android-client