Skip to content

Commit

Permalink
#357 - Fix an issue where setDisplayZoomControls can be called on dev…
Browse files Browse the repository at this point in the history
…ices with API < 11 (it isn't supported until API 11).
  • Loading branch information
daniloercoli committed Dec 3, 2013
1 parent 7c2e350 commit 5b26197
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ public class NotificationsWebViewActivity extends AuthenticatedWebViewActivity {

public static final String URL_TO_LOAD = "external_url";

@SuppressLint("NewApi")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setUserAgentString(Constants.USER_AGENT);
mWebView.getSettings().setDisplayZoomControls(false);
if (android.os.Build.VERSION.SDK_INT >= 11) {
mWebView.getSettings().setDisplayZoomControls(false);
}
mWebView.setWebChromeClient(new WordPressWebChromeClient(this));

ActionBar actionBar = getSupportActionBar();
Expand Down

0 comments on commit 5b26197

Please sign in to comment.