i must repeat code in click button 100 once .only 1 add to numbers this very difficult . i must be use array and loop .please help me?
for (i=1;to i<100;i++)[
textBox[i]…
]
Can you explain more clearly what you want?
Add 1 to the value in the text box every time you click a button until…?
hi. i want make a cross word with 100 textBox.i want user can only one charecter write in a text box .i have 100 textbox and must add 100 once this code .
I'm sorry, I still do not understand what it is you want to do:
I have 100 textboxs and want users can write only one character in these(number of character that user write in textBox is 1).these textBoxs made a cross word.
I use this
for cross word .
i have 100 textBox(TextBox1,textBox2,textBox3 ,…)
I understand that part. Why do you want a for loop ?
hi.this is for a textBox.
i have 100 textBox . Do I need to add 100 of these???for textBox1 ,for textBox2 ,… for textBox 100.excuse me my english language is very bad.
i made this project with android studio.
http://bayanbox.ir/info/6246949061177089004/KermanJadval5
Ahh OK - you need a list of the textboxes and to use the any component blocks for that. I will make an example of what to do for you.
This will check over all the textboxes:
hi thanks it is very excellent idea.
in android studio,when i introduce objects :
android:id="@+id/button_0"
android:id="@+id/button_1"
android:id="@+id/button_2"
android:id="@+id/button_3"
android:id="@+id/button_4"
android:id="@+id/button_5"
android:id="@+id/button_6"
android:id="@+id/button_7"
android:id="@+id/button_8"
…
android:id="@+id/button_100"
this is very difficult.i use below code instead of above codes:
for (int i = 0; i < 100; i++) {
String buttonID = "button_" + i;
int resID = getResources().getIdentifier(buttonID, "id", getPackageName());
buttons[i] = findViewById(resID);
}
}
in appinventor i use:
.
.
.
are there same above code(in android studio ) for simlify in appinventor and reduce numer of codes?
As far as I know, there is no other method for making a list of components
hi ,very thanks
You can mitigate the problem by declaring them one row at a time in a table.
That reduces the Blocks Editor pain of too many sockets in a block to fit your screen.
That also allows for the possibility of addressing the components by row and column.
hi thanks . i read .i hope that i understand .
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.