NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sheet=findViewById(R.id.sheet);
ekle=findViewById(R.id.ekle);
bottomSheetBehavior = BottomSheetBehavior.from(sheet);
bottomSheetBehavior.setPeekHeight(200);
noteLists=findViewById(R.id.notelist);
fStore=FirebaseFirestore.getInstance();

Query query = fStore.collection("notes").document("123").collection("myNotes").orderBy("tarih", Query.Direction.ASCENDING);
FirestoreRecyclerOptions<Not> tümNotlar = new FirestoreRecyclerOptions.Builder<Not>()
.setQuery(query,Not.class)
.build();

noteAdapter=new FirestoreRecyclerAdapter<Not, NotViewHolder>(tümNotlar) {
@Override
protected void onBindViewHolder(@NonNull NotViewHolder notViewHolder, int i, @NonNull Not not) {
notViewHolder.title.setText(not.getBaslik());
notViewHolder.content.setText(not.getIcerik());
notViewHolder.view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

BottomSheetDialog bottomSheetDialog=new BottomSheetDialog(
MainActivity.this,R.style.BottomSheetTheme
);
View bottomSheetView= LayoutInflater.from(getApplicationContext()).inflate(
R.layout.not_click_layout,
findViewById(R.id.bottomSheet)
);

bottomSheetDialog.setContentView(bottomSheetView);
bottomSheetDialog.show();

bottomSheetView.findViewById(R.id.goruntule).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
BottomSheetDialog bottomSheetDialog=new BottomSheetDialog(
MainActivity.this,R.style.BottomSheetTheme
);
View bottomSheetView= LayoutInflater.from(getApplicationContext()).inflate(
R.layout.notgoruntule,
findViewById(R.id.bottomSheet)
);

TextView baslik=bottomSheetView.findViewById(R.id.baslik);
TextView icerik=bottomSheetView.findViewById(R.id.icerik);

baslik.setText(not.getBaslik());
icerik.setText(not.getIcerik());
bottomSheetDialog.setContentView(bottomSheetView);
bottomSheetDialog.show();

}
});

bottomSheetView.findViewById(R.id.duzenle).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
BottomSheetDialog bottomSheetDialog=new BottomSheetDialog(
MainActivity.this,R.style.BottomSheetTheme
);
View bottomSheetView= LayoutInflater.from(getApplicationContext()).inflate(
R.layout.notguncelle,
findViewById(R.id.bottomSheet)
);
EditText baslik=bottomSheetView.findViewById(R.id.baslik);
EditText icerik=bottomSheetView.findViewById(R.id.icerik);
baslik.setText(not.getBaslik());
icerik.setText(not.getIcerik());
bottomSheetDialog.setContentView(bottomSheetView);
bottomSheetDialog.show();

bottomSheetView.findViewById(R.id.kaydet).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

String nBaslik = baslik.getText().toString();
String nIcerik = icerik.getText().toString();

if(nBaslik.isEmpty() || nIcerik.isEmpty()){
Toast.makeText(MainActivity.this, "Boş bırakmayın", Toast.LENGTH_SHORT).show();
}

docref = fStore.collection("notes").document("123").collection("myNotes").document(noteAdapter.getSnapshots().getSnapshot(i).getId());
Map<String,Object> note = new HashMap<>();
note.put("baslik",nBaslik);
note.put("icerik",nIcerik);


docref.update(note).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(MainActivity.this, "Not kaydedildi.", Toast.LENGTH_SHORT).show();
bottomSheetDialog.dismiss();


}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(MainActivity.this, "Tekrar deneyin.", Toast.LENGTH_SHORT).show();
}
});
}
});

}
});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.