ฉันต้องการจะลบนระหว่างที่ปุ่ม"0"และปุ่ม"1". เป้าหมายของฉันคือมันจะมีที่เดียวกันระหว่างพวกที่ปุ่ม"X". ส่วนติดต่อผู้ใช้ขอผลลัพธ์
พอทางแก้ปัญหานั่นไม่ได้ทำงาน:
ยังไงจะเอาอวกาศระหว่างสองคนจำนวนแถวใน Tablelayout?
วิธีลดอวกาศระหว่างสองคนแถวของโต๊ะผังแป้นพิมพ์สำหรับ android?
แล้วก็ที่ปุ่ม"X"ควรจะยืดตรทั้งสองแถวนั่นมันเพียงไหนตอนที่ฉันวางไว้ในที่ยิ่งใหญ่กว่า textSize
.
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow>
<TableLayout android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1">
<TableRow android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="0sp"
android:padding="0sp">
<com.google.android.material.button.MaterialButton
android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="0"
android:layout_margin="2sp"
/>
</TableRow>
<TableRow
android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="0sp"
android:padding="0sp">
<com.google.android.material.button.MaterialButton
android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="1"
android:layout_margin="2sp"
/>
</TableRow>
</TableLayout>
<TableLayout
android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="0sp"
android:padding="0sp">
<TableRow>
<com.google.android.material.button.MaterialButton
android:layout_width="0sp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="X"
android:layout_margin="2sp"
/>
</TableRow>
</TableLayout>
</TableRow>
</TableLayout>
ขอบคุณล่วงหน้าไว้ก่อนเผื่อมีความคิดปราดเปรื่อง
insetBottom
แล้วinsetTop
ในที่สุดฉันก็เข้าใจแล้ว :)