Booking-Seats-Layout-Sample | dynamic layout for booking seats
kandi X-RAY | Booking-Seats-Layout-Sample Summary
kandi X-RAY | Booking-Seats-Layout-Sample Summary
Varun John Sr. Android Developer varunjohn1990@gmail.com Skype varun.john1990 Follow me for other samples and libraries like these.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize the activity
- Region Toast
Booking-Seats-Layout-Sample Key Features
Booking-Seats-Layout-Sample Examples and Code Snippets
Community Discussions
Trending Discussions on Booking-Seats-Layout-Sample
QUESTION
I'm just one step to getting this dynamic layout work for me but I just cant figure out what I'm doing wrong.
I have the following string:
AAA__AB/
_AAAAAA/
_AAABBB/
I'm supposed to convert the above strings to a rooms layout whereby:
A - Represents available rooms
B - Represents booked rooms
_ - Represents a space
/ - Represents a new line
I have been following this tutorial Dynamic bus seats layout to try and make an app that can create Apartment rooms layout dynamically in RecyclerView.
I have a horizontally oriented recyclerview as the parent recyclerView. I have an adapter and a data source from a webserver.
Everything is working fine apart from the NEW_LINE feature which is supposed to force the recyclerview add a new line/row so that the rest of the views may align themselves in the new row/line
Please help
The following is what I get
The way my layout looks like as at now
The following is what I want
The intended layout
The Main Activity.java
ANSWER
Answered 2018-Sep-24 at 19:40What you want is GridLayoutManager with column count of maximum of length of all rows. (You can set it as lcm of length of all inputs)
Iterate through each input and set column span as required. Let me know if anything is not clear.
Edit: Adding sample code
TestActivity.java
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Booking-Seats-Layout-Sample
You can use Booking-Seats-Layout-Sample like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Booking-Seats-Layout-Sample component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page