SharedFlat | SharedFlat is a multitenancy library for .NET Core/.NET | DevOps library
kandi X-RAY | SharedFlat Summary
kandi X-RAY | SharedFlat Summary
SharedFlat is a multitenancy library for .NET Core/.NET Standard.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SharedFlat
SharedFlat Key Features
SharedFlat Examples and Code Snippets
Community Discussions
Trending Discussions on SharedFlat
QUESTION
I have a public class User
which has a field int userID
. Multiple User
objects are stored in another class, SharedFlat
, in an ArrayList
. In the Activity, I want to create and display a CheckBox for each User
object in the ArrayList
. Since the number of Users in the ArrayList, thus also the number of CheckBoxes, is variable, I've used a for-loop and the setID()
-method to set the userID
of the current User object to be the ID of the corresponding CheckBox:
ANSWER
Answered 2017-Apr-17 at 22:25I think you are on the right track with everything. For the first issue, using a for-loop is going to be the best way to set up your checkboxes. One optimization you could do is check which ones are checked when you are displaying them if that is even an option for you. Otherwise, you can just check the which boxes have checks and put those id's into an array, then check that id against your array of User values.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SharedFlat
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