關於地圖首頁會卡 button background惹的禍


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sat="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >


        <com.esri.android.map.MapView
            android:id="@+id/map"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentLeft="true"
            initExtent="-13042576 3854531 -13026007 3870439"
            >
        </com.esri.android.map.MapView>
    </FrameLayout>
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin"
            >
            <LinearLayout
                android:layout_width="fill_parent" android:layout_height="55dp"
                android:orientation="horizontal"
                android:background="@drawable/search_shape"
                android:id="@+id/l1"
                >
                <Button android:id="@+id/search_main"
                    android:layout_width="fill_parent"
                    android:layout_weight="1"
                    android:paddingLeft="10.0dip"
                    android:layout_height="match_parent"
                    android:background="@drawable/searchimg"
                    android:clickable="true"
                    />
                <Button android:id="@+id/search_video"
                    android:layout_width="fill_parent"
                    android:layout_weight="6"
                    android:layout_height="match_parent"
                    android:background="@drawable/iconfont_yuyin"
                    android:clickable="true"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:orientation="vertical"
                android:layout_gravity="right"
                android:layout_alignParentRight="true"
                android:layout_below="@id/l1"
                android:id="@+id/l2">
            <Button
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:id="@+id/font_up"
                android:layout_marginTop="80dp"
                android:background="@drawable/floor_up"
                android:clickable="true"
                />

                <Button
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:text="1"
                    android:id="@+id/font_middle"
                    android:textSize="20sp"
                    android:textStyle="bold"
                    android:gravity="center_vertical|center_horizontal"
                    android:clickable="true"
                    android:background="#ffcee3ff" />
            <Button
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:id="@+id/font_down"
                android:clickable="true"
                android:background="@drawable/floor_down"
                />

        </LinearLayout>


                <com.example.weixing.SatelliteMenu
                    android:id="@+id/menu"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom|left"
                    sat:satelliteDistance="170dp"
                    sat:mainImage="@drawable/ic_launcher"
                    sat:totalSpacingDegree="90"
                    sat:closeOnClick="true"
                    sat:expandDuration="500"
                    android:layout_alignParentBottom="true"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentStart="true" />


        </RelativeLayout>




</RelativeLayout>

不知道 那個button 的背景圖是 1024x1024的, 以爲 在button裏面限定了 範圍就自動壓縮了,  結果雖然是自動壓縮了 (能看到圖片全景)  但是mapview會受影響,不知道爲毛,圖片改成100x100的就ok了
發佈了241 篇原創文章 · 獲贊 10 · 訪問量 23萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章