当底部工作表显示时,如何防止状态栏丢失它的颜色?
我使用bottom sheet view with custom layout.
尝试修改对话框的样式但仍然没有运气
这是我的代码
if (position == 1) {
View modalbottomsheet = getActivity().getLayoutInflater().inflate(R.layout.others_sheet, null);
dialog = new BottomSheetDialog(getActivity());
dialog.setContentView(modalbottomsheet);
dialog.setCanceledOnTouchOutside(true);
dialog.setCancelable(true);
dialog.show();
contact_num = (EditText) modalbottomsheet.findViewById(editText);
choose_contact = (Button) modalbottomsheet.findViewById(choose);
choose_contact.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (v.getId() == choose_contact.getId()) {
Intent intent = new Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, REQUEST_CODE);
}
}
});
hidetext = (EditText) modalbottomsheet.findViewById(R.id.hidetext);
recharge_btn = (Button) modalbottomsheet.findViewById(R.id.rechargeothers_btn);
recharge_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (v.getId()== recharge_btn.getId()){
String phone = ((EditText) dialog.findViewById(R.id.editText)).getText().toString();
String hidden = ((EditText) dialog.findViewById(R.id.hidetext)).getText().toString();
String pre = "*805*2";
String hash = "%23";
String dail = "tel:" + pre + phone + hidden + hash;
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse(dail)));
dialog.hide();
}
}
});
}