android


Create a RecyclerView with both horizontal and vertical scrolling


Over the past few weeks I've been learning to use the RecyclerView. I need to implement a horizontal list, ie, that by turning the device in landscape mode like so:
I found the best solution for this (how to create the horizontal displacement of RecyclerView, here), but encountered another problem. The item RecyclerView was larger than the height of the device (in landscape, horizontal), so I need to create a vertical and horizontal displacement, simultaneously.
I looked at the Android Developer methods for the LayoutManager class, but my skills are not high enough to understand most of the methods. I also tried putting a RecyclerView vertically inside another RecyclerView horizontally with all the content, but I get error:
IllegalStateException: RecyclerView has no LayoutManager
To rememedy this I removed all <View ... /> elements from the XML file, but this does not give any results.
To clarify what I am asking: is it possible to have my layout scroll both horizontally and vertically, and if you could explain how I would appreciate it.
I was so angry about all the problems that had tended with the application that had not thought about the easiest solution.
In a RecyclerView consists of two XML files, the main one where the RecyclerView is declared and another with content.
The simplest solution was to introduce the RecyclerView within a ScrollView. So I can move all items at a time thanks to ScrollView vertically and horizontally I can move the items thanks to RecyclerView in landscape mode.
activity_main.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="#dimen/cardIn_margin_ext">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbarStyle="outsideInset"
android:scrollbars="horizontal" />
</ScrollView>

Related Links

Android - Create a Toast anchored to a View
Android:- Fragments and Tabs
Different android:minSdkVersion and targetSdkVersion causing performance problems
Boolean not working in my async task
Android Webview looking poor quality than system browser
cocos2d-android documentation
Set Live Wallpaper Programmatically on Rooted Device Android
Getting error at WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER
How to get maximum amplitude (decibel value) of an audio track/mic recording in Android?
Android: Is there any api for Nimbuzz? [closed]
Android USB request permission for multiple devices
Tabs + ViewPager + FragmentStatePagerAdapter - How to remove fragment?
View pager with fragments - showing dialog onStart
Can we update the part of canvas without updating entire canvas?
Change TextView text
how to fetch first 20 contact from gmail using google api in android programmatically

Categories

HOME
django
dns
alexa-skills-kit
object
datastore
socket.io
aws-cli
cq5
nuget-package
banner
angularfire2
retrofit2
character
barcode
augeas
drop-down-menu
mongodb-csharp
altera
dimensional-modeling
jersey-1.0
soci
connector
topology
cgbitmapcontext
href
comparator
dapper-extensions
pic32
apktool
autodesk-designautomation
vue-chartjs
indy10
servicestack-text
apiary.io
openproject
ods
health-monitoring
opensmpp
apache-stanbol
apriori
pom.xml
servermanager
sonarlint-eclipse
mschart
fclose
vugen
stdmap
edit
flex-monkey
ziparchive
centrifuge
windows-azure-queues
x-tag
refinerycms
android-wake-lock
mediametadataretriever
database-relations
invoke-sqlcmd
false-sharing
atan2
character-replacement
decimalformat
lasso
atoi
baasbox
rdflib
osc
shopizer
xmltype
broadband
cross-join
variadic-templates
showdialog
addressing-mode
tweenlite
draw2d-js
menubar
dtmf
cnf
cmmi
font-awesome-4.0.0
alice
panda3d
boost-msm
web-farm
xcode3.2
saleslogix
pyunit
appjs
fitbounds
workflow-services
update-statement
xui
tmx
cdonts
cruisecontrol.rb
non-clustered-index
drupal-fivestar
qtabbar
mathematical-notation
sun
ifilter

Resources

Encrypt Message