我有奇怪的問題,很奇怪。在XML我三星總是返回null,但它適用於HTC - findViewbyId
<Button
android:id="@+id/btnV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="10dp"
android:background="@drawable/selector_app_update">
</Button>
和代碼
btnV = (Button) findViewById(R.id.btnV);
和HTC它的工作原理,但在三星,我每次都讓空。有沒有人有類似的問題?我清理並重新啓動項目和日食,但沒有。
不,它在我的三星Galaxy Y工作正常 – 2011-12-30 11:39:52
lolz ... howz有可能嗎? – 2011-12-30 11:41:38
只需刷新項目或重新啓動eclipse即可。 – 2011-12-30 11:42:22