मेरे पास एक ऐसी गतिविधि है जो ईमेल की सामग्री प्रदर्शित करती है। प्राप्तकर्ताओं और दिनांक के साथ एक शीर्षलेख है, और मेल सामग्री प्रदर्शित करने के लिए एक वेबदृश्य है।एंड्रॉइड वेबव्यू: संपूर्ण गतिविधि लेआउट को कैसे स्क्रॉल करें
जब मेल बहुत लंबा है, कोई समस्या नहीं है, वेबव्यू के अंदर स्क्रॉलबार हैं।
लेकिन मेरी समस्या तब होती है जब प्राप्तकर्ता सूची बहुत लंबी होती है, हेडर स्क्रीन की ऊंचाई का 50% लेता है, और वेबव्यू स्क्रीन की ऊंचाई का केवल 50% लेता है, और मैं केवल इन 50% के अंदर स्क्रॉल कर सकता हूं। मैं पूरे गतिविधि लेआउट पर स्क्रॉल करना चाहता हूं (मुझे लगता है कि वेबव्यू की पूरी ऊंचाई हो जाएगी, और वह स्क्रॉलबार पूरी गतिविधि पर दिखाई देगी)।
यहाँ एक चित्र मेरी समस्या को दर्शाता हुआ है:
यहाँ मेरी layout.xml है:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="vertical"
android:scrollbars="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@layout/header_gradient" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#DEDEDE"
android:orientation="vertical"
android:padding="2dp" >
<TextView
android:id="@+id/label_mail_object"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="<mail_object>"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/label_mail_from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="<from>"
android:textColor="#0000FF" />
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:shrinkColumns="0"
android:stretchColumns="1" >
<!-- Send time -->
<TableRow
android:id="@+id/tablerow_sent_date"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_sent_date"
android:textStyle="bold" />
<TextView
android:id="@+id/label_mail_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="<sent_date>" />
</TableRow>
<!-- To -->
<TableRow
android:id="@+id/tablerow_to"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_to"
android:textStyle="bold" />
<TextView
android:id="@+id/label_mail_to"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxWidth="@dimen/padding_large"
android:text="<to>" />
</TableRow>
<!-- Cc -->
<TableRow
android:id="@+id/tablerow_cc"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_cc"
android:textStyle="bold" />
<TextView
android:id="@+id/label_mail_cc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxWidth="@dimen/padding_large"
android:text="<cc>" />
</TableRow>
<!-- To -->
<TableRow
android:id="@+id/tablerow_cci"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_cci"
android:textStyle="bold" />
<TextView
android:id="@+id/label_mail_cci"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxWidth="@dimen/padding_large"
android:text="<cci>" />
</TableRow>
</TableLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#808080" />
<WebView
android:id="@+id/webview_mail_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
ग्रेट नहीं समझा जाता है तो मुझे मारो !!! मैंने स्क्रॉलव्यू के साथ पूरे लेआउट को घेर लिया, और यह स्क्रॉल करता था जैसा मैं चाहता था !!! – MarneusCalgarXP
मैं कहना भूल गया: बहुत बहुत धन्यवाद;) – MarneusCalgarXP