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

Android: ListView textfield inside headerView types backwards

    Details

      Description

      Test code:

      var sections = [];
      	 
      	var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
      	var fruitDataSet = [
      	    {properties: { title: 'Apple', searchableText:' Fruits Apple', itemId:'0 0'}},
      	    {properties: { title: 'Banana', searchableText:'Fruits Banana', itemId:'0 1'}},
      	    {properties: { title: 'Cantaloupe', searchableText:'Fruits Cantaloupe', itemId:'0 2'}},
      	    {properties: { title: 'Fig', searchableText:'Fruits Fig', itemId:'0 3'}},
      	    {properties: { title: 'Guava', searchableText:'Fruits Guava', itemId:'0 4'}},
      	    {properties: { title: 'Kiwi', searchableText:'Fruits Kiwi', itemId:'0 5'}},
      	];
      	fruitSection.setItems(fruitDataSet);
      	sections.push(fruitSection);
      	 
      	var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});
      	var vegDataSet = [
      	    {properties: { title: 'Carrots', searchableText:'Vegetables Carrots', itemId:'1 0'}},
      	    {properties: { title: 'Potatoes', searchableText:'Vegetables Potatoes', itemId:'1 1'}},
      	    {properties: { title: 'Corn', searchableText:'Vegetables Corn', itemId:'1 2'}},
      	    {properties: { title: 'Beans', searchableText:'Vegetables Beans', itemId:'1 3'}},
      	    {properties: { title: 'Tomato', searchableText:'Vegetables Tomato', itemId:'1 4'}},
      	];
      	vegSection.setItems(vegDataSet);
      	sections.push(vegSection);
      	 
      	 
      	var fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});
      	var fishDataSet = [
      	    {properties: { title: 'Cod', searchableText:'Fish Cod', itemId:'2 0'}},
      	    {properties: { title: 'Haddock', searchableText:'Fish Haddock', itemId:'2 1'}},
      	    {properties: { title: 'Salmon', searchableText:'Fish Salmon', itemId:'2 2'}},
      	    {properties: { title: 'Tuna', searchableText:'Fish Tuna', itemId:'2 3'}},
      	];
      	fishSection.setItems(fishDataSet);
      	sections.push(fishSection);
      	
      	var animalsSection = Ti.UI.createListSection({ headerTitle: 'Animals'});
      	var animalsDataSet = [
      	    {properties: { title: 'Deer', searchableText:'Animals Deer', itemId:'3 0'}},
      	    {properties: { title: 'Dog', searchableText:'Animals Dog', itemId:'3 1'}},
      	    {properties: { title: 'Cat', searchableText:'Animals Cat', itemId:'3 2'}},
      	    {properties: { title: 'Elephant', searchableText:'Animals Elephant', itemId:'3 3'}},
      	];
      	animalsSection.setItems(animalsDataSet);
      	sections.push(animalsSection);
       
      	var tf = Ti.UI.createTextField({
      	    color: '#336699',
      	    height: 100,
      	    top:10,
      	    bottom:10,
      	    left:10,
      	    right:10,
      	    font:{fontSize:20,fontWeight:'bold'},
      	    hintText: 'Search'
      	});
      	
      	tf.addEventListener('change',function(e){
      	    listView.searchText = e.value;
      	});
      	
      	var button = Ti.UI.createButton({top: 100, title: "toggle caseInsensitive"});
      	
      	button.addEventListener('click', function(e) {
      	     if (listView.caseInsensitiveSearch) {
      	     	listView.caseInsensitiveSearch = false;
      	     } else {
      	        listView.caseInsensitiveSearch = true;
      	     }
      	});
      	
      	//The textfield must be a subview of the tableView to 
      	//calculate correct contentInsets when keyboard is visible. 
      	var listView = Ti.UI.createListView({top: 250, headerView: tf});
      	listView.sections = sections;
      	
      	var win = Ti.UI.createWindow({windowSoftInputMode:Ti.UI.Android.SOFT_INPUT_ADJUST_PAN});
      	win.add(listView);
      	win.open();
      
      

      1. Run code, focus the textfield and type 'apple'. Notice how the cursor is stuck at one position.
      2. Hit back space to delete all letters, retype 'apple'. Then move cursor manually to position 2, between 'p' and 'l'. Type 'hello'. Notice how 'hello' is being written backwards

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                hpham Hieu Pham
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-17662
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration