androiddesignsupport - I can't see the bottom button / android design support library with SupportMapFragment -


i use http://android-developers.blogspot.jp/2015/05/android-design-support-library.html supportmapfragment , button.

why can't see button on supportmapfragment?

enter image description here

activity_main.xml

<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/drawer_layout"     android:layout_height="match_parent"     android:layout_width="match_parent"     android:fitssystemwindows="true">      <include layout="@layout/include_list_viewpager"/>      <android.support.design.widget.navigationview         android:id="@+id/nav_view"         android:layout_height="match_parent"         android:layout_width="wrap_content"         android:layout_gravity="start"         android:fitssystemwindows="true"         app:headerlayout="@layout/nav_header"         app:menu="@menu/drawer_view"/>  </android.support.v4.widget.drawerlayout> 

map_fragment.xml supportmapfragment

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">      <fragment xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/map"         class="com.google.android.gms.maps.supportmapfragment"         android:layout_width="match_parent"         android:layout_height="match_parent" />      <button         android:id="@+id/start_button"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:text="start"          />  </relativelayout> 

include_list_viewpager.xml

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/main_content"     android:layout_width="match_parent"     android:layout_height="match_parent">      <android.support.design.widget.appbarlayout         android:id="@+id/appbar"         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/toolbar"             android:layout_width="match_parent"             android:layout_height="?attr/actionbarsize"             android:background="?attr/colorprimary"             app:popuptheme="@style/themeoverlay.appcompat.light"             app:layout_scrollflags="scroll|enteralways" />          <android.support.design.widget.tablayout             android:id="@+id/tabs"             android:layout_width="match_parent"             android:layout_height="wrap_content" />      </android.support.design.widget.appbarlayout>      <android.support.v4.view.viewpager         android:id="@+id/viewpager"         android:layout_width="match_parent"         android:layout_height="match_parent"         app:layout_behavior="@string/appbar_scrolling_view_behavior"         />  </android.support.design.widget.coordinatorlayout> 

thank you.

i think problem lies in map_fragment.xml supportmapfragment. try below.

<fragment xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/map"     class="com.google.android.gms.maps.supportmapfragment"     android:layout_width="match_parent"     android:layout_height="wrap_content"      android:layout_above="@+id/start_button"/> <button     android:id="@+id/start_button"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_alignparentbottom="true"     android:text="start" /> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -