8
Sto provando a implementare una suddivisione del 40/60 percento nel mio TableLayout ma non sto avendo fortuna. Durante il test del codice sul mio dispositivo Android, il TextView sinistro occupa ancora il 60%, anziché il 40%.Problemi di somma di peso di TableLayout
Qualsiasi aiuto sarebbe grande:
<TableLayout
android:id="@+id/agentStatusTable"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center|top"
android:visibility="visible"
android:background="@drawable/curvedbg"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
>
<TableRow android:id="@+id/webiprow" android:layout_marginTop="14sp" android:gravity="center_vertical" android:background="#e5e6e6" android:minHeight="45sp" android:weightSum="1">
<TextView android:paddingRight="10dp" android:id="@+id/webiptitle" android:text="@string/webip" android:textColor="#000000" android:textSize="15sp" android:layout_weight="0.40" android:gravity="right"></TextView>
<TextView android:paddingRight="10dp" android:id="@+id/webiptext" android:textColor="#000000" android:textSize="15sp" android:layout_weight="0.60" android:gravity="right"></TextView>
</TableRow>
<TableRow android:id="@+id/webportrow" android:layout_marginTop="6dp" android:layout_marginBottom="14sp" android:gravity="center_vertical" android:minHeight="45sp" android:weightSum="1">
<TextView android:paddingRight="10dp" android:id="@+id/webporttitle" android:layout_weight="0.40" android:text="@string/webport" android:textColor="#000000" android:textSize="15sp" android:gravity="right"></TextView>
<EditText android:paddingRight="10dp" android:inputType="number" android:layout_weight="0.60" android:id="@+id/EditText01" android:text="@+id/EditText01"></EditText></TableRow>
</TableLayout>
Grazie! ha funzionato come un fascino –
odp - magnifico! – user1592714