xaml - Xamarin.Forms: User Interface working properly in UWP but not on the Android Part -


good day everyone. i'm working on simple program enables user crud record of employee.

i able retrieve created data asp.net web application , display on uwp part of program. however, it's not working on whenever run on android. meaning, menu , buttons not being displayed.

i code of in xamarin.forms portable.

here code of menu page should displayed on both platform. if want see more codes, please let me know. lot.

<?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms"          xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"          x:class="xamarinformsdemo.views.menupage"          backgroundimage="bg3.jpg">     <stacklayout>     <stacklayout orientation="vertical"              padding="30"              heightrequest="30"              backgroundcolor="#24e97d">       <image source="ebmspersonnellogo1.png"          heightrequest="40"/>     </stacklayout>       <stacklayout orientation="vertical"              verticaloptions="center"       padding="45,60,45,60">         <image x:name="sales"               source="salesicon.png">                <image.gesturerecognizers>                 <tapgesturerecognizer                          tapped="salestapgesturerecognizer_ontapped"                         numberoftapsrequired="1" />               </image.gesturerecognizers>         </image>        <image x:name="personnel"         source="personnelicon.png">          <image.gesturerecognizers>           <tapgesturerecognizer                tapped="personneltapgesturerecognizer_ontapped"               numberoftapsrequired="1" />         </image.gesturerecognizers>       </image>      <image x:name="crm"     source="crmicon.png">      <image.gesturerecognizers>       <tapgesturerecognizer                tapped="crmtapgesturerecognizer_ontapped"               numberoftapsrequired="1" />     </image.gesturerecognizers>   </image>      <image x:name="asset"     source="asseticon.png">     <image.gesturerecognizers>        <tapgesturerecognizer                tapped="assettapgesturerecognizer_ontapped"               numberoftapsrequired="1" />     </image.gesturerecognizers>   </image>    <image x:name="receivables"     source="receivables.png">      <image.gesturerecognizers>       <tapgesturerecognizer                tapped="receivablestapgesturerecognizer_ontapped"               numberoftapsrequired="1" />     </image.gesturerecognizers>   </image>         <image x:name="prapprovals"     source="prapprovals.png">      <image.gesturerecognizers>       <tapgesturerecognizer                tapped="approvalstapgesturerecognizer_ontapped"               numberoftapsrequired="1" />         </image.gesturerecognizers>       </image>       </stacklayout>       <stacklayout orientation="vertical"              padding="30,10,30,10"              heightrequest="20"              backgroundcolor="#24e97d"              verticaloptions="center"              opacity="0.5">       <label text="© copyright 2015   smesoft.com.ph   rights reserved "           horizontaltextalignment="center"          verticaloptions="center"           horizontaloptions="center" />     </stacklayout>      </stacklayout> </contentpage> 

here screenshots of 1.) uwp , 2.) android.

uwp

enter image description here

you can use grid instead of stacklayout. best fit in current scenario.

for example:-

<grid> <grid.rowdefinitions>     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" />     <rowdefinition height="*" /> </grid.rowdefinitions> <grid.columndefinitions>     <columndefinition width="*" /> </grid.columndefinitions>  <image x:name="sales" source="sometime1.png" grid.column="0" grid.row="0">     <image.gesturerecognizers>         <tapgesturerecognizer tapped="salestapgesturerecognizer_ontapped" numberoftapsrequired="1" />     </image.gesturerecognizers> </image>  <image x:name="sales" source="sometime2.png" grid.column="0" grid.row="1">     <image.gesturerecognizers>         <tapgesturerecognizer tapped="personneltapgesturerecognizer_ontapped" numberoftapsrequired="1" />     </image.gesturerecognizers> </image>  ... 


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -