I'm developing an app in Intel XDK (1995 version) where the layout is basically a footer with a grouped button inside it. The chosen framework is Boostrap . Below is the image of the app running on emulate.
Iusesubpagestonavigate.Inaparticularsubpage,Ihaveabuttonthatperformsaquerytoawebservice,whichreturnsalistofbanksthatisusedtofeedalistviewintoanothersubpage.
That'swhereI'mhavingahardtime.Thislistviewloadsnormally,andIcanscrollthelistsmoothlyandseethecontentloaded,butonlyontheEmulatetab.
IfItesttheAppinAppPrevieworinsidemysmartphone,thatsamelistviewappearsloaded,butIcannotscroll.Itgetsstuck,asifitwerewithoutthescrolloption.
Below,Isubmitthejquerycodeusedtofetchdatafromthewebservice:
/*button#btn_bancos*/$(document).on("click", "#btn_bancos", function(evt)
{
var webMethod1 = "http://my_webservice_address";
$.ajax({
type: "POST",
dataType: "XML",
url: webMethod1,
success: parseXMLBancos
})
.fail(function(jqXHR, textStatus) {
myAppProcessing.hideProcessing();
alert( "Request failed: " + textStatus );
});
});
function parseXMLBancos(xmlBancos)
{
// Limpa a linha de template original do listview
$("#lst_bancos").empty();
// Percorre todas as ocorrências retornadas pelo serviço
$(xmlBancos).find("Bancos").each(function() {
var codigo = $(this).find('CdBanco').text();
var sigla = $(this).find('SgBancoComCodigo').text();
var banco = '<a class="list-group-item allow-badge widget" data-uib="twitter%20bootstrap/list_item" data-ver="1"><h4 class="list-group-item-heading">' + codigo + '</h4><p class="list-group-item-text">' + sigla +'</p></a>';
$("#lst_bancos").append(banco);
});
activate_subpage("#bancos");
myAppProcessing.hideProcessing();
}
Below, I send the index.html code:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<meta charset="UTF-8">
<title>Blank App Designer Cordova Web App Project Template</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
<style>
@-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; } @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; } @viewport { user-zoom: fixed ; min-zoom: 100% ; }
</style>
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" type="text/css" href="css/index_main.less.css" class="main-less">
<script src="cordova.js" id="xdkJScordova_"></script>
<script src="js/app.js"></script>
<script src="js/init-app.js"></script>
<script src="xdk/init-dev.js"></script>
<script type="application/javascript" src="lib/jquery.min.js"></script>
<script type="application/javascript" src="sidebar/js/hammer.js"></script>
<script type="application/javascript" src="sidebar/js/jquery.hammer.js"></script>
<script type="application/javascript" src="sidebar/js/swipe-hammer.js"></script>
<script type="application/javascript" src="sidebar/js/sidebar.js"></script>
<script type="application/javascript" src="js/index_user_scripts.js"></script>
<script type="application/javascript" src="xdk/ad/bs_subpage.js"></script>
<script type="application/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#btn_bancos").click(function () {
myAppProcessing.showProcessing();
});
});
</script>
<script type="application/javascript" src="xdk/appdesigner/js/rest-of-space.js"></script>
</head>
<body>
<div class="upage" id="mainpage">
<div class="upage-outer">
<div class="upage-content ac0 content-area vertical-col" id="home">
<div class="widget uib_w_7 scale-image d-margins logotipo" data-uib="media/img" data-ver="0">
<figure class="figure-align">
<img src="images/logotipo-home.png">
<figcaption data-position="bottom"></figcaption>
</figure>
</div>
</div>
<div class="uib-footer uib-footer-fixed footer-bg container-group inner-element uib_w_2" data-uib="layout/footer" data-ver="0">
<h2></h2>
<div class="widget-container wrapping-col single-centered">
<div class="btn-group uib-bs-flex widget uib_w_3 d-margins" data-uib="twitter%20bootstrap/button_group" data-ver="1">
<button class="btn widget uib_w_4 btn-info" data-uib="twitter%20bootstrap/button" data-ver="1" id="btn_home"><i class="glyphicon glyphicon-home button-icon-top" data-position="top"></i>Home</button>
<button class="btn widget uib_w_5 btn-info" data-uib="twitter%20bootstrap/button" data-ver="1" id="btn_consultas"><i class="glyphicon glyphicon-search button-icon-top" data-position="top"></i>Consultas</button>
<button class="btn widget uib_w_6 btn-info" data-uib="twitter%20bootstrap/button" data-ver="1" id="btn_sair"><i class="glyphicon glyphicon-hand-left button-icon-top" data-position="top"></i>Sair</button>
</div>
</div>
<div class="widget-container content-area horiz-area wrapping-col left"></div>
<div class="widget-container content-area horiz-area wrapping-col right"></div>
</div>
</div>
<div class="upage-content hidden vertical-col" id="consultas">
<div class="grid grid-pad urow uib_row_1 row-height-1" data-uib="layout/row" data-ver="0">
<div class="col uib_col_1 col-0_12-12" data-uib="layout/col" data-ver="0">
<div class="widget-container content-area vertical-col">
<span class="widget uib_w_8 d-margins label label-primary" data-uib="twitter%20bootstrap/badge_and_label" data-ver="1">Consultas</span>
<button class="btn widget uib_w_9 d-margins btn-lg btn-info" data-uib="twitter%20bootstrap/button" data-ver="1" id="btn_bancos"><i class="glyphicon glyphicon-search button-icon-left" data-position="left"></i>Bancos</button><span class="uib_shim"></span>
</div>
</div>
<span class="uib_shim"></span>
</div>
</div>
<div id="bancos" class="upage-content hidden vertical-col">
<div class="grid grid-pad urow uib_row_2 row-height-2" data-uib="layout/row" data-ver="0">
<div class="col uib_col_4 col-0_12-12" data-uib="layout/col" data-ver="0">
<div class="widget-container content-area vertical-col">
<div class="list-group widget uib_w_10 d-margins rest-of-height" data-uib="twitter%20bootstrap/list_group" data-ver="1" id="lst_bancos">
<a class="list-group-item allow-badge widget uib_w_11" data-uib="twitter%20bootstrap/list_item" data-ver="1">
<h4 class="list-group-item-heading">Heading</h4>
<p class="list-group-item-text">List item</p>
</a>
<a class="list-group-item allow-badge widget uib_w_12" data-uib="twitter%20bootstrap/list_item" data-ver="1">
<h4 class="list-group-item-heading">Heading</h4>
<p class="list-group-item-text">List item</p>
</a>
<a class="list-group-item allow-badge widget uib_w_13" data-uib="twitter%20bootstrap/list_item" data-ver="1">
<h4 class="list-group-item-heading">Heading</h4>
<p class="list-group-item-text">List item</p>
</a>
</div><span class="uib_shim"></span>
</div>
</div>
<span class="uib_shim"></span>
</div>
</div>
</div>
</body>
</html>
If I swap the subpages for pages , the problem disappears, ie I can make the listview work in any situation. But I need it to be with subpages because I have the footer menu that I'll be using throughout the project and I see no logic in creating the same footer menu on several pages if I have the subpage feature that allows me to use that shared footer. / p>
I have been having this problem for weeks and I have not been able to solve it in any way. I've re-created the project about 4 times, I've tried other features, but unfortunately it did not work and the worst thing is that my client already approved the layout of the project and because of that, I do not have much to do to change the face of the app, of meeting what was closed in approving the project layout.
Hugs, Marcelo.