Comments (13)
I may help if you can give me more details about what you want to do.
from tableview.
i use android:layoutDirection="rtl"
I want to show the horizontal scrollbar recyclerView from the right for the first time.
from tableview.
from tableview.
As far as I understand, you want RecyclerView to scroll right on the first boot.
manager.smoothScrollToPosition(rvClub, null,0);
manager : FixedGridLayoutManager manager;
rvClub : your RecyclerView.
state and the position are not important at this time. keep it null and 0.
from tableview.
Unfortunately it didn't work 😢
from tableview.
Then I have no other solution or idea. Good luck. Please let me know when you find the answer.
from tableview.
Hi
How can I use scrollHorizontallyBy in the FixedGridLayoutManager?
from tableview.
The parameter dx means the change in x coordinate. In your case, you want to move it in the opposite direction. which means dx must be a negative value. But I have no idea about other parameters of scrollHorizontallyBy.
Still, I am not sure if you use manager.smoothScrollToPosition(rvClub, null,0) correctly.
/**
* Handles RecyclerView for the action
*/
private void setUpRecyclerView()
{
clubAdapter = new ClubAdapter(MainActivity.this, clubList);
FixedGridLayoutManager manager = new FixedGridLayoutManager();
manager.setTotalColumnCount(1);
rvClub.setLayoutManager(manager);
rvClub.setAdapter(clubAdapter);
rvClub.addItemDecoration(new DividerItemDecoration(MainActivity.this, DividerItemDecoration.VERTICAL));
manager.smoothScrollToPosition(rvClub, null, 0);
}
I got the following result from physical device, operating system Android 9.
from tableview.
Did you tried setReverseLayout(true) ? https://stackoverflow.com/questions/31728837/recyclerview-grow-element-from-right-to-left
from tableview.
Hi, Could you please help me out? I am trying to add views dynamically (not fixed in size) for each recycler view item, but the problem is after adding views, it's not scrolling horizontally. Attached screenshot for reference
.
from tableview.
Hi,
Can you give 200dp width to each element you add to the row of the RecyclerView and tell me if it works? The width of each row of the RecyclerView must be wrap_content.
Do you have the 16th, 17th or 20th element in each row?
from tableview.
Hi,
I tried to set a fixed height/width for the row item element, but still, it is not getting scroll. It gets scrolled when we have fixed views in each item of recycler view.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/score_text_view"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"
android:gravity="center"
android:textColor="@color/colorPrimaryDark" />
</RelativeLayout>
from tableview.
Then I have no other solution. Hope you can solve it.
from tableview.
Related Issues (3)
- sticky left column HOT 1
- notifydatasetchanged bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tableview.