Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2325] ScrollView issue: On Android 4.1+, Views with height > 699 within the ScrollView are not displayed

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-12-15T18:12:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterAthila Santos
AssigneeRitu Agrawal
Created2013-12-05T17:28:17.000+0000
Updated2016-03-08T07:41:20.000+0000

Description

Titanium version: 3.1.1 Issue: On Android 4.1+, Views with height > 699 within the ScrollView are not displayed

Steps to reproduce:

- Set ti.ui.defaultunit property on tiapp.xml to "dip" - Create a scrollView with the following properties: layout: "vertical", contentWidth: "auto", contentHeight: "auto" - Add some Views to it. - Add a tableView (or a regular View) to it and make it grow until its height is higher than 699.

Observed Result:

- The big view disappears from the scrollView

Observations:

- The issue does not reproduce on Android 4.0 and below. - If we set the property: android:hardwareAccelerated="false" within the tag in tiapp.xml, the issue does not reproduce.

Comments

  1. Mostafizur Rahman 2013-12-07

    Hello, We tested this issue the test code below. We can’t reproduce this issue. In our sample code, we have used all properties that you mentioned. Please let us know if you notice anything different. We will mark this "resolved" but wait for your feedback before closing this. Please keep us posted. Regards,

    Testing Environment:

    OS: MAC OS X 10.8.5 Ti SDK: 3.1.3 GA Ti CLI: 3.3.0 Android Device/Emulator Android SDK 4.2.2

    Test Code

       var win = Ti.UI.createWindow({
        backgroundColor : 'white',
        exitOnClose : true,
        fullscreen : false,
        title : 'ScrollView Demo'
       });
       
       var scrollView = Ti.UI.createScrollView({
        contentWidth : 'auto',
        contentHeight : 'auto',
        layout : 'vertical',
       
       });
       win.add(scrollView);
       
       var tableView = Ti.UI.createTableView({
        minRowHeight : 80
       });
       scrollView.add(tableView);
       var data = [];
       
       function makeid() {
        var text = "";
        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
       
        for (var i = 0; i < 5; i++)
         text += possible.charAt(Math.floor(Math.random() * possible.length));
       
        return text;
       }
       
       for (var i = 0, j = 100; i < j; i++) {
        data.push({
         title : ' Random Text: ' + makeid()
        });
       
       };
       
       tableView.setData(data);
       
       tableView.addEventListener('click', function(e) {
       
        alert(tableView.getHeight());
       });
       
       win.open();
       
       

    Step to reproduces

    Create a new project

    Paste test code in app.js

    Set ti.ui.defaultunit property on tiapp.xml to "dip"

    Android Device/Emulator

    TableView will displayed

    Thanks
  2. Ritu Agrawal 2013-12-10

    [~athilahs]We tried to replicate the problem based on your description and were not able to reproduce it with the sample code and steps listed above. Can you please try out this sample code and see if the problem still exist?
  3. Athila Santos 2013-12-13

    Hi Ritu. I can see that you used a different SDK in your tests. Could you please try it again using the 3.1.1 SDK? Is it possible that this issue is fixed in the Titanium 3.1.3 ? Thanks Athila
  4. Ritu Agrawal 2013-12-13

    [~athilahs@gmail.com] We highly recommend that you use Titanium 3.1.3 as it has many more fixes and features. We were not able to reproduce this issue with 3.1.3 SDK so please upgrade and let us know if the issue persists.

JSON Source