2017-07-28 3 views
0

Ich habe 3 Kinderansichten in einer Containeransicht. Ich möchte die Breite einer untergeordneten Ansicht entsprechend der Gerätebreite auf die leere Größe auffüllen.set view width to blank Größe

<View width="Ti.UI.FILL" height="Ti.UI.SIZE" layout="horizontal"> 
    <!-- 1 --><View width="60" height="Ti.UI.SIZE" backgroundColor="yellow" /> 
    <!-- 2 --><View width="Ti.UI.FILL" height="Ti.UI.SIZE" backgroundColor="red" /> 
    <!-- 3 --><View width="80" height="Ti.UI.SIZE" backgroundColor="orange" /> 
</View> 

Preview

Dieser Code funktioniert nicht richtig. Ansicht ist auf dem dritten Platz zeigt nicht in der Nähe des zweiten. Gibt es eine Methode zum Füllen einer Ansicht, die keine tatsächliche Breite angibt?

Antwort

0

ich Hilfe von ti.slack. Unter Ansatz funktioniert. Möge das jedem helfen.

<View width="Ti.UI.FILL" height="Ti.UI.SIZE"> 
    <!-- 1 --><View width="60" height="Ti.UI.SIZE" backgroundColor="yellow" left="0" /> 
    <!-- 2 --><View width="Ti.UI.FILL" height="Ti.UI.SIZE" backgroundColor="red" left="60" right="80" /> 
    <!-- 3 --><View width="80" height="Ti.UI.SIZE" backgroundColor="orange" /> 
</View>