You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by akreienbring <gi...@git.apache.org> on 2015/04/05 13:08:39 UTC

[GitHub] cordova-plugin-inappbrowser pull request: Added editablelocation o...

Github user akreienbring commented on the pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/73#issuecomment-89753645
  
    I just found a problem with the code of this pull request:
    Once you opend an Inappbrowser with the option 'editablelocaction=yes' all subsequent instances of Inappbrowser will also show an editable location bar.
    
    I solved this locally by:
    Removing this method:
    ```
        /**
         * Should we make the location bar editable?
         * @return boolean
         */
        private boolean getEditableLocationBar() {
            return this.editableLocationBar;
        }
    ```
    and adding this:
    ```
        /**
         * Display a new browser with the specified URL.
         *
         * @param url           The url to load.
         * @param jsonObject
         */
        public String showWebPage(final String url, HashMap<String, Boolean> features) {
            // Determine if we should hide the location bar.
            showLocationBar = true;
            openWindowHidden = false;
            editableLocationBar = false;
        ....
    ```
    
    And then I simply youse the option when creating the editText like this:
    ````
                    if(!editableLocationBar) {
                        edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE
                    }
    ````



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org