use of android.graphics.drawable.ColorDrawable in project photo-picker-plus-android by chute.
the class BaseActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setEnterTransition(new Explode());
getWindow().setExitTransition(new Explode());
}
setContentView(getLayoutResource());
Toolbar toolBar = (Toolbar) findViewById(R.id.toolbar);
if (toolBar != null) {
toolBar.bringToFront();
setSupportActionBar(toolBar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setIcon(new ColorDrawable(android.R.color.transparent));
getSupportActionBar().setTitle(R.string.choose_service);
setToolBar(toolBar);
}
}
use of android.graphics.drawable.ColorDrawable in project SimplifyReader by chentao0707.
the class SwipeBackActivityHelper method onActivityCreate.
@SuppressWarnings("deprecation")
public void onActivityCreate() {
mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(R.layout.swipeback_layout, null);
mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
@Override
public void onScrollStateChange(int state, float scrollPercent) {
}
@Override
public void onEdgeTouch(int edgeFlag) {
Utils.convertActivityToTranslucent(mActivity);
}
@Override
public void onScrollOverThreshold() {
}
});
}
use of android.graphics.drawable.ColorDrawable in project MyDiary by erttyy8821.
the class SettingActivity method setThemeColor.
private void setThemeColor() {
IV_setting_theme_main_color.setImageDrawable(new ColorDrawable(themeManager.getThemeMainColor(this)));
IV_setting_theme_dark_color.setImageDrawable(new ColorDrawable(themeManager.getThemeDarkColor(this)));
}
use of android.graphics.drawable.ColorDrawable in project MyDiary by erttyy8821.
the class ThemeManager method getContactsBgDrawable.
public Drawable getContactsBgDrawable(Context context, long topicId) {
Drawable bgDrawable;
File memoBg = new File(new FileManager(context, FileManager.CONTACTS_ROOT_DIR).getDirAbsolutePath() + "/" + topicId + "/" + CUSTOM_TOPIC_BG_FILENAME);
if (memoBg.exists()) {
bgDrawable = Drawable.createFromPath(memoBg.getAbsolutePath());
} else {
switch(currentTheme) {
case TAKI:
bgDrawable = ViewTools.getDrawable(context, R.drawable.contacts_bg_taki);
break;
case MITSUHA:
bgDrawable = ViewTools.getDrawable(context, R.drawable.contacts_bg_mitsuha);
break;
default:
bgDrawable = new ColorDrawable(SPFManager.getMainColor(context));
break;
}
}
return bgDrawable;
}
use of android.graphics.drawable.ColorDrawable in project MyDiary by erttyy8821.
the class ThemeManager method getMemoBgDrawable.
public Drawable getMemoBgDrawable(Context context, long topicId) {
Drawable bgDrawable;
File memoBg = new File(new FileManager(context, FileManager.MEMO_ROOT_DIR).getDirAbsolutePath() + "/" + topicId + "/" + CUSTOM_TOPIC_BG_FILENAME);
if (memoBg.exists()) {
bgDrawable = Drawable.createFromPath(memoBg.getAbsolutePath());
} else {
switch(currentTheme) {
case TAKI:
bgDrawable = new ColorDrawable(Color.WHITE);
break;
case MITSUHA:
bgDrawable = new ColorDrawable(Color.WHITE);
break;
default:
bgDrawable = new ColorDrawable(Color.WHITE);
break;
}
}
return bgDrawable;
}
Aggregations