16

मैं लेआउट में view pager के साथ लेआउट को एक निचला दृश्य जोड़ना चाहता हूं, नीचे देखें view pager द्वारा लोड किया गया है और इससे स्वतंत्र है।दृश्य पेजर के साथ एक समन्वयक लेआउट में नीचे दृश्य कैसे जोड़ें?

मैं साथ

layout_gravity = "bottom" 

लेकिन नीचे दृश्य linear layout सब

बाद activity की मेरी xml लेआउट है

पर नहीं दिखा रहा है एक linear layout गयी।

<android.support.design.widget.CoordinatorLayout 

xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 

<android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/maintoolbar" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     android:background="?attr/colorPrimary" 
     app:layout_scrollFlags="scroll|enterAlways" 
     app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> 
    <android.support.design.widget.TabLayout 
     android:id="@+id/maintabs" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:tabMode="fixed" 
     app:tabGravity="fill" /> 
</android.support.design.widget.AppBarLayout> 





<android.support.v4.view.ViewPager 
    android:id="@+id/mainviewpager" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 


<LinearLayout 
    android:id="@+id/completeBottomView" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical"> 

    <ProgressBar 
     android:id="@+id/progressBarBottomView" 
     style="?android:attr/progressBarStyleHorizontal" 
     android:layout_width="match_parent" 
     android:layout_height="5dp" 
     android:indeterminate="false" 
     android:visibility="gone" 
     android:max="100" 
     android:progress="1"/> 

    <HorizontalScrollView 
     android:id="@+id/limiter_scroller" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="bottom|start" 
     android:background="#FF3399" 
     > 
     <LinearLayout 
      android:id="@+id/limiter_layout" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal" 
      android:onClick="clickFromBottomView"/> 
    </HorizontalScrollView> 

</LinearLayout> 

</android.support.design.widget.CoordinatorLayout> 
+2

completeBottomView जोड़ने के अंदर framelayout –

+0

कोशिश @DhawalSodhaParmar यह काम करता है ....... धन्यवाद –

+0

@DhawalSodhaParmar एकदम सही है। –

उत्तर

24

रूप @Dhawal द्वारा टिप्पणी में बताया .... समाधान के साथ android:layout_gravity="bottom"

+0

यह मेरी समस्या तय है। जब तक फोकस प्राप्त हुआ तो मुझे कीबोर्ड के बारे में दिखाई देने के लिए एक एडिटेक्स्ट था। चीयर्स –

+0

धन्यवाद यह काम करता है। –

+4

'एंड्रॉइड जोड़ना: layout_gravity =" नीचे "सीधे आपके लाइनरलाइट (पूर्णबॉटम व्यू) पर भी काम करना चाहिए। मुझे नहीं लगता कि अतिरिक्त फ्रेमलाइट आवश्यक है –

-1

इस कोड मेरे लिए काम किया एक FrameLayout में LinearLayout completeBottomView रैप करने के लिए है। app:layout_scrollFlags="scroll|enterAlways" से app:layout_scrollFlags="scroll" एंड्रॉइड.support.v7.widget.Toolbar की विशेषता बदलें। अधिक जानकारी here

संबंधित मुद्दे