【发布时间】:2021-09-19 16:21:27
【问题描述】:
我刚开始在我的应用程序中使用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;
}
【问题讨论】:
-
展示你是如何实现底部表格的?
标签: android bottom-sheet bottomsheetdialogfragment