我的项目中有date time picker dialog
。 dialog
的大小适合手机。但是,对于平板电脑屏幕来说很小。我为平板电脑屏幕做了特殊的style.xml
,并且成功地放大了button
和font size of button
。但是,我无法成功更改text size
天。我该怎么办?
https://ftuforum.com/interactive-python-dashboards-with-plotly-and-dash
public Dialog onCreateDialog(Bundle savedInstanceState) {
boolean tabletSize = getResources().getBoolean(R.bool.isTablet);
if (tabletSize) {
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), R.style.date_time_picker, this, year, month, day);
datePickerDialog.getWindow().setBackgroundDrawableResource(R.drawable.dialog_corner);
return datePickerDialog;
}
sw600dp / styles.xml
<style name="date_time_picker">
<item name="android:windowIsFloating">true</item>
<item name="android:textSize">28sp</item>
</style>