ViewPaper
के साथ काम करते समय मुझे समस्याएं मिलीं। जब मैं व्यूपेपर के height = wrap_content
सेट करता हूं तो यह कुछ भी नहीं दिखाता है और यह दिखाता है कि क्या मैं ViewPager
(उदा: android:layout_height= "350dp"
) के लिए ऊंचाई निर्धारित करता हूं। कृपया सहायता कीजिए! धन्यवाद!ViewPager काम नहीं कर रहा है अगर सेट लेआउट_हेइट = wrap_content
यह मेरा एक्सएमएल कोड है:
<?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="match_parent"
android:background="@color/white"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#FF0000"
android:gravity="center"
android:text="Quick Links"
android:textColor="@color/white"
android:textSize="20sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</android.support.v4.view.ViewPager>
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/circlePage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/pager"
android:layout_marginBottom="10dp" >
</com.viewpagerindicator.CirclePageIndicator>
</RelativeLayout>
<com.custom.ExpandableHeightListView
android:id="@+id/lvAdmissions"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:divider="@drawable/bg_listview_divider"
android:dividerHeight="1dp"
android:listSelector="@drawable/selector_animation" >
</com.custom.ExpandableHeightListView>
</LinearLayout>
</ScrollView>
</LinearLayout>
हल: मैं इस लिंक का अनुसरण और यह मुझे इस समस्या का समाधान कर मदद करते हैं। https://stackoverflow.com/a/24666987/1928560
यह काम नहीं किया। मुझे उम्मीद है कि इसमें इस पर पेज सूचक शामिल होना चाहिए। वैसे भी, आपकी टिप्पणी के लिए धन्यवाद। –