title: How save different text in every different click on date in calendar?
body: <p>I want that if I click on any date in the calendar then an activity opens, where I will write some text and then after clicking on the save button the text will save on that date. When I open that date again then the same text appears. But when I clicked on save then data save in firebase but not in that text. When I open again that activity then the text doesn't show.</p>
  <pre><code>public class Calendar_date_text extends AppCompatActivity {
    EditText calendartextview;
    FirebaseFirestore db;
  
  CalendarView calender;
  DocumentReference documentReference;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_calendar_date_text);
           calendartextview = findViewById(calendaredittext);
          calender = findViewById(R.id.calendarindiary);
  
  
  //setsupportactiobar nu remove kita taa feelhut di jagah date aa gyi
  
  db = FirebaseFirestore.getInstance();
  documentReference = db.collection(&quot;Users&quot;).document();
  calendartextview.setCursorVisible(false);
          calendartextview.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  calendartextview.setCursorVisible(true);
                  calendartextview.requestFocus();
              }
          });
  
        Toolbar  toolbar=findViewById(R.id.toolbar);
  
          Intent intent = getIntent();
          String name = intent.getStringExtra(&quot;name&quot;);
  
  
          toolbar.setTitle(name);
          setSupportActionBar(toolbar);
  
  }
          @Override
          public boolean onCreateOptionsMenu(Menu menu) {
              MenuInflater menuInflater = getMenuInflater();
              menuInflater.inflate(R.menu.calendar_date_text_menu, menu);
              return super.onCreateOptionsMenu(menu);
          }
  
          @Override
          public boolean onOptionsItemSelected(@NonNull MenuItem item) {
           String ourcalendartext;
           ourcalendartext = calendartextview.getText().toString();
              switch (item.getItemId()){
                  case caledartextpost:
                      Toast.makeText(this, &quot;Saved&quot;, Toast.LENGTH_SHORT).show();
                      calendartextview.setCursorVisible(false);
                      Map user = new HashMap();
                      user.put(&quot;calendarpost&quot;,ourcalendartext);
                      documentReference.set(user).addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                          @Override
                          public void onSuccess(Void aVoid) {
                         documentReference.collection(&quot;calendarpost&quot;).addSnapshotListener(new EventListener&lt;QuerySnapshot&gt;() {
                             @Override
                             public void onEvent(@Nullable QuerySnapshot documentSnapshots, @Nullable FirebaseFirestoreException error) {
                               for (DocumentSnapshot ds : documentSnapshots){
                                   String ourcalendartext;
                                   ourcalendartext = ds.getString(&quot;calendarpost&quot;);
                                   calendartextview.setText(ourcalendartext);
                               }
                             }
                         });
                          }
                      });
  
  
  
  
                      break;
              }
              return super.onOptionsItemSelected(item);
  
  
      }
  }
  </code></pre>