टेक्स्ट टेक्स्ट के बावजूद मुझे स्क्रीन के अंदर फिट करने के लिए मेरा टेबललाइट नहीं मिल सकता है when the text cell is large
।एंड्रॉइड टेबल लेआउट स्वरूपण समस्याएं
यह मेरा टेबललाउट है। एक साधारण दो-पंक्तियां, दो कॉलम तालिका। बाएं कॉलम कक्ष multiline
हैं। यदि इन सेलों में से एक का टेक्स्ट दो पंक्तियों में तोड़ने के लिए बड़ा विचार है, तो कॉलम पूरी स्क्रीन भरने के लिए फैली हुई है और दाएं कॉलम स्क्रीन से बाहर धकेल दिए जाते हैं।
क्यों? स्क्रीन के अंदर रहने के लिए मैं पूरी टेबल को कैसे मजबूर कर सकता हूं? किसी भी संकेत का स्वागत है।
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myTableLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableRow>
<TextView
android:text="Account 4 with a very large name to see if it breaks on two or more lines"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
<TableRow>
<TextView
android:text="Account 5"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
</TableLayout>
कोड लेआउट प्रदर्शित करने के लिए बुनियादी है:
मेरे TableLayout निम्नलिखित है
public class AccountBrowserTest
extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.accountbrowser_test);
}
}
प्रदान करता है और वास्तव में क्या इसका मतलब यह है? आपने कैसे पता लगाया कि यह समाधान है? – Paul