Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13680

Android: functionality or some event to get hide keyboard button press event.

    Details

    • Type: New Feature
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: Release 3.0.2, Release 3.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Android Nexus devices, Titanium Mobile SDK

      Description

      When we click on any text field or text area then on Nexus device where hardware back button actually now soft touch button, gets converted to Hide Keyboard button.

      There is not such event or callback through which we can get this event.

      *sample code*

      var win1 = Ti.UI.createWindow({
      	backgroundColor:"gray",
      	focusable:true
      });
       
      var button1 = Ti.UI.createButton({
      	top:10,
      	left:10,
      	height:100,
      	width:200,
      	title:"click me",
      	focusable:true
      });
       
      var txt1 = Ti.UI.createTextField({
      	top:150,
      	left:10,
      	height:200,
      	width:400,
      	value:"type here",
      	focusable:true
      	
      });
       
       
      txt1.addEventListener("keypressed",function(){
      	alert("keypressed text field");
      });
       
      txt1.addEventListener("blur",function(){
      	alert("blur txt");
      });
       
      txt1.addEventListener("keypressed",function(){
      	alert("window keypressed");
      });
       
      win1.addEventListener("keypressed",function(){
      	alert("windows keypressed");
      });
       
      win1.addEventListener("blur",function(){
      	alert("blur window");
      });
       
       
       
      win1.add(txt1);
       
      win1.open();
      
      

      Steps to check:
      1: Use this code in app.js and install the app on nexus 7 device.
      2: tap on the text field and then see the android back button.
      3: Note that back button is converted to hide keyboard button.
      4: now when we press this button then no event is there to find that.
      5: keyboard hide without any possibility to detect this touch event on back button.

        Attachments

          Activity

            People

            • Assignee:
              msamah Ashraf Abu (Inactive)
              Reporter:
              anigam Ashish Nigam
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code