草庐IT

null_unspecified

全部标签

android - v.getTag() 返回 null 而不是 ViewHolder

我有一个自定义的适配器,它有一个标题和自定义的行。有时我的v.getTag()在我存储ViewHolder的位置返回null。它不会一直发生,我无法弄清楚它何时以及为什么会发生。@OverridepublicViewgetView(intposition,ViewconvertView,ViewGroupparent){Viewv=convertView;//Headerif(items.hasDescription()&&0==position){LayoutInflatervi=(LayoutInflater)context.getSystemService(Context.LAY

android - v.getTag() 返回 null 而不是 ViewHolder

我有一个自定义的适配器,它有一个标题和自定义的行。有时我的v.getTag()在我存储ViewHolder的位置返回null。它不会一直发生,我无法弄清楚它何时以及为什么会发生。@OverridepublicViewgetView(intposition,ViewconvertView,ViewGroupparent){Viewv=convertView;//Headerif(items.hasDescription()&&0==position){LayoutInflatervi=(LayoutInflater)context.getSystemService(Context.LAY

android - LiveData.getValue() 使用 Room 返回 null

JavaPOJO对象publicclassSection{@ColumnInfo(name="section_id")publicintmSectionId;@ColumnInfo(name="section_name")publicStringmSectionName;publicintgetSectionId(){returnmSectionId;}publicvoidsetSectionId(intmSectionId){this.mSectionId=mSectionId;}publicStringgetSectionName(){returnmSectionName;}pub

android - LiveData.getValue() 使用 Room 返回 null

JavaPOJO对象publicclassSection{@ColumnInfo(name="section_id")publicintmSectionId;@ColumnInfo(name="section_name")publicStringmSectionName;publicintgetSectionId(){returnmSectionId;}publicvoidsetSectionId(intmSectionId){this.mSectionId=mSectionId;}publicStringgetSectionName(){returnmSectionName;}pub

Android:我可以忽略错误 "Parent view is not a TextView "和 "sendUserActionEvent() mView == null "吗?

在我的Android应用中,我的logcat中经常出现以下两个错误:06-0220:33:16.070:E/MoreInfoHPW_ViewGroup(13983):ParentviewisnotaTextView06-0220:33:12.010:E/ViewRootImpl(13983):sendUserActionEvent()mView==null尽管存在这两个错误,但我的应用程序运行完全正常,我没有找到关于它们是否有害(甚至可以修复!)错误或者是否可以安全地忽略它们的确切答案。到目前为止,我一直很好地忽略它们,但我想问这个问题,因为我确信我不是唯一一个对这两个错误的含义感到困

Android:我可以忽略错误 "Parent view is not a TextView "和 "sendUserActionEvent() mView == null "吗?

在我的Android应用中,我的logcat中经常出现以下两个错误:06-0220:33:16.070:E/MoreInfoHPW_ViewGroup(13983):ParentviewisnotaTextView06-0220:33:12.010:E/ViewRootImpl(13983):sendUserActionEvent()mView==null尽管存在这两个错误,但我的应用程序运行完全正常,我没有找到关于它们是否有害(甚至可以修复!)错误或者是否可以安全地忽略它们的确切答案。到目前为止,我一直很好地忽略它们,但我想问这个问题,因为我确信我不是唯一一个对这两个错误的含义感到困

android - 为什么 requestIdToken 返回 null?

我关注了belowstepsasthislink我将google-services.json下载到我的应用文件夹中。我的项目级gradle文件:dependencies{classpath'com.android.tools.build:gradle:1.3.0'classpath'com.google.gms:google-services:1.5.0-beta2'}我的应用级gradle文件:applyplugin:'com.android.application'applyplugin:'com.google.gms.google-services'dependencies{co

android - 为什么 requestIdToken 返回 null?

我关注了belowstepsasthislink我将google-services.json下载到我的应用文件夹中。我的项目级gradle文件:dependencies{classpath'com.android.tools.build:gradle:1.3.0'classpath'com.google.gms:google-services:1.5.0-beta2'}我的应用级gradle文件:applyplugin:'com.android.application'applyplugin:'com.google.gms.google-services'dependencies{co

android - 使用 Fragment 时 findViewById 返回 NULL

我是Android开发新手,当然还有Fragments。我想在主要Activity中访问我的fragment的控件,但“findViewById”返回null。没有fragment代码可以正常工作。这是我的部分代码:fragment:MainActivity的onCreate:@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);super.setContentView(R.layout.main);this.initialisePaging();EditText

android - 使用 Fragment 时 findViewById 返回 NULL

我是Android开发新手,当然还有Fragments。我想在主要Activity中访问我的fragment的控件,但“findViewById”返回null。没有fragment代码可以正常工作。这是我的部分代码:fragment:MainActivity的onCreate:@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);super.setContentView(R.layout.main);this.initialisePaging();EditText