TableRow中放TextView文字被截掉

今天遇到个奇怪的事,在TableRow中放了个TextView,结果文字被截掉了,那个之郁闷,搜了半天试了很多方法,最后都差点放弃了,最后试了一下将TextView的layout_width属性给去掉,结果就好了。
<TableRow style="@style/TableRow">

            <TextView
                style="@style/CustomerStats.TextView.Header"
                android:background="@drawable/stat_time_indicator_bg"
                android:text="时间/指标" />

            <TextView
                style="@style/CustomerStats.TextView.HeaderWithLeftMargin"
                android:background="@drawable/customer_flow_title_bg"
                android:text="客流" />

            <TextView
                style="@style/CustomerStats.TextView.HeaderWithLeftMargin"
                android:background="@drawable/new_member_title_bg"
                android:text="新增用户" />
        </TableRow>
 
<style name="CustomerStats">
        <!--<item name="android:layout_width">wrap_content</item>-->
        <item name="android:layout_weight">1</item>
        <item name="android:gravity">center</item>
        <item name="android:layout_height">wrap_content</item>
    </style>
 

你可能感兴趣的:(textview,TableRow)