Fixed nullpointer exception in webview loader
This commit is contained in:
parent
35e65efb18
commit
3692119bed
@ -228,8 +228,10 @@ public class ItemDescriptionFragment extends SherlockFragment {
|
|||||||
} else {
|
} else {
|
||||||
data = StringEscapeUtils.unescapeHtml4(contentEncodedRef);
|
data = StringEscapeUtils.unescapeHtml4(contentEncodedRef);
|
||||||
}
|
}
|
||||||
|
Activity activity = getActivity();
|
||||||
TypedArray res = getActivity().getTheme()
|
if (activity != null) {
|
||||||
|
TypedArray res = getActivity()
|
||||||
|
.getTheme()
|
||||||
.obtainStyledAttributes(
|
.obtainStyledAttributes(
|
||||||
new int[] { android.R.attr.textColorPrimary });
|
new int[] { android.R.attr.textColorPrimary });
|
||||||
int colorResource = res.getColor(0, 0);
|
int colorResource = res.getColor(0, 0);
|
||||||
@ -238,6 +240,9 @@ public class ItemDescriptionFragment extends SherlockFragment {
|
|||||||
Log.i(TAG, "text color: " + colorString);
|
Log.i(TAG, "text color: " + colorString);
|
||||||
res.recycle();
|
res.recycle();
|
||||||
data = getWebViewStyle(colorString) + data;
|
data = getWebViewStyle(colorString) + data;
|
||||||
|
} else {
|
||||||
|
cancel(true);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user