Closed davidmgallardo closed 8 years ago
I don't see anything weird, apart from that you are using percentages. Why is that? I've never seen anyone use that (for such a layout at least). I have no idea if that is why it breaks, but it could be.
Use percentages for the design fits all mobile device formats. The truth is that it is weird.
I'm sorry but I can't look into specific cases in detail. Maybe if you can strip out as much as you can while still being able to reproduce this as a bug and attach a project I can simply run and study I can have a look, but that's a far as my time allows atm, sorry.
Finally managed to solve the problem . Within the widget.js where control is created Android and calls the module com.rkam.swiperefreshlayout I've included the top property being in this way.
Original:
if (OS_IOS) {
refreshControl = Ti.UI.createRefreshControl();
refreshControl.addEventListener('refreshstart', onRefreshstart);
if (args.title) {
setTitle(args.title);
}
list.refreshControl = refreshControl;
$.addTopLevelView(list);
} else if (OS_ANDROID) {
refreshControl = require('com.rkam.swiperefreshlayout').createSwipeRefresh({
view: list
});
refreshControl.addEventListener('refreshing', onRefreshstart);
$.addTopLevelView(refreshControl);
}
Modified:
if (OS_IOS) {
refreshControl = Ti.UI.createRefreshControl();
refreshControl.addEventListener('refreshstart', onRefreshstart);
if (args.title) {
setTitle(args.title);
}
list.refreshControl = refreshControl;
$.addTopLevelView(list);
} else if (OS_ANDROID) {
refreshControl = require('com.rkam.swiperefreshlayout').createSwipeRefresh({
view: list,
top: "10.79%"
});
refreshControl.addEventListener('refreshing', onRefreshstart);
$.addTopLevelView(refreshControl);
}
In my case the top has the value 10.79% because I've got a header in each window.
Thank you very much for everything. Regards
Aha, so we need to update the widget to allow you to pass on arguments for the refresh control constructors.
I've published a new version which passes the arguments (attributes/TSS) passed to the widget on to the constructors of the refresh controllers.
Thank you very much!!
In iOS it works perfectly , but Android is positioned above the Tableview entirely regardless the top of the TSS. Here I put my TSS to see if I can help. If I remove the Widget from the Tableview XML is positioned correctly.
Here you can see the XML:
Here You Can See a screenshot of Como appears look in iOS:
And here the screenshot of Android where you see the Tableview is positioned wrong.
Thank you very much in advance