Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto complete for loop in Android studio

Tags:

I'm using Android studio and i'm trying to find a way to use a very common thing i used to do in eclipse. when i'm writing (for example) a for loop, i'm writing the word "for" then i click on Ctrl+Space and eclipse autocomplete to a for loop with all the parameters including

for (int i=0 ; i<mCheckBoxArray.length;i++){             mCheckBoxArray[i].setChecked(false);         } 

but now, in Android studio it just auto complete to for(). the for loop its just an example, does anybody knows how to do this in android studio?

like image 543
digitalmidges Avatar asked Mar 16 '15 11:03

digitalmidges


People also ask

How to enable autocomplete in Android Studio?

Users can enable or disable autofill as well as change the autofill service by navigating to Settings > System > Languages & input > Advanced > Input assistance > Autofill service.

Why is auto complete not working in Android Studio?

if the autocomplete isn't working for you in Android Studio, just press File and uncheck the Power save mode, it should work fine after that. if power save mode is already unchecked then first check then uncheck them.

What is for loop in Android Studio?

Kotlin for loop is used to iterate a part of program several times. It iterates through arrays, ranges, collections, or anything that provides for iterate.


2 Answers

You can try fori from suggestion list

enter image description here

like image 96
Bhavesh Hirpara Avatar answered Oct 19 '22 21:10

Bhavesh Hirpara


More you can see like iter Iterate (for each..in) itin Iterate (for..in) itli Iterate over a List itar Iterate elements of array ritar Iterate elements of array in reverse order

like image 24
jettimadhuChowdary Avatar answered Oct 19 '22 21:10

jettimadhuChowdary