未解决参考:合成

时间:2020-02-14 12:07:22

标签: xml android-studio kotlin

我更新时

 Widget build(BuildContext context) {
    final AppLocalizations appLocalizations = AppLocalizations.of(context);

    ///constructs the list here each time the build method gets called. 
    ///I am doing this only because I can't get the AppLocalization object from the initState method
    ///using AppLocalizations.of(context).
    ///Is there any other way to improve this logic????      
    final List<Data> dataList = setupDataList(appLocalizations);


     //...
    //return Widget that uses DataList list object.
}

implementation 'androidx.core:core-ktx:1.1.0' 

我无法以Kotlin代码直接在布局文件中使用视图ID,并且无法导入

implementation 'androidx.core:core-ktx:1.2.0' 

是否由于引入了视图绑定而在新版本中将其删除?

0 个答案:

没有答案