开发者

Maps Detaching from Webview

Has anyone ever experienced their Google Maps panning off an Android webview? I have attached an image to show. The bottom of the map is not on the bottom edge. I do this by dragging the map from the bottom edge upward. Now I can pan the map, but only in the space shown:

Maps Detaching from Webview

<?xml version="1.0" encoding="utf-8"?>

    <WebView android:id="@+id/mapWebView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" 
        >       
    </WebView>

<RelativeLayout
    android:id="@+id/mapsLegend"
    android:layout_width="match_parent"
    android:layout_height="0dip"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:background="@drawable/map_legend_white_bg">

    <ImageView
            android:id="@+id/mapsRadarLegendImage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:src="@xml/maps_legend_background_selector"
            android:scaleType="center"/>

    <LinearLayout
        android:id="@+id/weather_conditions"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/mapsRadarLegendImage"
        android:layout_toLeftOf="@id/mapsRadarLegendImage"
        android:gravity="right"
        android:paddingRight="4dip">

        <TextView
            android:id="@+id/map_key_rain"
            android:text="@string/rain"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Rain">
        </TextView>      
        <TextView
            android:id="@+id/map_key_snow"
            android:text="@string/snow"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Snow">
        </TextView> 
        <TextView
            android:id="@+id/map_key_ice"
            android:text="@string/ice"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Ice">
        </TextView>         

    </LinearLayout>

    <TextView
            android:id="@+id/map_key_cloud_cover"
            android:text="@string/cloud_cover"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/mapsRadarLegendImage"
  开发者_如何学Python          android:layout_marginTop="-5dip"
            android:layout_marginLeft="40dip"
            android:layout_alignLeft="@id/map_key_rain"
            style="@style/MapView.MapKey.CloudCover"
            android:textColor="@xml/maps_legend_satellite_textview_selector">
    </TextView>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/weather_conditions"
        android:layout_alignLeft="@id/mapsRadarLegendImage"
        android:layout_alignRight="@id/mapsRadarLegendImage"
        style="@style/MapView.MapKey.LinearLayoutHiLo">

        <TextView
            android:id="@+id/map_key_low"
            android:text="@string/low"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            style="@style/MapView.MapKey.Low"
            android:textColor="@xml/maps_legend_satellite_textview_selector">
        </TextView>     
        <TextView
            android:id="@+id/map_key_high"
            android:text="@string/high"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:gravity="right"
            style="@style/MapView.MapKey.High"
            android:textColor="@xml/maps_legend_satellite_textview_selector">
        </TextView> 
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/weather_conditions"
        android:layout_alignLeft="@id/mapsRadarLegendImage"
        android:layout_alignRight="@id/mapsRadarLegendImage"
        style="@style/MapView.MapKey.LinearLayout">

        <TextView
            android:id="@+id/map_key_light"
            android:text="@string/light"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Light">
        </TextView>     
        <TextView
            android:id="@+id/map_key_heavy"
            android:text="@string/heavy"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Heavy">
        </TextView> 
        <TextView
            android:id="@+id/map_key_severe"
            android:text="@string/severe"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:gravity="right"
            android:layout_height="match_parent"
            android:textColor="@xml/maps_legend_radar_textview_selector"
            style="@style/MapView.MapKey.Severe">
        </TextView>         

    </LinearLayout>

</RelativeLayout>

<RelativeLayout
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:layout_centerHorizontal="true"
    android:layout_below="@+id/mapWebView"
    android:layout_alignParentBottom="true">

<LinearLayout
    android:layout_height="wrap_content"
    android:layout_width="match_parent">

    <Button
            android:id="@+id/maps_play_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@xml/maps_animation_button_selector"/>

    <com.accuweather.android.view.uicomponents.MapIndicator
            android:id="@+id/maps_white_bar"
            android:layout_height="match_parent"
            android:layout_width="0dip"
            android:layout_weight="8"
            />

    <Button
            android:id="@+id/maps_expand_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@xml/maps_enlarge_button_selector"/>
            />

</LinearLayout>

        <TextView
            android:id="@+id/maps_time_stamp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dip"
            android:textSize="12sp"
            android:textColor="#ffffffff"
            style="@style/MapView.OverlayTime.Text"/>

</RelativeLayout>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜