通用的日期筛选控件
###usage:
public class MainActivity extends AppCompatActivity implements DatePickerFragment.OnDateFilterListener {
private DatePickerFragment mPickerFragment;
private TextView dateTv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dateTv= (TextView) findViewById(R.id.tv_date);
mPickerFragment=DatePickerFragment.newInstance().setDateFilterListener(this);
}
public void onDatePick(View v){
mPickerFragment.show(getSupportFragmentManager(),DatePickerFragment.TAG);
}
@Override
public void onDateFilter(String date) {
dateTv.setText(date);
}
}
###thanks to: