Android uses resources of third-party libraries

Sometimes it is necessary to use a third library to provide some resources, which cannot be obtained directly through R, and the package name must be added.
For example:

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

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

Guess you like

Origin blog.csdn.net/xlk_1996/article/details/124863818