2017-11-30 12 views
0

動作しません........ aaaandそれはポイントIにTextViewにはstackoverflow.comがそうすることを主張するので、私はもっと必要ではない偽の詳細を追加してい

だから私の質問に投稿することを拒否します私は3つの等ボックス要素を構築しています:

私は<TextView/>を追加する瞬間は、動作を停止...なぜそうですか?

<TableLayout 
    android:layout_width="match_parent" 
    android:layout_height="74dp" 
    android:background="@color/sevenBlack" > 

    <TableRow 
     android:layout_height="match_parent" 
     android:weightSum="3"> 

     <View 
      android:layout_height="match_parent" 
      android:layout_weight="1"> 

      <!-- WTF!!! --> 
      <TextView android:text="Hello there"/> 

     </View> 

     <View 
      android:layout_height="match_parent" 
      android:layout_weight="1"></View> 

     <View 
      android:layout_height="match_parent" 
      android:layout_weight="1"></View> 
    </TableRow> 
</TableLayout> 

答えて

1

あなたはビューの内側に他のビュー(TextViewEditTextsButtons)を使用することはできません。

この試してみてください:あなたは、各ビュー使用リニア、相対的またはその他のLayoutViewに複数のテキストビューを使用する場合は

<TableLayout 
    android:layout_width="match_parent" 
    android:layout_height="74dp" 
    android:background="@color/sevenBlack" > 

    <TableRow 
     android:layout_height="match_parent" 
     android:weightSum="3"> 

      <TextView android:text="Hello there"    
      android:layout_height="match_parent" 
      android:layout_weight="1"/> 

     <View 
      android:layout_height="match_parent" 
      android:layout_weight="1"></View> 

     <View 
      android:layout_height="match_parent" 
      android:layout_weight="1"></View> 
    </TableRow> 
</TableLayout> 

を。

ありがとう

関連する問題