Naitvescript-vue input and button css crash when use the app switcher












-1














I have a chat app, the input text and the button ">" They are showing well when using the keyboard



enter image description here



But when I use the app swichter (
It is the square button, which is used to switch to another app )the input text and the button crash



enter image description here



Input text and button crash, It is thinner and does not respect the initial height



enter image description here



this is my code:



chat.vue:



<StackLayout class="primero">
<ScrollView height="90%" id="scrollViewOf" ref="scrollViewOf">
<ListView id="listviewtest" separatorColor="transparent" margin-bottom="50" padding="5" for="item in allMessages">
<v-template>
<!-- Shows the list item label in the default color and style. -->
<GridLayout :class="item.data.sender" columns="*" rows="auto">
<StackLayout>
<Label class="timestamp" v-if="item.data.sender == 'admin'" text="Tú:" row="0" col="0" textWrap="true"/>
<Label class="timestamp" v-else-if="item.data.sender == 'user'" text="Cliente:" row="0" col="0" textWrap="true"/>
<Label class="message" :text="item.data.text" row="0" col="0" textWrap="true"/>
<Label class="timestamp" :text="item.data.dateFormated" row="0" col="0" textWrap="true"/>
</StackLayout>

</GridLayout>

</v-template>
</ListView>
</ScrollView>
<StackLayout id="boxButtonAndInput" height="10%">
<GridLayout columns="*, auto" >
<TextField v-model="send_msg_text" row="0" col="0" returnKeyType="Enviar" textWrap="true" autocorrect="true" :hint="hint" />
<Button row="0" col="1" :text="text_button" @tap="SendMsg" />
</GridLayout>
</StackLayout>
</StackLayout>


and this the css:



#boxButtonAndInput {
padding: 5;
margin-bottom: 20;
GridLayout {
height: 100%;
TextField {
border-color: #3399cc;
border-top-style: groove;
border-width: 2px;
font-family: 'Roboto', sans-serif !important;
font-size: 20px !important;
border-color: #3399cc;
border-top-left-radius: 10;
border-top-right-radius: 10;
border-bottom-left-radius: 10;
border-bottom-right-radius: 10;
background-color: #ffffff;
height: 100%;
}
Button {
font-family: 'Roboto', sans-serif !important;
font-size: 20px !important;
background-color: #3399cc;
color: #ffffff;
border-top-left-radius: 10;
border-top-right-radius: 10;
border-bottom-left-radius: 10;
border-bottom-right-radius: 10;
margin-left: 5;
height: 100%;

}
}
}


I need help and try everything, thank you very much in advance










share|improve this question



























    -1














    I have a chat app, the input text and the button ">" They are showing well when using the keyboard



    enter image description here



    But when I use the app swichter (
    It is the square button, which is used to switch to another app )the input text and the button crash



    enter image description here



    Input text and button crash, It is thinner and does not respect the initial height



    enter image description here



    this is my code:



    chat.vue:



    <StackLayout class="primero">
    <ScrollView height="90%" id="scrollViewOf" ref="scrollViewOf">
    <ListView id="listviewtest" separatorColor="transparent" margin-bottom="50" padding="5" for="item in allMessages">
    <v-template>
    <!-- Shows the list item label in the default color and style. -->
    <GridLayout :class="item.data.sender" columns="*" rows="auto">
    <StackLayout>
    <Label class="timestamp" v-if="item.data.sender == 'admin'" text="Tú:" row="0" col="0" textWrap="true"/>
    <Label class="timestamp" v-else-if="item.data.sender == 'user'" text="Cliente:" row="0" col="0" textWrap="true"/>
    <Label class="message" :text="item.data.text" row="0" col="0" textWrap="true"/>
    <Label class="timestamp" :text="item.data.dateFormated" row="0" col="0" textWrap="true"/>
    </StackLayout>

    </GridLayout>

    </v-template>
    </ListView>
    </ScrollView>
    <StackLayout id="boxButtonAndInput" height="10%">
    <GridLayout columns="*, auto" >
    <TextField v-model="send_msg_text" row="0" col="0" returnKeyType="Enviar" textWrap="true" autocorrect="true" :hint="hint" />
    <Button row="0" col="1" :text="text_button" @tap="SendMsg" />
    </GridLayout>
    </StackLayout>
    </StackLayout>


    and this the css:



    #boxButtonAndInput {
    padding: 5;
    margin-bottom: 20;
    GridLayout {
    height: 100%;
    TextField {
    border-color: #3399cc;
    border-top-style: groove;
    border-width: 2px;
    font-family: 'Roboto', sans-serif !important;
    font-size: 20px !important;
    border-color: #3399cc;
    border-top-left-radius: 10;
    border-top-right-radius: 10;
    border-bottom-left-radius: 10;
    border-bottom-right-radius: 10;
    background-color: #ffffff;
    height: 100%;
    }
    Button {
    font-family: 'Roboto', sans-serif !important;
    font-size: 20px !important;
    background-color: #3399cc;
    color: #ffffff;
    border-top-left-radius: 10;
    border-top-right-radius: 10;
    border-bottom-left-radius: 10;
    border-bottom-right-radius: 10;
    margin-left: 5;
    height: 100%;

    }
    }
    }


    I need help and try everything, thank you very much in advance










    share|improve this question

























      -1












      -1








      -1







      I have a chat app, the input text and the button ">" They are showing well when using the keyboard



      enter image description here



      But when I use the app swichter (
      It is the square button, which is used to switch to another app )the input text and the button crash



      enter image description here



      Input text and button crash, It is thinner and does not respect the initial height



      enter image description here



      this is my code:



      chat.vue:



      <StackLayout class="primero">
      <ScrollView height="90%" id="scrollViewOf" ref="scrollViewOf">
      <ListView id="listviewtest" separatorColor="transparent" margin-bottom="50" padding="5" for="item in allMessages">
      <v-template>
      <!-- Shows the list item label in the default color and style. -->
      <GridLayout :class="item.data.sender" columns="*" rows="auto">
      <StackLayout>
      <Label class="timestamp" v-if="item.data.sender == 'admin'" text="Tú:" row="0" col="0" textWrap="true"/>
      <Label class="timestamp" v-else-if="item.data.sender == 'user'" text="Cliente:" row="0" col="0" textWrap="true"/>
      <Label class="message" :text="item.data.text" row="0" col="0" textWrap="true"/>
      <Label class="timestamp" :text="item.data.dateFormated" row="0" col="0" textWrap="true"/>
      </StackLayout>

      </GridLayout>

      </v-template>
      </ListView>
      </ScrollView>
      <StackLayout id="boxButtonAndInput" height="10%">
      <GridLayout columns="*, auto" >
      <TextField v-model="send_msg_text" row="0" col="0" returnKeyType="Enviar" textWrap="true" autocorrect="true" :hint="hint" />
      <Button row="0" col="1" :text="text_button" @tap="SendMsg" />
      </GridLayout>
      </StackLayout>
      </StackLayout>


      and this the css:



      #boxButtonAndInput {
      padding: 5;
      margin-bottom: 20;
      GridLayout {
      height: 100%;
      TextField {
      border-color: #3399cc;
      border-top-style: groove;
      border-width: 2px;
      font-family: 'Roboto', sans-serif !important;
      font-size: 20px !important;
      border-color: #3399cc;
      border-top-left-radius: 10;
      border-top-right-radius: 10;
      border-bottom-left-radius: 10;
      border-bottom-right-radius: 10;
      background-color: #ffffff;
      height: 100%;
      }
      Button {
      font-family: 'Roboto', sans-serif !important;
      font-size: 20px !important;
      background-color: #3399cc;
      color: #ffffff;
      border-top-left-radius: 10;
      border-top-right-radius: 10;
      border-bottom-left-radius: 10;
      border-bottom-right-radius: 10;
      margin-left: 5;
      height: 100%;

      }
      }
      }


      I need help and try everything, thank you very much in advance










      share|improve this question













      I have a chat app, the input text and the button ">" They are showing well when using the keyboard



      enter image description here



      But when I use the app swichter (
      It is the square button, which is used to switch to another app )the input text and the button crash



      enter image description here



      Input text and button crash, It is thinner and does not respect the initial height



      enter image description here



      this is my code:



      chat.vue:



      <StackLayout class="primero">
      <ScrollView height="90%" id="scrollViewOf" ref="scrollViewOf">
      <ListView id="listviewtest" separatorColor="transparent" margin-bottom="50" padding="5" for="item in allMessages">
      <v-template>
      <!-- Shows the list item label in the default color and style. -->
      <GridLayout :class="item.data.sender" columns="*" rows="auto">
      <StackLayout>
      <Label class="timestamp" v-if="item.data.sender == 'admin'" text="Tú:" row="0" col="0" textWrap="true"/>
      <Label class="timestamp" v-else-if="item.data.sender == 'user'" text="Cliente:" row="0" col="0" textWrap="true"/>
      <Label class="message" :text="item.data.text" row="0" col="0" textWrap="true"/>
      <Label class="timestamp" :text="item.data.dateFormated" row="0" col="0" textWrap="true"/>
      </StackLayout>

      </GridLayout>

      </v-template>
      </ListView>
      </ScrollView>
      <StackLayout id="boxButtonAndInput" height="10%">
      <GridLayout columns="*, auto" >
      <TextField v-model="send_msg_text" row="0" col="0" returnKeyType="Enviar" textWrap="true" autocorrect="true" :hint="hint" />
      <Button row="0" col="1" :text="text_button" @tap="SendMsg" />
      </GridLayout>
      </StackLayout>
      </StackLayout>


      and this the css:



      #boxButtonAndInput {
      padding: 5;
      margin-bottom: 20;
      GridLayout {
      height: 100%;
      TextField {
      border-color: #3399cc;
      border-top-style: groove;
      border-width: 2px;
      font-family: 'Roboto', sans-serif !important;
      font-size: 20px !important;
      border-color: #3399cc;
      border-top-left-radius: 10;
      border-top-right-radius: 10;
      border-bottom-left-radius: 10;
      border-bottom-right-radius: 10;
      background-color: #ffffff;
      height: 100%;
      }
      Button {
      font-family: 'Roboto', sans-serif !important;
      font-size: 20px !important;
      background-color: #3399cc;
      color: #ffffff;
      border-top-left-radius: 10;
      border-top-right-radius: 10;
      border-bottom-left-radius: 10;
      border-bottom-right-radius: 10;
      margin-left: 5;
      height: 100%;

      }
      }
      }


      I need help and try everything, thank you very much in advance







      css vue.js nativescript nativescript-vue






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 8:32









      DanteDante

      142




      142
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The ListView itself is scrollable so you do not need a ScrollView there. I do see quite unwanted or unnecessary layouts in your template. So I would suggest you check out the nice chat UI example from Shiva which might work for you.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53407986%2fnaitvescript-vue-input-and-button-css-crash-when-use-the-app-switcher%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The ListView itself is scrollable so you do not need a ScrollView there. I do see quite unwanted or unnecessary layouts in your template. So I would suggest you check out the nice chat UI example from Shiva which might work for you.






            share|improve this answer


























              0














              The ListView itself is scrollable so you do not need a ScrollView there. I do see quite unwanted or unnecessary layouts in your template. So I would suggest you check out the nice chat UI example from Shiva which might work for you.






              share|improve this answer
























                0












                0








                0






                The ListView itself is scrollable so you do not need a ScrollView there. I do see quite unwanted or unnecessary layouts in your template. So I would suggest you check out the nice chat UI example from Shiva which might work for you.






                share|improve this answer












                The ListView itself is scrollable so you do not need a ScrollView there. I do see quite unwanted or unnecessary layouts in your template. So I would suggest you check out the nice chat UI example from Shiva which might work for you.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 9:13









                ManojManoj

                4,6062921




                4,6062921






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53407986%2fnaitvescript-vue-input-and-button-css-crash-when-use-the-app-switcher%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Costa Masnaga

                    Fotorealismo

                    Sidney Franklin