我刚开始在我的应用中使用了一个 BottomSheetDialogFragment
,但是它似乎忽略了我的应用主题。我的应用使用暗色主题,而 BottomSheetDialogFragment
显示为白色背景,并且没有使用我的应用强调颜色。这是唯一表现出这种行为的 Android 组件。为什么会这样,如何解决?
public class CustomBottomDialogFragment extends BottomSheetDialogFragment {
public static CustomBottomDialogFragmentnewInstance(long id) {
final CustomBottomDialogFragmentdialog = new CustomBottomDialogFragment();
Bundle args = new Bundle();
args.putLong(Keys.ARG1, id);
dialog.setArguments(args);
return dialog;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final long id = getArguments().getLong(Keys.ARG1);
final boolean isLiveStream = PodcastHelper.isLiveStream(podcastId);
final View view = inflater.inflate(R.layout.custom_bottom_sheet_layout, container, false);
...
return view;
}