即時通訊新的Android和即時通訊面臨一些問題...Android - SurfaceView(寬度,高度)問題
即時通訊使用SurfaceView擴展我的課。 在我的班級,我不能得到寬度和高度的SurfaceView。 它始終爲0。我試着輕彈整個屏幕(surfaceView)上的圖像,但即時通訊無法獲得它的寬度和高度。
有什麼建議嗎?
下面是main.xml中的SurfaceView代碼:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<test.MyClass android:id="@+id/SurfaceView01"
android:layout_width="fill_parent" android:layout_height="fill_parent">
</test.MyClass>
</LinearLayout>
這就是升技爲時已晚。在進入onDraw方法之前創建一個圖像。我需要創建寬度和高度的圖像。從那以後,我的東西呈現在圖像的圖形和onDraw有我只是做canvas.drawBitmap(image.getBitmap(),0,0,NULL); – no9 2011-02-23 08:25:31
你爲什麼不能創建的onDraw – ingsaurabh 2011-02-23 08:28:54
圖像必須從J2ME的OnPaint一個習慣中......它的不一樣呢? :) – no9 2011-02-23 08:30:07