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

Windows: Implement hintText for searchbar

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.1
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2017 Sprint 12 SDK

      Description

      Description

      Implement the hintText property for SearchBar. Demo code below

      var win = Ti.UI.createWindow();
      var searchWithHintText = Ti.UI.createSearchBar({
          hintText: 'Search...',
          color: "#333",
          top: 250,
          width: 300,
          backgroundColor: "#fff"
      });
      var searchWithoutHintText = Ti.UI.createSearchBar({
          color: "#333",
          top: 300,
          width: 300,
          backgroundColor: "#fff"
      });
      var setMethBtn = Ti.UI.createButton({
          title: 'Set the hintText via method',
          top: '15'
      });
      var setPropBtn = Ti.UI.createButton({
          title: 'Set the hintText via prop',
          top: 50
      });
      setMethBtn.addEventListener('click', function () {
          searchWithHintText.setHintText('Changed search text via method');
      });
      setPropBtn.addEventListener('click', function () {
          searchWithHintText.hintText = 'Changed search text via prop';
      });
      var getBtn = Ti.UI.createButton({
          title: 'Get the hintText',
          top:  150
       
      });
      getBtn.addEventListener('click', function () {
          console.log(searchWithHintText.hintText);
          console.log(searchWithHintText.getHintText());
      });
      win.add(setMethBtn);
      win.add(setPropBtn);
      win.add(getBtn);
      win.add(searchWithHintText);
      win.add(searchWithoutHintText);
      win.open();
      

      Expected
      1. Two searchBars one without hintText one with
      2. Clicking 'Set the hintText via method ' should update the hintText
      3. Clicking 'Set the hintText via prop ' should update the hintText
      4. Clicking 'Get the hintText' should print the hintText twice (access property and getHintText)

        Attachments

          Activity

            People

            • Assignee:
              eharris Ewan Harris
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Kota Iguchi
              Tester:
              Samir Mohammed
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                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