2016-10-27 6 views
0

ネイティブスクリプトでボトムバーを作成しようとしています。私の最初の試みは非常に初歩的な考えで下にあります。私は素晴らしいフォントを使用して、アイコンの下に単語を置くことを考えています。私の質問は、ブートストラップのためのbootsnipのようなxmlを持っているこのウェブサイトまたはウェブサイトのサンプルXMLです。下のhtheコードは、画像に描かれているゴール下のナビゲーションバーを達成する良い方法です。ネイティブスクリプトのxmlサンプルを見つけるのが非常に難しいです。ネイティブスクリプト用のブートスニップはありますか?

enter image description here

<DockLayout stretchLastChild="true"> 
     <StackLayout dock="bottom" verticalAlignment="bottom" stretch="fill"> 
      <StackLayout orientation="horizontal" horizontalAlignment="center"> 
       <Label text="Home" dock="left" backgroundColor="red"></Label> 
       <Label text="Medications" dock="left" backgroundColor="green"></Label> 
       <Label text="Medication Detail" dock="left" backgroundColor="blue"></Label> 
       <Label text="Whatever" backgroundColor="yellow"></Label> 
      </StackLayout> 
     </StackLayout> 
    </DockLayout> 
+1

Http://nativescriptsnacks.comいくつかのサンプルを持っています。私はそのUIのためのNativeScriptのtabviewコンポーネントを望んでいると思う。 –

+0

ありがとう、あなたに素敵なウェブサイト – hidden

答えて

3

あなたはこれを試すNativeScript Tab View Sample code

OR

を使用することができます。 あなたはListView

<GridLayout rows="*, auto, auto"> 
    <ScrollView row="0"> 
     <StackLayout row="0" backgroundColor="#eeeeee"> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
      <Label text="Hello world" textWrap="true"></Label> 
     </StackLayout> 
    </ScrollView> 
    <StackLayout height="2" backgroundColor="#777" row="1"></StackLayout> 
    <GridLayout class="foot" columns="*,*,*,*" row="2"> 
     <Label col="0" text="" textWrap="true"></Label> 
     <Label col="1" text="" textWrap="true"></Label> 
     <Label col="2" text="" textWrap="true"></Label> 
     <Label col="3" text="" textWrap="true"></Label> 
    </GridLayout> 
</GridLayout> 
ScrollViewを交換することができます
.foot { 
     background-color: #ccc; 
    } 

    .foot label { 
     text-align: center; 
     vertical-align: middle; 
     padding: 10; 
     font-size: 20; 
    } 

enter image description here

+0

あなたの知識を共有してくれてありがとう。私は、ネイティブスクリプトサイトに例があるという事実を忘れています。 – hidden

関連する問題