Example #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);

    mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    mRes = getResources();

    setFinishOnTouchOutside(mPrefs.getBoolean(SettingsFragment.QUICKREPLY_TAP_DISMISS, true));
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
    setContentView(getLayoutResource());
    ThemeManager.loadThemeProperties(this);

    ((QKFrameLayout) findViewById(R.id.popup)).setBackgroundTint(ThemeManager.getBackgroundColor());

    View title = findViewById(R.id.title);
    if (title != null && title instanceof AppCompatTextView) {
      title.setVisibility(View.GONE);
    }
  }
Example #2
0
  public void setOnColorBackground(boolean onColorBackground) {
    if (onColorBackground != mOnColorBackground) {
      mOnColorBackground = onColorBackground;

      if (onColorBackground) {
        if (mType == FontManager.TEXT_TYPE_PRIMARY) {
          setTextColor(ThemeManager.getTextOnColorPrimary());
          setLinkTextColor(ThemeManager.getTextOnColorPrimary());
        } else if (mType == FontManager.TEXT_TYPE_SECONDARY
            || mType == FontManager.TEXT_TYPE_TERTIARY) {
          setTextColor(ThemeManager.getTextOnColorSecondary());
        }
      } else {
        if (mType == FontManager.TEXT_TYPE_PRIMARY) {
          setTextColor(ThemeManager.getTextOnBackgroundPrimary());
          setLinkTextColor(ThemeManager.getColor());
        } else if (mType == FontManager.TEXT_TYPE_SECONDARY
            || mType == FontManager.TEXT_TYPE_TERTIARY) {
          setTextColor(ThemeManager.getTextOnBackgroundSecondary());
        }
      }
    }
  }