how can add calendar view inside expandable list view using marateal design edit text

32 views
Skip to first unread message

Subhash Pandey

unread,
Nov 18, 2016, 10:03:30 AM11/18/16
to android-platform
My code as follow.

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.expadable_view);

button=(Button)findViewById(R.id.editprofilesubmit);
expListView = (ExpandableListView) findViewById(R.id.editProfile_listView);
compeny_Title=(TextInputLayout)findViewById(R.id.textinput_layout_editprofile_startdate);
company_Name=(TextInputLayout)findViewById(R.id.textinput_layout_editprofile_enddate);
company_Review=(TextInputLayout)findViewById(R.id.textinput_layout_editprofile_cpa_cpga);
rsDetailFromDate=(EditText)findViewById(R.id.editprofile_startdate);
rsDetailToDate=(EditText)findViewById(R.id.editprofile_enddate);
rsDetailCpa=(EditText)findViewById(R.id.editprofile_cpa_cpga);
specilizeationSubject=(AutoCompleteTextView)findViewById(R.id.edit_profile_univercity);
cpaAndApaonSubject=(AutoCompleteTextView)findViewById(R.id.editprofile_specilazetion);

final DatePickerDialog.OnDateSetListener dateSetListener1= new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
myCalendar.set(Calendar.YEAR,year);
myCalendar.set(Calendar.MONTH,month);
myCalendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);
Log.e("Error auccre","Cannato find it");

}
};

final DatePickerDialog.OnDateSetListener dateSetListener= new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth)
{
myCalendar.set(Calendar.YEAR,year);
myCalendar.set(Calendar.MONTH,month);
myCalendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);
}
};


expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener()
{
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)
{



Log.e("Cannot Auucre","please try again");

rsDetailFromDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new DatePickerDialog(MainActivity.this
, dateSetListener, myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH), myCalendar.get(Calendar.DAY_OF_MONTH)).show();
updateLable1();
}


});

rsDetailToDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new DatePickerDialog(MainActivity.this,dateSetListener1,myCalendar.get(Calendar.YEAR),myCalendar.get(Calendar.MONTH),myCalendar.get(Calendar.DAY_OF_MONTH)).show();
updateLable();

}
});
Toast.makeText(MainActivity.this, "Calander Displayed", Toast.LENGTH_SHORT).show();

Log.e("Error Auccure",""+expListView);
System.err.print("Error not Displayed");

/* button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{


// rsFromDate=rsDetailFromDate.getText().toString();
// rsToDate=rsDetailToDate.getText().toString();
rsCpa=rsDetailCpa.getText().toString();

}
});*/

return true;
}
});
Reply all
Reply to author
Forward
0 new messages