android - Google Map Inside viewpager and a vertical scroll view not getting displayed in some devices -


i have viewpager 5 fragments , 1 among them search fragment google map weired issue in device map displayed no problem in device(micromax aq 5000 kitkat) it's not getting displayed

fragment

    <linearlayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:id="@+id/mainlayerr"         android:orientation="vertical" >         <scrollview              android:layout_height="wrap_content"             android:layout_width="match_parent"             >          <linearlayout             android:id="@+id/ll_menulayout"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:orientation="vertical"                >              <autocompletetextview                     android:id="@+id/txtsearchh"                    android:layout_height="wrap_content"                    android:layout_width="match_parent"                     android:layout_marginleft="@dimen/space_2_5_x"                     android:layout_marginright="@dimen/space_2_5_x"                     android:layout_margintop="@dimen/space_2_5_x"                    android:hint="search"                    android:layout_gravity="bottom|left"                    android:padding="5dp"                    android:background="@null"                    android:textcolor="@color/markerboxcolor"                      />              <view                   android:layout_height="1dp"                  android:layout_margintop="-6dp"                  android:layout_width="match_parent"                  android:layout_marginleft="@dimen/space_2_5_x"                  android:layout_marginright="@dimen/space_2_5_x"                  android:background="@color/divider_color"                   />              <relativelayout                 android:id="@+id/search_menu"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:baselinealigned="false"                 android:orientation="horizontal" >                    <linearlayout                     android:id="@+id/tab2_wrapper"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_marginright="@dimen/space_0_x"                      android:layout_centerinparent="true"                     android:orientation="horizontal"                     android:padding="@dimen/space_2_x" >                      <checkbox                         android:id="@+id/checkimage_male"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:clickable="true"                         android:contentdescription="@string/app_name"                         android:text="male"                         android:layout_marginright="5dp"                         android:gravity="center|center_vertical|center_horizontal"                          />                      <checkbox                         android:id="@+id/checkimage_female"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:clickable="true"                          android:text="female"                          android:layout_marginleft="5dp"                         android:contentdescription="@string/app_name"                         android:gravity="center|center_vertical|center_horizontal"                          />                 </linearlayout>           </relativelayout>            <horizontalscrollview      android:orientation="horizontal" android:layout_width="wrap_content"     android:id="@+id/horizontalscrolll"     android:layout_margin="10dp"     android:scrollbars="none"     android:background="#c6d7d2" android:layout_height="80dp">                  <linearlayout android:id="@+id/container"                      android:layout_width="wrap_content"                      android:layout_height="wrap_content"                       android:orientation="horizontal">             </linearlayout>            </horizontalscrollview>              <linearlayout                 android:id="@+id/distance_menu"                 android:layout_width="match_parent"                 android:layout_height="@dimen/footer_tabs_container_height"                 android:layout_below="@+id/sportsviewpager"                 android:baselinealigned="false"                 android:gravity="center_vertical"                 android:orientation="horizontal" >                  <linearlayout                     android:id="@+id/tab3_wrapper"                     android:layout_width="0dip"                     android:layout_height="@dimen/container_height"                     android:layout_gravity="center|center_horizontal|center_vertical"                     android:layout_marginright="@dimen/space_2_x"                     android:layout_weight="0.15"                     android:orientation="vertical" >                      <textview                         android:id="@+id/distance"                         android:layout_width="wrap_content"                         android:layout_height="match_parent"                         android:layout_marginleft="@dimen/space_2_x"                         android:gravity="left|center_horizontal|center_vertical"                         android:paddingleft="@dimen/space_2_x"                         android:text="@string/search_dist"                         android:textcolor="@color/text_color1x"                         android:textsize="@dimen/text_size_medium"                         android:textstyle="normal" />                 </linearlayout>                  <linearlayout                     android:id="@+id/tab4_wrapper"                     android:layout_width="0dip"                     android:layout_height="@dimen/footer_tabs_container_height"                     android:layout_marginright="@dimen/space_2_x"                     android:layout_weight=".5"                     android:gravity="center_vertical"                     android:orientation="horizontal" >                      <com.sportspartners.sportspartners.util.discreteseekbar                         android:id="@+id/seekbarr"                         android:layout_width="0dp"                         android:layout_height="wrap_content"                          android:layout_weight="1"                          android:paddingleft="@dimen/space_2_x"                         android:paddingright="@dimen/space_2_x"                          app:dsb_allowtrackclicktodrag="false"         app:dsb_indicatortextappearance="@style/customfloatertextappearance"         app:dsb_progresscolor="@color/my_progress_color"         app:dsb_ripplecolor="#ff7788ff"         app:dsb_indicatorcolor="@color/my_floater_color"         app:dsb_indicatorformatter="%d" />                      <textview                         android:id="@+id/progressid"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:layout_marginleft="@dimen/space_2_x"                         android:layout_marginright="@dimen/space_2_x"                         android:text="10 kms" >                     </textview>                 </linearlayout>             </linearlayout>                <view                 android:id="@+id/seprater1"                 android:layout_width="match_parent"                 android:layout_height="1dp"                 android:layout_below="@+id/from_menu"                  android:background="@color/blue" />                    <framelayout                          android:layout_width="match_parent"         android:layout_height="400dp"          android:layout_below="@+id/seprater1"                     >                       <fragment         android:id="@+id/mappy"         android:layout_width="match_parent"         android:layout_height="400dp"       android:name="com.sportspartners.sportspartners.fragments.search.searchfragment"           class="com.google.android.gms.maps.mapfragment" />             <view             android:id="@+id/imageview123"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:src="@android:color/transparent" />                    </framelayout>          </linearlayout>          </scrollview>  </linearlayout>       <listview        android:layout_height="wrap_content"       android:layout_width="match_parent"       android:layout_margin="5dp"       android:divider="@null"       android:scrollbars="none"       android:id="@+id/searchhlist"      android:visibility="gone"       ></listview>      <imageview          android:id="@+id/progress_image"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerinparent="true"           android:visibility="gone"         /> <linearlayout             android:layout_width="80dp"             android:layout_height="wrap_content"            android:id="@+id/messagenotificationlayout"             android:layout_alignparentright="true"             android:visibility="gone"            android:layout_alignbottom="@+id/searchhlist"            android:descendantfocusability="blocksdescendants"             >           <com.example.floatinglibrary.floatingactionbutton           android:clickable="false"                 android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:src="@drawable/chatterimage"       app:fab_addbuttoncolornormal="#00000000"                 android:id="@+id/messagenotificationbtn"              android:background="@null"              app:fab_size="normal"             />             <textview                   android:background="@drawable/blue_circle"                  android:id="@+id/messagenotificationbadge"                 android:layout_width="wrap_content"                 android:layout_gravity="center"              android:gravity="center"                   android:paddingleft="5dp"              android:paddingtop="5dp"              android:paddingright="5dp"               android:layout_marginleft="-17dp"               android:layout_margintop="-20dp"              android:paddingbottom="5dp"                 android:layout_height="wrap_content"                   android:padding="2sp"               android:clickable="false"                     android:text="10"                     android:textcolor="@color/white"                     android:textsize="@dimen/text_size_micro_min"                  />  </linearlayout>   </relativelayout>   parent layout view pager 
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="horizontal"      android:layout_width="match_parent"     android:layout_height="wrap_content">     <relativelayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/titlecontainer"          >      <linearlayout            android:id="@+id/titlbarrsearch"         android:layout_width="match_parent"         android:layout_height="55dp"         android:background="@color/markerboxcolor"         android:layout_gravity="top"       android:orientation="horizontal"         android:paddingtop="4dp"          android:visibility="gone"         android:gravity="center_vertical"            >          <imagebutton                android:layout_marginleft="3dp"              android:id="@+id/btnsearchback"              android:src="@drawable/searchback"                 android:layout_height="wrap_content"                 android:gravity="center_vertical"              android:layout_width="wrap_content"              android:background="@null"              />          <textview               android:id="@+id/txttitle"              android:layout_height="wrap_content"              android:layout_width="match_parent"              android:gravity="center_horizontal"              android:layout_gravity="center"              android:text="search"              android:textcolor="@color/pure_white"              android:textsize="@dimen/text_size_large"              />          </linearlayout>     <linearlayout            android:id="@+id/titlbarr"         android:layout_width="match_parent"         android:layout_height="55dp"         android:background="@color/markerboxcolor"         android:layout_gravity="top"         android:weightsum="5"          android:gravity="center"            >          <relativelayout              android:layout_height="match_parent"              android:layout_width="0dp"               android:layout_weight="1"               >           <textview               android:id="@+id/txt1"              android:layout_width="match_parent"          android:layout_height="50dp"         android:text="feed"         android:gravity="center"           android:textcolor="@color/tabred"               />           <view                android:layout_height="4dp"               android:layout_width="match_parent"               android:layout_alignparentbottom="true"               android:background="@color/tabred"               android:id="@+id/view1"               />           </relativelayout>          <relativelayout              android:layout_height="match_parent"              android:layout_width="0dp"               android:layout_weight="1"               >           <textview               android:id="@+id/txt2"               android:layout_width="match_parent"          android:layout_height="50dp"         android:text="profile"        android:gravity="center"          android:textcolor="#ffffff"               />            <view                android:layout_height="4dp"               android:layout_width="match_parent"               android:layout_alignparentbottom="true"               android:background="@color/pure_white"               android:id="@+id/view2"               android:visibility="gone"               />           </relativelayout>             <relativelayout              android:layout_height="match_parent"              android:layout_width="0dp"               android:layout_weight="1"               >           <textview               android:id="@+id/txt3"               android:layout_width="match_parent"          android:layout_height="50dp"         android:text="search"         android:gravity="center"          android:textcolor="#ffffff"               />            <view                android:layout_height="4dp"               android:layout_width="match_parent"               android:layout_alignparentbottom="true"               android:background="@color/pure_white"               android:id="@+id/view3"               android:visibility="gone"               />           </relativelayout>               <relativelayout              android:layout_height="match_parent"              android:layout_width="0dp"               android:layout_weight="1"               >           <textview               android:id="@+id/txt4"              android:layout_width="match_parent"          android:layout_height="50dp"         android:text="followers"          android:gravity="center"          android:textcolor="#ffffff"               />            <view                android:layout_height="4dp"               android:layout_width="match_parent"               android:layout_alignparentbottom="true"               android:background="@color/pure_white"               android:id="@+id/view4"               android:visibility="gone"               />           </relativelayout>               <relativelayout              android:layout_height="match_parent"              android:layout_width="0dp"               android:layout_weight="1"               >           <textview               android:id="@+id/txt5"                android:layout_width="match_parent"          android:layout_height="50dp"         android:text="settings"         android:gravity="center"          android:textcolor="#ffffff"               />            <view                android:layout_height="4dp"               android:layout_width="match_parent"               android:layout_alignparentbottom="true"               android:background="@color/pure_white"               android:id="@+id/view5"               android:visibility="gone"               />           </relativelayout>       </linearlayout>      </relativelayout>      <com.sportspartners.sportspartners.util.myviewpager xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/pager"     android:layout_width="match_parent"     android:layout_below="@+id/titlecontainer"     android:layout_height="match_parent" >      <android.support.v4.view.pagertabstrip         android:id="@+id/pager_headerr"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@color/markerboxcolor"         android:layout_gravity="top"         android:visibility="gone"         android:paddingbottom="4dp"         android:paddingtop="4dp"         android:textcolor="#ffffff" />  </com.sportspartners.sportspartners.util.myviewpager>     </relativelayout> 

my display in kikat device

finally got answer google map not show up(in devices) if it's placed inside scroll view need set android:fillviewport="true" inside scroll view may stop scrolling map show perfect size


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -