我對findviewbyid有點困惑。只是想給出一個簡短的解釋,如果有任何錯誤,請檢閱它們。findviewbyid函數怎麼樣
class test
{
Button btes;
public void OnCreate(Bundle savedIntasnceState);
super.OnCreate(savedInstanceState);
btes = (Button)findViewById(R.id.button);
}
這是否意味着findViewById返回對Android.Widget.Button的View對象和實例的引用。 Android.widget.button擴展了findViewById。
問題: 1.上述說明是否正確。如果不是,那麼正確的說法是什麼。 2.任何人都可以提供視圖類的findViewById函數的源代碼 3.什麼是R.java中的那些十六進制數字。 a)
有沒有必要要求在SO中定義一種方法。你可以去[developer.android.com](https://developer.android.com/reference/android/app/Activity.html#findViewById(int))來學習這些。您也可以按ctrl +右鍵單擊該方法以查看Android Studio中的方法實現和定義。 – Blasanka