Commit Graph

4 Commits

Author SHA1 Message Date
cketti 93b94f58c8 Add support for 'theme packs'
Right now only replacing the icon in the action bar is supported.
That's why the term "Icon Pack" is used in the UI.

Known bug: In a PreferenceActivity the second level still shows the
default app icon in the action bar :(

Icon packs need to include an activity with an intent filter for
the action "org.k9mail.THEME_PACK".

Example:

<activity android:name=".SomeActivity">
  <intent-filter>
    <action android:name="org.k9mail.THEME_PACK" />
  </intent-filter>

  <!-- Version number for the theme pack format -->
  <meta-data android:name="version" android:value="1"/>

  <meta-data android:name="name" android:value="Fancy icon"/>
  <meta-data android:name="author" android:value="cketti"/>
  <meta-data android:name="icon_app"
             android:resource="@drawable/ic_app"/>
</activity>
2013-07-01 07:35:01 +02:00
m0viefreak a74d57cb71 MessageView: Theme fix when global and message view theme differ
- Since the split-view change, MessageView is only a fragment, so we
  can't call setTheme() anymore so easily.
  Instead, use a ContextThemeWrapper and use that to inflate the
  layout. This way the message header and attachment view
  are styled correctly.

- The HTC WebView fix in SingleMessageView was returning the wrong
  background color, when message view theme and global theme differ,
  because it always used the global theme to retrieve it.
  Fix: Specifically put the light/dark values in the themes.xml,
  and get them using getContext().getTheme().resolveAttribute().
  getContext() will use the ContextThemeWrapper from above, so
  even if the global and message view themes differ, it aleays
  returns the correct one.
  The getThemeBackgroundColor() method added to the K9ActivityMagic
  interface in 309eeb72ac is now not
  needed anymore, and was removed.
2013-02-04 19:30:40 +01:00
cketti e66dd3d521 Fixed unit tests 2012-10-08 14:43:34 +02:00
cketti 8a226972a5 Extracted functionality common to most activities to K9ActivityCommon 2012-10-05 18:14:07 +02:00