DatePicker m_dtPicker = (DatePicker) findViewById(R.id.dt_picker);
setDisabledTextViews(m_dtPicker);
private
void
setDisabledTextViews(ViewGroup dp)
{
for
(
int
x =
0
, n = dp.getChildCount(); x < n; x++)
{
View v = dp.getChildAt(x);
if
(v
instanceof
TextView)
{
v.setEnabled(
false
);
}
else
if
(v
instanceof
ViewGroup)
{
setDisabledTextViews((ViewGroup)v);
}
}
}