0
我加入了我的代码,其中包含Framelayout
与MapView的动态创建和RecyclerView
与另一个布局,我用这作为一个Fragment
ViewPager
fragmentstate适配器。我创建recycleview和FrameLayout里(Mapfragment)与sameview,但即使通过前面始终的FrameLayout它不见了
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/list_item"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="5dp"
android:id="@+id/rv"
android:layout_above="@+id/custom_progress1"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<LinearLayout
android:id="@+id/mapLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mapContainer"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
</RelativeLayout>
亲爱的朋友你已经添加了父布局作为相对布局。使用线性布局,而不是使用相对布局。还可以在儿童布局中使用体重。因此,您可以按照自己的想法精确查看屏幕。 –
我已经改变,但仍然相同的回应,最初刷卡工作正常,一旦mapview被选中,并再次回到列表视图,然后刷卡死了,然后一旦我改变了使用pagepager的viewpager页面,然后其工作正常。 –
考虑为你的问题使用更精确的标题,而不是完整的句子。 –