腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
FindViewByID
在
嵌套
视
图上
返回
null
c#
、
android
、
xamarin
、
xamarin.android
<TextView>(Resource.Id.RunnerName)总是
返回
null
protected override void OnCreate(Bundle savedInstanceState) SetContentView(Resource.Layout.activity_main); //some stu
浏览 5
提问于2020-07-01
得票数 0
回答已采纳
2
回答
在
<include>视
图上
,
findViewById
返回
null
android
、
android-layout
、
viewflipper
活动代码,onCreate方法View view_flipper= main_view.
findViewById
(R.id.vf);main.xml主视图正确找到,ViewFlipper也正确找到,但找不到prev_pane、cur_pane或next_pane,
浏览 3
提问于2011-12-17
得票数 11
回答已采纳
1
回答
findViewById
在
列表视
图上
返回
null
android
、
listview
、
nullreferenceexception
、
findviewbyid
因此,由于一些未知的原因(我还四处搜索,检查是否输入了错误的ID或),当我试图获取导航抽屉的列表视图时,调用
findViewById
返回
null
。我目前也
在
关注,
在
“Inicificationthe抽屉列表”一节中。 //
null
pointer exception happens next
浏览 2
提问于2016-04-22
得票数 0
1
回答
Android应用程序:从实时数据库到防火墙--将数据更新为数据库
android
、
firebase
、
firebase-realtime-database
、
google-cloud-firestore
{ }} getActivity().getSupportFragmentManager().beginTransaction() .addToBac
浏览 4
提问于2018-01-05
得票数 0
回答已采纳
2
回答
尝试使用数据库中的路径显示图像时出现java空指针异常
android
{ EditText mpic =(EditText)
findViewById
BitmapFactory.decodeFile(username); ImageView myImage = (ImageView)
findViewById
,
null
, <em
浏览 4
提问于2012-01-04
得票数 1
2
回答
findViewById
在
片段中
返回
null
android
、
android-fragments
、
android-spinner
、
findviewbyid
我
在
片段中使用
findViewByID
方法时遇到了问题。Spinner spinner = (Spinner) view.
findViewById
(R.id.tabsearchspinner_location);中的微调器始终为空。请看下面的代码。inflater.inflate(R.layout.fragment_tab_suggestions, container, false);
浏览 3
提问于2013-05-04
得票数 1
回答已采纳
2
回答
findViewById
在
LinearLayout上
返回
null
java
、
android
、
android-layout
、
findviewbyid
当我试图找到要更新视图的布局时,
findViewById
返回
null
。FYI:我从onCreate()调用的函数调用onCreate。是的,
在
调用该函数之前,我将调用setContentView。R.layout.activity_main); LinearLayout layout = (LinearLayout)
findViewById
layout.removeAllViews();
浏览 2
提问于2015-12-14
得票数 0
回答已采纳
1
回答
findViewById
在
handleMessage中
返回
null
android
不能通过PhonePadActivity.uaReceiverHandler(msg)方式从外部类调用代码(也可以从线程静态引用活动- PhonePadActivity.phonePadActvity始终为
null
但是当我传入使用静态处理程序时,所有的静态引用也总是
null
,这不能给我更新UI的可能性(简单的
findViewByID
产品编译器错误不能引用非静态的静态方法)。(R.id.registrationStatus)); 这段代码工作正常,regState也被分配,但是phonePadForUsing总是
返回
空豁免,
浏览 2
提问于2012-10-05
得票数 0
1
回答
findViewById
在
BottomSheetDialogFragment中
返回
null
android
、
android-dialogfragment
、
bottom-sheet
private void showFoodListFilterButton() {'void android.widget.TextView.setOnClic
浏览 0
提问于2019-03-26
得票数 0
回答已采纳
2
回答
findViewByID
在
FirestoreRecyclerAdapter中
返回
null
java
、
android
、
asynchronous
、
android-recyclerview
、
google-cloud-firestore
我正在尝试FirestoreRecyclerAdapter,数据正在加载,并且可以
在
调试器中看到。但是,当我试图设置一个等于某些数据的TextView时,它会崩溃,因为TextView是空的。调试时,它首先尝试使用TextView设置
findViewById
,但失败了,并将其设置为
null
。public PostHolder(@NonNull View itemView) { tvTitle = itemView.
findViewById
(R
浏览 0
提问于2019-04-14
得票数 0
回答已采纳
2
回答
findViewById
()
在
OnLayoutInflatedListener中
返回
null
android
、
wear-os
我已经调整了默认代码来引用CircledImageView,这样我就可以设置它的背景色,但它
返回
null
。我还尝试
在
xml文件中为视图设置src / background,但都不起作用。他们
返回
错误,试图膨胀视图。 setContentView(R.layout.activity_my); final WatchViewStub stub = (WatchViewStub)
浏览 2
提问于2014-06-28
得票数 0
4
回答
开关
findViewById
返回
null
android
、
bluetooth
、
findviewbyid
在
我的主要活动中,我写道:bluetoothSwitch.setOnClickListenermakeDiscoverable(); default: }} 当我运行它时,
findViewById
返回
null
...Do,你知道吗?
浏览 5
提问于2016-07-25
得票数 1
回答已采纳
2
回答
findViewById
在
jar中
返回
null
java
、
android
、
eclipse
我有一小部分代码
在
它自己的项目中正确工作(它只是一个文件选择对话框)。单击“完成” mFilterSpinner = (Spinner) mDialog.
findViewById
(R.id.fileFilter); 这是
返回
nul
浏览 3
提问于2013-09-09
得票数 1
回答已采纳
2
回答
为什么我的应用程序“不幸停止”。我只想要一些简单的按钮
java
、
android
、
xml
public void onCreate(Bundle bundle) { pp = (Button)
findViewById
(R.id.pp); cmhs = (Button)
findViewById
(R.
浏览 1
提问于2013-10-08
得票数 0
回答已采纳
2
回答
放大布局并在代码中编辑它
android
、
popupwindow
、
layout-inflater
android:layout_height="wrap_content" android:background="@
null
android:layout_height="wrap_content" android:background="@
null
and
浏览 0
提问于2013-07-03
得票数 0
1
回答
findViewById
在
片段类中
返回
null
android
、
android-fragments
、
findviewbyid
findViewById
()
在
片段类中
返回
null
。用于Toast的ImageButton显示了一些东西,但是Switch的对象(即mySwitch
返回
null
).请帮忙..。ViewGroup父){ View v= convertView;LayoutInflater inflater = LayoutInflater.from(getContext());if( v ==
null
R.id.list_item_textview);theTextView.setTex
浏览 1
提问于2016-03-25
得票数 2
回答已采纳
2
回答
在
TabActivity类中,
findViewById
()
返回
null
android
public View createTabContent(String tag) { //layout = new LinearLayout(NewTransferActivity.this); System.out.println("
NU
浏览 0
提问于2012-04-24
得票数 0
回答已采纳
4
回答
android
findViewById
在
onoptionsitemselected中
返回
null
android
、
findviewbyid
我
在
我的布局文件夹中有一个名为"settings_caching_popup.xml“的LinearLayout,我试图
在
onOptionsItemSelected(MenuItem item)方法中获得这个布局但是
findViewById
(R.layout.settings_caching_popup)总是
返回
null
。然后,我
在
xml布局中使用android:id="@+id/settings_caching_popup将ID设置为LinearLayou
浏览 0
提问于2013-06-12
得票数 0
回答已采纳
2
回答
findViewById
在
新意图中
返回
null
android
我遇到了一个问题,
在
开始的意图中,
findViewById
返回
null
。//in the MainList class然后
在
新东西的构造函数中:this.setListAdapter(new StuffAdapter(this, my_cursor));
在
StuffAdapter中,我
浏览 2
提问于2010-06-17
得票数 2
回答已采纳
2
回答
在
BaseAdapter上
返回
null
的
findViewByID
android
、
android-fragments
、
android-adapter
我开始使用片段来开发一个新的应用程序,其中一个片段是一个ListFragment,当我使用我制作的适配器来显示列表的行时,我从我
在
getView()方法上使用的一些
findViewById
获得了一些
null
@Override if (view ==
null
) { view = inflater.inflate(R.layout.menu_list_ite
浏览 1
提问于2013-07-02
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Kotlin甩掉findViewbyId,原理几何
JavaScript零基础保姆级教程-3
Java实现一个简单的Json解析器(一)
Mybatis 查询语句结果集总结
Kotlin系列之类型可空性
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券