2012-10-03 50 views
0

enter image description here動畫錯誤等待屏幕 - 黑莓

以上是我的截圖顯示,同時使用ActivityIndicatorView等待屏幕我得到。任何想法爲什麼我的微調圖像顯示在一個狹窄的帶內?

我的代碼是:

ActivityIndicatorView act = new ActivityIndicatorView(Field.FIELD_HCENTER); 
Bitmap spinImage = Bitmap.getBitmapResource("img/spinner.jpg"); 
act.createActivityImageField(spinImage, 9,Field.FIELD_HCENTER); 
LabelField label = new LabelField(message); 
DialogFieldManager manager = new DialogFieldManager(); 
popup = new PopupScreen(manager); 
manager.addCustomField(label); 
manager.addCustomField(act); 

編輯:微調圖片
enter image description here
編輯2:只全微調圖像時的幀號= 1個圖像= spinner.gif enter image description here

+0

添加ActivityIndi​​catorView類 – Signare

+0

@Signare檢查此rim/device/api/ui/component/progressindicator/ActivityIndi​​catorView.html – Rupak

+0

請發佈您的多幀微調圖片。如果只顯示1幀圖像,我們無法調試爲什麼只能使用1幀。 – Nate

回答

1

謝謝Nate和Rupak。
我爲其他人面臨類似的問題。
我只需使用圖像幀的寬度即爲幀的寬度乘以幀的總數。附圖here


我設置幀4和圖像的數量:http://www.blackberry.com/developers/docs/6.0.0api/net/ enter image description here

2

您沒有上傳img/spinner.jpg,所以我認爲圖像只有一幀。嘗試用線

act.createActivityImageField(spinImage, 1, Field.FIELD_HCENTER); 

更換線

act.createActivityImageField(spinImage, 9,Field.FIELD_HCENTER); 

又仔細檢查API documentation

+0

微調圖像是一個簡單的JPG圖像,是的,我曾嘗試用1幀,如上所述,但它沒有奏效。你可以看到我作爲編輯添加的微調圖像。 –

+0

@Atif Imran,使用'1'時輸出是否相同? – Rupak

+0

是的,那是我的頭痛! –