2013-07-20 40 views

回答

1

你可以把任何View在另一個View頂部喜歡這裏:

<FrameLayout> 
    <fragment class="SupportMapFragment" /> 
    <CustomView /> 
</FrameLayout> 

,並覆蓋onDraw畫你喜歡什麼。

1

如果你只編碼,然後只需要創建一個視圖希望它不要在其onDraw()方法 繪製這個方法是靜態drawing.For動態繪圖使用SurfaceView。之後在oncreate() method.as-

  addContentView(new View(this),new LayoutParams (LayoutParams.WRAP_CONTENT, 
      LayoutParams.WRAP_CONTENT));//edit parameters according to you 
添加 (View if static SurfaceView if dynamic)