これよりもレイアウト内のすべてのビューを初期化するためのより迅速または短い方法はありますか:
row2[0] = (RelativeLayout) findViewById(R.id.ll22);
row2A[0] = (RelativeLayout) findViewById(R.id.ll22alt);
row2B[0] = (RelativeLayout) findViewById(R.id.ll22blank);
mOffsiteDataBackup[0] = (TextView) findViewById(R.id.ll22_backup);
mRam[0] = (TextView) findViewById(R.id.ll22_ram);
mCpu[0] = (TextView) findViewById(R.id.ll22_cpu);
mHdd[0] = (TextView) findViewById(R.id.ll22_hdd);
mOs[0] = (TextView) findViewById(R.id.ll22_system);
mStatusIcon[0] = (ImageView) findViewById(R.id.ll22_image);
.
.
.
ビューを見つけるためだけにたくさんの行を書くのは本当に面倒です。それらをすべて見つけていくつかのリスナーを初期化するまで、onCreate
400 行以上ありますが、これは絶対に望んでいないことです。
ヒントをありがとう!