Here goes a small code for looping in android using java. Layout to which we add views <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/content"> </LinearLayout> Lets create views in for loop and add to above layout LinearLayout content=(LinearLayout)findViewById(R.id.content); int[5] x={1,2,3,4,5}; for(int i:x) { Button butn=new
Sunday, 22 November 2015
Subscribe to:
Posts (Atom)