Scroll text inside recyclerview element - android

I have a recyerview which contains in each row a picture, a title and a description.See here.
The height of an element of the recyclerview is fixed.
The problem is the description could be too long for the fixed height.
To solve it I would like to implement a vertical scrolling that could allow me to read everything in any cases.
I have no idea where I have to search to do that.
Someone has a good tutorial to follow ?
Thank you.

As far as I know, you will get scroll conflicts by doing this as the recyclerview will not know whether to scroll itself upwards or to scroll the actual text inside it's views.
A better approach is to implement an expandable textview, an easy to use library can be found here:
https://github.com/Manabu-GT/ExpandableTextView

Related

Is there a way to stack a CardView within a RecyclerView from the bottom instead of from the top?

I'm a newbie when it comes to Android coding, so please bear with me. I looked this up for quite some time before posting here, so that I don't waste your time with a question that I could have answered myself through some research.
Here's my issue: I have a CardView and I want the items to start popping up from the bottom instead of from the top. For example, something like this.
I found out that you can do this via the "stackFromBottom" XML attribute in ListViews and GridViews, but it doesn't work for CardViews.
I also noticed that you can change a ListView's gravity, but CardView doesn't seem to support that either.
So is there a simple way to populate the CardView in this way?
Any help would be greatly appreciated.
CardView can hold only a single item, so in this case you can have a ViewGroup inside the CardView , and add those items to the ViewGroup.
I'd suggest ConstraintLayout and constraint the first view to the bottom of the layout and next views are constraint to their bottom views so that you can fill them from the bottom.
If your list is big.. You can wrap the ConstraintLayout with ScrollView so that the items can be scrolled; or replace the entire approach by a RecyclerView
Since you said that you are using a recycler view you could use a simple property to accomplish what you need.

Recycler View Scroll to middle of screen

Hello I am not sure if this would be a duplicate as my wording is probably not the best to describe this on a search. I have a recycler view with a list of strings. Everything works great however, is there a way to make the list scroll a little higher than the bottom of the parent view, in this case keep scrolling up until it hits the middle of the screen? the Recycler view would height is match parent. Thank you in advance!!
Please note: I didnt add code since this is just a regular recycler view nothing special added, let me know if the code is needed as well thank you!
Edit:
this is for a vertical scroll list only. The following images are some list images I got offline but hopefully they can show better what I am trying to accomplish:
I want to be able to scroll the list up to the middle as in the following picture for example:

Horizontal scroll with gridview

Now i have to create a horizontal listview again, this time i want to find a better library for this, as far as i know android did not have a horizontal listview, and then i read this
http://developer.android.com/design/building-blocks/grid-lists.html
They mention if gridview can scroll horizontally, they even illustrated it with a picture. I try to find example of how to use gridview horizontally, but i have no luck,
is anyone here can help me how to use gridview scroll horizontally?
This is the best library for two way grid. I have used it and it works perfectly.
https://github.com/jess-anders/two-way-gridview
I'm end up using recyclerview as #tyczj recommend

List without scrolling

i need make a list that not have scrolling, because i will have two lists, and wish you had just one scroll, and they were wrap_content, there exist object to make it?
Thanks in advance
Sorry by my English
I up a image to you understand me
http://imagizer.imageshack.us/a/img819/4513/m0u2.jpg
listView.setScrollContainer(false);
More you can read here.
You should set fixed height for each ListView, using weight in your xml.
The way to do this: link.

Not able to move vertically when using a map inside Scrollview

In my android app I am not able to move vertically when I put a map inside a Scrollview and if I am using other layouts then the items at the bottom are not visible.I had seen all the solutions provided before my question but couldn't found any appropriate solution..Thanks in advance if anybody could be able provide me solution who to do it ?
Scroll view by default only scrolls vertically. Have a look at this answer, it might solve your problem.

Categories

Resources