mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-12 12:35:04 -05:00
a74d57cb71
- 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.
33 lines
884 B
Java
33 lines
884 B
Java
package com.fsck.k9.activity;
|
|
|
|
import android.os.Bundle;
|
|
import android.view.MotionEvent;
|
|
|
|
import com.actionbarsherlock.app.SherlockActivity;
|
|
import com.fsck.k9.activity.K9ActivityCommon.K9ActivityMagic;
|
|
import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener;
|
|
|
|
|
|
public class K9Activity extends SherlockActivity implements K9ActivityMagic {
|
|
|
|
private K9ActivityCommon mBase;
|
|
|
|
|
|
@Override
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
mBase = K9ActivityCommon.newInstance(this);
|
|
super.onCreate(savedInstanceState);
|
|
}
|
|
|
|
@Override
|
|
public boolean dispatchTouchEvent(MotionEvent event) {
|
|
mBase.preDispatchTouchEvent(event);
|
|
return super.dispatchTouchEvent(event);
|
|
}
|
|
|
|
@Override
|
|
public void setupGestureDetector(OnSwipeGestureListener listener) {
|
|
mBase.setupGestureDetector(listener);
|
|
}
|
|
}
|