예제 #1
0
 @Override
 public void onStart() {
   if (DEBUG_LIFECYCLE) logger.warn("{} onStart()", fullName);
   super.onStart();
   started = true;
   activity.bind(this);
   //noinspection deprecation
   uiLines.setBackgroundColor(0xFF000000 | ColorScheme.get().defaul[ColorScheme.OPT_BG]);
 }
예제 #2
0
 @Override
 public void onStart() {
   if (DEBUG_LIFECYCLE) logger.debug("onStart()");
   super.onStart();
   started = true;
   uiSend.setVisibility(P.showSend ? View.VISIBLE : View.GONE);
   uiTab.setVisibility(P.showTab ? View.VISIBLE : View.GONE);
   uiLines.setBackgroundColor(0xFF000000 | ColorScheme.get().defaul[ColorScheme.OPT_BG]);
   EventBus.getDefault().registerSticky(this);
 }
예제 #3
0
 public static void loadColorSchemeFromPreferences(@NonNull Context context) {
   String path =
       android.preference.PreferenceManager.getDefaultSharedPreferences(context)
           .getString(PREF_COLOR_SCHEME, PREF_COLOR_SCHEME_D);
   Properties p = loadColorScheme(path, context.getAssets());
   if (p == null)
     Toast.makeText(
             context,
             context.getString(R.string.pref_theme_loading_error, path),
             Toast.LENGTH_SHORT)
         .show();
   else ColorScheme.set(new ColorScheme(p));
 }