本文整理汇总了Java中com.justwayward.reader.ui.easyadapter.ReadThemeAdapter类的典型用法代码示例。如果您正苦于以下问题:Java ReadThemeAdapter类的具体用法?Java ReadThemeAdapter怎么用?Java ReadThemeAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReadThemeAdapter类属于com.justwayward.reader.ui.easyadapter包,在下文中一共展示了ReadThemeAdapter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAASet
import com.justwayward.reader.ui.easyadapter.ReadThemeAdapter; //导入依赖的package包/类
private void initAASet() {
curTheme = SettingManager.getInstance().getReadTheme();
ThemeManager.setReaderTheme(curTheme, mRlBookReadRoot);
seekbarFontSize.setMax(10);
//int fontSizePx = SettingManager.getInstance().getReadFontSize(bookId);
int fontSizePx = SettingManager.getInstance().getReadFontSize();
int progress = (int) ((ScreenUtils.pxToDpInt(fontSizePx) - 12) / 1.7f);
seekbarFontSize.setProgress(progress);
seekbarFontSize.setOnSeekBarChangeListener(new SeekBarChangeListener());
seekbarLightness.setMax(100);
seekbarLightness.setOnSeekBarChangeListener(new SeekBarChangeListener());
seekbarLightness.setProgress(SettingManager.getInstance().getReadBrightness());
isAutoLightness = ScreenUtils.isAutoBrightness(this);
if (SettingManager.getInstance().isAutoBrightness()) {
startAutoLightness();
} else {
stopAutoLightness();
}
cbVolume.setChecked(SettingManager.getInstance().isVolumeFlipEnable());
cbVolume.setOnCheckedChangeListener(new ChechBoxChangeListener());
cbAutoBrightness.setChecked(SettingManager.getInstance().isAutoBrightness());
cbAutoBrightness.setOnCheckedChangeListener(new ChechBoxChangeListener());
gvAdapter = new ReadThemeAdapter(this, (themes = ThemeManager.getReaderThemeData(curTheme)), curTheme);
gvTheme.setAdapter(gvAdapter);
gvTheme.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (position < themes.size() - 1) {
changedMode(false, position);
} else {
changedMode(true, position);
}
}
});
}
示例2: initAASet
import com.justwayward.reader.ui.easyadapter.ReadThemeAdapter; //导入依赖的package包/类
private void initAASet() {
curTheme = SettingManager.getInstance().getReadTheme();
ThemeManager.setReaderTheme(curTheme, mRlBookReadRoot);
seekbarFontSize.setMax(10);
//int fontSizePx = SettingManager.getInstance().getReadFontSize(bookId);
int fontSizePx = SettingManager.getInstance().getReadFontSize();
int progress = (int) ((ScreenUtils.pxToDpInt(fontSizePx) - 12) / 1.7f);
seekbarFontSize.setProgress(progress);
seekbarFontSize.setOnSeekBarChangeListener(new SeekBarChangeListener());
seekbarLightness.setMax(100);
seekbarLightness.setOnSeekBarChangeListener(new SeekBarChangeListener());
seekbarLightness.setProgress(ScreenUtils.getScreenBrightness());
isAutoLightness = ScreenUtils.isAutoBrightness(this);
this.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS), true, Brightness);
if (SettingManager.getInstance().isAutoBrightness()) {
startAutoLightness();
} else {
stopAutoLightness();
}
cbVolume.setChecked(SettingManager.getInstance().isVolumeFlipEnable());
cbVolume.setOnCheckedChangeListener(new ChechBoxChangeListener());
cbAutoBrightness.setChecked(SettingManager.getInstance().isAutoBrightness());
cbAutoBrightness.setOnCheckedChangeListener(new ChechBoxChangeListener());
gvAdapter = new ReadThemeAdapter(this, (themes = ThemeManager.getReaderThemeData(curTheme)), curTheme);
gvTheme.setAdapter(gvAdapter);
gvTheme.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (position < themes.size() - 1) {
changedMode(false, position);
} else {
changedMode(true, position);
}
}
});
}