如何在string.xtml中设置颜色和大小

时间:2019-04-28 15:25:11

标签: android

带有适配器的旋转器,部分问题的描述如下:

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”分配颜色和大小?这是第一个不变的微调元素。

0 个答案:

没有答案