I would like to create an array of LinearLayouts. In my application I have designed a xml file with ten LinearLayouts from those LinearLayouts contains layout id for each layout. I would like to maintain an LinearLayouts array for all the LinearLayouts. How can I do this?
I would like to create an array of LinearLayout s. In my application I
Share
You can store your layout ids in an int array. example
int []idArray;If you want to use them, only call
findViewById(idArray[index])and remember casting it to linear layout.or
setContentView(idArray[index]).