我一直致力于将地图 v2 集成到我的应用程序中,我成功地做到了,并且能够在设备和模拟器上可视化事物,但是当我尝试在布局中的地图下方添加一些小部件时,我无法平滑滚动并且地图会产生模糊的印象在屏幕上,当我尝试滚动嵌入地图片段时,请参阅下图
在上图中,我实际上应该在滚动时平滑过渡以显示两个按钮。但是我知道出了点问题,有人可以建议我一个解决方案吗?提前谢谢了
activity_main.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:facebook="http://schemas.android.com/apk/res-auto"
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="730dp" >
<com.facebook.widget.LoginButton
android:id="@+id/login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
facebook:confirm_logout="false"
facebook:fetch_user_info="true" />
<com.facebook.widget.ProfilePictureView
android:id="@+id/profilePicture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="center_horizontal"
facebook:preset_size="normal" >
</com.facebook.widget.ProfilePictureView>
<TextView
android:id="@+id/greeting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/profilePicture"
android:layout_centerHorizontal="true"
android:textColor="#333"
android:textSize="18sp" />
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="345dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/profilePicture"
android:layout_marginTop="22dp"
class="com.google.android.gms.maps.SupportMapFragment" />
<Button
android:id="@+id/mapClear"
style="?android:attr/buttonStyleSmall"
android:layout_width="146dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/mapSet"
android:layout_alignBottom="@+id/mapSet"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/greeting"
android:text="Clear" />
<Button
android:id="@+id/mapSet"
style="?android:attr/buttonStyleSmall"
android:layout_width="146dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/greeting"
android:layout_below="@+id/map"
android:layout_marginTop="10dp"
android:text="Set" />
<Button
android:id="@+id/fuelTest"
style="?android:attr/buttonStyleSmall"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/profilePicture"
android:layout_below="@+id/mapSet"
android:layout_marginTop="25dp"
android:text="get fuel" />
<TextView
android:id="@+id/fuelLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/fuelTest"
android:layout_alignBottom="@+id/fuelTest"
android:layout_alignLeft="@+id/greeting"
android:text="@string/fuellevel"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Button
android:id="@+id/post"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/greeting"
android:layout_alignBottom="@+id/greeting"
android:layout_alignParentRight="true"
android:layout_marginRight="18dp"
android:text="post" />
</RelativeLayout>