내 레이아웃 파일에 순차적으로 번호가 매겨진 네 개의 버튼이 있습니다. 내 코드에서 나는 우리가 루프에있는 두 번째 시간 주위에 예를 들어, 내가 advert2 다시 얻을 것이라고 루프에있는 위치에 해당하는 광고를 루프에 넣고 싶습니다.프로그래밍 방식으로 findViewByID
누구든지 도움을 줄 수 있습니다. 감사합니다
Button advert1 = (Button) findViewById(R.id.advert1);
Button advert2 = (Button) findViewById(R.id.advert2);
Button advert3 = (Button) findViewById(R.id.advert3);
Button advert4 = (Button) findViewById(R.id.advert4);
볼 http://stackoverflow.com/a/4865350/739270 –