Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android java random fragment on create

randomFragmentNum = random.nextInt(250);
            if (randomFragmentNum < 50) {
                randomFragmentNum = 0;
            } else if (randomFragmentNum < 100) {
                randomFragmentNum = 1;
            } else if (randomFragmentNum < 150) {
                randomFragmentNum = 2;
            } else if (randomFragmentNum < 200) {
                randomFragmentNum = 3;
            } else 
                randomFragmentNum = 4;
            } 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #java #random #fragment #create
ADD COMMENT
Topic
Name
4+8 =