mirror of
https://github.com/moparisthebest/k-9
synced 2025-03-03 10:01:59 -05:00
Extracted code to disable Lint warning when using newer API
This commit is contained in:
parent
1f2104cae1
commit
a281b3401e
@ -1,5 +1,6 @@
|
|||||||
package com.fsck.k9.view;
|
package com.fsck.k9.view;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
@ -98,16 +99,7 @@ public class MessageWebView extends WebView {
|
|||||||
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
disableOverscrolling();
|
||||||
* Build.VERSION.SDK is deprecated cause it just returns the
|
|
||||||
* "its raw String representation"
|
|
||||||
* http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#GINGERBREAD
|
|
||||||
* http://developer.android.com/reference/android/os/Build.VERSION.html#SDK
|
|
||||||
*/
|
|
||||||
if (Build.VERSION.SDK_INT >= 9) {
|
|
||||||
setOverScrollMode(OVER_SCROLL_NEVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
webSettings.setTextSize(K9.getFontSizes().getMessageViewContent());
|
webSettings.setTextSize(K9.getFontSizes().getMessageViewContent());
|
||||||
|
|
||||||
@ -116,6 +108,13 @@ public class MessageWebView extends WebView {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(9)
|
||||||
|
private void disableOverscrolling() {
|
||||||
|
if (Build.VERSION.SDK_INT >= 9) {
|
||||||
|
setOverScrollMode(OVER_SCROLL_NEVER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setText(String text, String contentType) {
|
public void setText(String text, String contentType) {
|
||||||
String content = text;
|
String content = text;
|
||||||
if (K9.getK9Theme() == K9.THEME_DARK) {
|
if (K9.getK9Theme() == K9.THEME_DARK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user