Allow mixed content
This commit is contained in:
parent
5ea11ca748
commit
2d5995d1a5
|
@ -10,6 +10,7 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
@ -61,7 +62,6 @@ public class ItemDescriptionFragment extends Fragment {
|
|||
private String selectedURL;
|
||||
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
@ -81,6 +81,10 @@ public class ItemDescriptionFragment extends Fragment {
|
|||
webvDescription.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||
// Use cached resources, even if they have expired
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webvDescription.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
|
||||
webvDescription.getSettings().setUseWideViewPort(false);
|
||||
webvDescription.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
||||
webvDescription.getSettings().setLoadWithOverviewMode(true);
|
||||
|
|
|
@ -198,6 +198,9 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
|
|||
webvDescription.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||
// Use cached resources, even if they have expired
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webvDescription.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
webvDescription.getSettings().setUseWideViewPort(false);
|
||||
webvDescription.getSettings().setLayoutAlgorithm(
|
||||
WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||
|
|
Loading…
Reference in New Issue