带有适配器的旋转器,部分问题的描述如下:
private void initializeStoragePathSpinner() {
String screenshotsDir = AppPreferences.getInstance().getScreenshotsDir();
List<GalleryStoragePath> storagePaths = GalleryStorage.getStoragePaths();
storagePaths.add(0, new GalleryStoragePath(getResources().getString(R.string.snk)));
mStoragesArrayAdapter = new StoragesArrayAdapter(this, storagePaths);
mStoragePath.setAdapter(mStoragesArrayAdapter);
for (int i = 0; i < storagePaths.size(); i++) {
GalleryStoragePath sp = storagePaths.get(i);
if (sp.getType() == GalleryStoragePath.TYPE_PATH && sp.getFsPath().equals(screenshotsDir)) {
mStoragePath.setSelection(i);
break;
}
}
与storagePaths.add行相同(0,新的GalleryStoragePath(getResources()。getString(R.string.snk))));为文本“ R.string.snk”分配颜色和大小?这是第一个不变的微调元素。