android 使用第三方库的资源

有时候需要使用第三库提供一些资源,是不能直接通过R获取的,要加上包名。
例如:

//引入依赖
implementation 'com.google.android.material:material:1.6.0'

//使用
View bottomSheetInternal = bottomSheetDialog.findViewById(com.google.android.material.R.layout.design_bottom_sheet_dialog);

猜你喜欢

转载自blog.csdn.net/xlk_1996/article/details/124863818