findViewByID返回空
android:idid
View.findViewByIdActivity.findViewById
location_layout.xml
<FrameLayout .... > <some.package.MyCustomView ... /> <LinearLayout ... > <TextView ... android:id="@+id/txtLat" /> ... </LinearLayout></FrameLayout>
...setContentView( R.layout.location_layout );
... TextView tv = (TextView) findViewById( R.id.txtLat );
null. 这样做,我的活动运作良好。Activity.findViewByIdView.findViewById
...TextView tv = (TextView) ((Activity) context).findViewById( R.id.txtLat );
null.
ViewGroupViewlocation_layout.xmlTextViewView.findViewById
千万里不及你
慕斯王
拉丁的传说
随时随地看视频慕课网APP
相关分类