Commit 59b10593 authored by 9731301's avatar 9731301

change calender notes structure to navigation

parent f0633d15
......@@ -85,13 +85,11 @@ public class ArchivedNotesActivity extends AppCompatActivity {
final Bundle bundle = new Bundle();
bundle.putString("title", item.getTitle());
bundle.putString("bodyTxt", item.getDescription());
final NoteFragment newNoteFrag = new NoteFragment(false);
newNoteFrag.setArguments(bundle);
//change the fragment
fragPlace.setVisibility(View.VISIBLE);
allNoteListAndTitle.setVisibility(View.GONE);
replaceFragment(newNoteFrag);
//todo
}
else if (item.getType().equals("date")){
//todo go to fragment
......
......@@ -33,7 +33,7 @@ public class MyArchivedAdaptor extends RecyclerView.Adapter<MyArchivedAdaptor.Vi
private void setDates() {
for (MyDate myDate : dates) {
if (myDate.isarchived()) {
if (myDate.isArchived()) {
DateOrNote date = new DateOrNote(myDate.getId(), "date", myDate.getDate(), myDate.getDescription());
dateOrNoteList.add(date);
}
......@@ -42,7 +42,7 @@ public class MyArchivedAdaptor extends RecyclerView.Adapter<MyArchivedAdaptor.Vi
private void setNotes() {
for (MyNote myNote : notes) {
if (myNote.isarchived()) {
if (myNote.isArchived()) {
DateOrNote note = new DateOrNote(myNote.getId(), "note", myNote.getTitle(), myNote.getDescription());
dateOrNoteList.add(note);
}
......
......@@ -19,7 +19,6 @@ import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAllNotesAdaptor;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.OnAllNotesItemClickListener;
import com.example.mynotepad.MenuFeatures.AllNotes.Note.NoteFragment;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.R;
......@@ -94,6 +93,7 @@ public class AllNotesListFragment extends Fragment {
final Bundle bundle = new Bundle();
bundle.putString("title", myNote.getTitle());
bundle.putString("bodyTxt", myNote.getDescription());
bundle.putString("type" , "note");
//change the fragment
navController.navigate(R.id.action_allNotesListFragment_to_noteFragment ,bundle);
......@@ -104,7 +104,7 @@ public class AllNotesListFragment extends Fragment {
customToolbarOption.setVisibility(View.VISIBLE);
allNoteToolBar.setVisibility(View.GONE);
myChosenNote = myNote;
if (myChosenNote.isarchived()){
if (myChosenNote.isArchived()){
customToolbarOption.setYellowStar();
}
else {
......@@ -166,14 +166,14 @@ public class AllNotesListFragment extends Fragment {
}
protected void starClicked() {
if (myChosenNote.isarchived()) {
if (myChosenNote.isArchived()) {
customToolbarOption.setBlackStar();
myChosenNote.setarchived(false);
myChosenNote.setArchived(false);
updatearchivedNotesInDataBase();
Toast.makeText(getContext(), "unarchived", Toast.LENGTH_SHORT).show();
} else {
customToolbarOption.setYellowStar();
myChosenNote.setarchived(true);
myChosenNote.setArchived(true);
updatearchivedNotesInDataBase();
Toast.makeText(getContext(), "archived", Toast.LENGTH_SHORT).show();
}
......@@ -181,7 +181,7 @@ public class AllNotesListFragment extends Fragment {
private void updatearchivedNotesInDataBase() {
noteDataBase.noteDao().updateNote(myChosenNote.getTitle(), myChosenNote.getDescription()
, myChosenNote.isarchived(), myChosenNote.getId());
, myChosenNote.isArchived(), myChosenNote.getId());
}
......
......@@ -31,7 +31,7 @@ public class MyAllNotesAdaptor extends RecyclerView.Adapter<MyAllNotesAdaptor.Vi
public void onBindViewHolder(ViewHolder holder, int position) {
holder.titleTV.setText(notes.get(position).getTitle());
holder.descriptionTV.setText(notes.get(position).getDescription());
holder.isarchived = notes.get(position).isarchived();
holder.isarchived = notes.get(position).isArchived();
}
@Override
......
......@@ -21,11 +21,11 @@ public class MyNote {
return description;
}
public boolean isarchived() {
public boolean isArchived() {
return isarchived;
}
public void setarchived(boolean archived) {
public void setArchived(boolean archived) {
isarchived = archived;
}
......
......@@ -14,9 +14,10 @@ import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesActivity;
import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesListFragment;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note;
import com.example.mynotepad.MenuFeatures.Calender.CalenderNotesListFragment;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
......@@ -28,22 +29,22 @@ import static com.example.mynotepad.MainActivity.noteDataBase;
*/
public class NoteFragment extends Fragment {
private Note note;
DateEntity dateEntity;
private EditText titleTxt, bodyTxt;
private FloatingActionButton back;
private boolean isAnewNote;
private String type;
public NoteFragment() {
}
public NoteFragment(boolean isAnewNote) {
this.isAnewNote = isAnewNote;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
final View v = inflater.inflate(R.layout.fragment_note, container, false);
init(v);
isAnewNote = true;
return v;
}
......@@ -76,7 +77,10 @@ public class NoteFragment extends Fragment {
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (type.equals("note"))
saveNote();
else if (type.equals("date"))
saveCalenderNote();
if (getActivity() != null)
getActivity().onBackPressed();
}
......@@ -98,7 +102,19 @@ public class NoteFragment extends Fragment {
noteDataBase.noteDao().insertNote(note);
Toast.makeText(getActivity(), "saved", Toast.LENGTH_SHORT).show();
} else {
noteDataBase.noteDao().updateNote(titleTxt.getText().toString(), bodyTxt.getText().toString(), AllNotesListFragment.myChosenNote.isarchived(), AllNotesListFragment.myChosenNote.getId());
noteDataBase.noteDao().updateNote(titleTxt.getText().toString(), bodyTxt.getText().toString(), AllNotesListFragment.myChosenNote.isArchived(), AllNotesListFragment.myChosenNote.getId());
Toast.makeText(getActivity(), "updated", Toast.LENGTH_SHORT).show();
}
}
private void saveCalenderNote() {
if (isAnewNote) {
dateEntity = new DateEntity(titleTxt.getText().toString(), bodyTxt.getText().toString(), false);
noteDataBase.dateNoreDAO().insertDateNote(dateEntity);
Toast.makeText(getActivity(), "saved", Toast.LENGTH_SHORT).show();
} else {
noteDataBase.dateNoreDAO().updateDate(titleTxt.getText().toString(), bodyTxt.getText().toString(), CalenderNotesListFragment.myChosenDateNote.isArchived(), CalenderNotesListFragment.myChosenDateNote.getId());
Toast.makeText(getActivity(), "updated", Toast.LENGTH_SHORT).show();
}
}
......@@ -106,9 +122,11 @@ public class NoteFragment extends Fragment {
private void setTitleAndBodyTxt() {
Bundle bundle = getArguments();
isAnewNote = false;
if (bundle != null) {
titleTxt.setText(bundle.getString("title"));
bodyTxt.setText(bundle.getString("bodyTxt"));
type = bundle.getString("type");
}
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Calender;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
import com.example.mynotepad.MenuFeatures.AllNotes.Note.NoteFragment;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.OnCalenderItemClickListener;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.DatePickerActivity;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
import java.util.List;
import static com.example.mynotepad.MainActivity.noteDataBase;
public class CalenderNotesListFragment extends Fragment {
private FloatingActionButton addDateBtn;
private CustomToolbarOption customToolbarOption;
private FrameLayout calenderToolbar;
private RecyclerView recyclerView;
private MyCalenderAdaptor myAdaptor;
private List<MyDate> myDates;
private List<DateEntity> entityDates;
public static MyDate myChosenDateNote;
private NavController navController;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_calender_notes_list, container, false);
}
@Override
public void onResume() {
super.onResume();
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
myAdaptor = new MyCalenderAdaptor(myDates);
recyclerView.setAdapter(myAdaptor);
recyclerView.setLayoutManager(linearLayoutManager);
addListeners();
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
init(view);
addListeners();
}
private void init(View view) {
setAllDateNoteListAndTitles();
addDateBtn = view.findViewById(R.id.addDateButton);
customToolbarOption = view.findViewById(R.id.calenderCustomToolbarOption);
customToolbarOption.setVisibility(View.GONE);
calenderToolbar = view.findViewById(R.id.calenderToolbar);
calenderToolbar.setEnabled(false);
addDateBtn = view.findViewById(R.id.addDateButton);
navController = Navigation.findNavController(view);
// show list with recycler view
recyclerView = view.findViewById(R.id.calenderRecyclerView);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
myAdaptor = new MyCalenderAdaptor(myDates);
recyclerView.setAdapter(myAdaptor);
recyclerView.setLayoutManager(linearLayoutManager);
}
private void addListeners() {
addDateBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
addNewDateAndDescription();
}
});
// add listener to recyclerView
myAdaptor.setOnCalenderItemClickListener(new OnCalenderItemClickListener() {
@Override
public void onItemClicked(MyDate myDate) {
myChosenDateNote = myDate;
//set noteFragment data
final Bundle bundle = new Bundle();
bundle.putString("title", myChosenDateNote.getDate());
bundle.putString("bodyTxt", myChosenDateNote.getDescription());
bundle.putString("type","date");
//change the fragment
navController.navigate(R.id.action_calenderNotesListFragment_to_noteFragment2 ,bundle);
}
@Override
public void onItemLongClicked(MyDate myDate) {
customToolbarOption.setVisibility(View.VISIBLE);
calenderToolbar.setVisibility(View.GONE);
myChosenDateNote = myDate;
if (myChosenDateNote.isArchived()) {
customToolbarOption.setYellowStar();
} else {
customToolbarOption.setBlackStar();
}
}
});
//add listener to custom toolbar option and set being archived or not to be saved in database
customToolbarOption.setCustomToolbarOptionListener(new CustomToolbarOptionListener() {
@Override
public void onStarClicked() {
starClicked();
}
@Override
public void onDeleteClicked() {
deleteClicked();
}
@Override
public void onCloseClicked() {
closeClicked();
}
});
}
private void closeClicked() {
customToolbarOption.setVisibility(View.GONE);
calenderToolbar.setVisibility(View.VISIBLE);
}
private void deleteClicked() {
AlertDialog.Builder alert = new AlertDialog.Builder(getContext());
alert.setMessage("are you sure you wanna delete it ??? ");
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.dateNoreDAO().deleteDateNote(entityDates.get(myDates.indexOf(myChosenDateNote)));
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
myAdaptor = new MyCalenderAdaptor(myDates);
recyclerView.setAdapter(myAdaptor);
recyclerView.setLayoutManager(linearLayoutManager);
}
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.cancel();
}
});
alert.show();
calenderToolbar.setVisibility(View.VISIBLE);
}
private void starClicked() {
if (myChosenDateNote.isArchived()) {
customToolbarOption.setBlackStar();
myChosenDateNote.setArchived(false);
updatearchivedDatesInDataBase();
Toast.makeText(getContext(), "unarchived", Toast.LENGTH_SHORT).show();
} else {
customToolbarOption.setYellowStar();
myChosenDateNote.setArchived(true);
updatearchivedDatesInDataBase();
Toast.makeText(getContext(), "archived", Toast.LENGTH_SHORT).show();
}
}
private void updatearchivedDatesInDataBase() {
noteDataBase.dateNoreDAO().updateDate(myChosenDateNote.getDate(), myChosenDateNote.getDescription(), myChosenDateNote.isArchived(), myChosenDateNote.getId());
}
private void addNewDateAndDescription() {
Intent intent = new Intent(getContext(), DatePickerActivity.class);
startActivity(intent);
}
private void setAllDateNoteListAndTitles() {
//get data from database to set in recyclerView
entityDates = noteDataBase.dateNoreDAO().getAllDateNotes();
myDates = new ArrayList<>();
for (DateEntity dateEntity : entityDates) {
MyDate myDate = new MyDate(dateEntity.getDate(), dateEntity.getDescription(), dateEntity.isarchived(), dateEntity.getID());
myDates.add(myDate);
}
}
}
\ No newline at end of file
......@@ -34,176 +34,11 @@ import static com.example.mynotepad.MainActivity.noteDataBase;
public class MyCalenderActivity extends AppCompatActivity {
private FloatingActionButton addDateBtn;
private CustomToolbarOption customToolbarOption;
private FrameLayout calenderToolbar;
private LinearLayout allDateListAndTitle;
private FrameLayout fragPlace;
private RecyclerView recyclerView;
private MyCalenderAdaptor myAdaptor;
private List<MyDate> myDates;
private List<DateEntity> entityDates;
private MyDate myChosenDateNote;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_calender);
init();
}
@Override
protected void onResume() {
super.onResume();
init();
}
private void init() {
setAllDateNoteListAndTitles();
addDateBtn = findViewById(R.id.addDateButton);
customToolbarOption = findViewById(R.id.calenderCustomToolbarOption);
customToolbarOption.setVisibility(View.GONE);
calenderToolbar = findViewById(R.id.calenderToolbar);
calenderToolbar.setEnabled(false);
addDateBtn = findViewById(R.id.addDateButton);
allDateListAndTitle = findViewById(R.id.allDateListAndTitle);
fragPlace = findViewById(R.id.fragmentPlace_calender);
fragPlace.setVisibility(View.GONE);
// show list with recycler view
recyclerView = findViewById(R.id.calenderRecyclerView);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
myAdaptor = new MyCalenderAdaptor(myDates);
recyclerView.setAdapter(myAdaptor);
recyclerView.setLayoutManager(linearLayoutManager);
addListeners();
}
private void addListeners() {
addDateBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
addNewDateAndDescription();
}
});
// add listener to recyclerView
myAdaptor.setOnCalenderItemClickListener(new OnCalenderItemClickListener() {
@Override
public void onItemClicked(MyDate myDate) {
myChosenDateNote = myDate;
//set noteFragment data
final Bundle bundle = new Bundle();
bundle.putString("title", myChosenDateNote.getDate());
bundle.putString("bodyTxt", myChosenDateNote.getDescription());
final NoteFragment newNoteFrag = new NoteFragment(false);
newNoteFrag.setArguments(bundle);
//change the fragment
/* fragPlace.setVisibility(View.VISIBLE);
allNoteListAndTitle.setVisibility(View.GONE);
addNoteButton.hide();
replaceFragment(newNoteFrag);*/
//toDo go to activity/fragment
}
@Override
public void onItemLongClicked(MyDate myDate) {
customToolbarOption.setVisibility(View.VISIBLE);
calenderToolbar.setVisibility(View.GONE);
myChosenDateNote = myDate;
if (myChosenDateNote.isarchived()){
customToolbarOption.setYellowStar();
}
else {
customToolbarOption.setBlackStar();
}
}
});
//add listener to custom toolbar option and set being archived or not to be saved in database
customToolbarOption.setCustomToolbarOptionListener(new CustomToolbarOptionListener() {
@Override
public void onStarClicked() {
starClicked();
}
@Override
public void onDeleteClicked() {
deleteClicked();
}
@Override
public void onCloseClicked() {
closeClicked();
}
});
}
private void closeClicked() {
customToolbarOption.setVisibility(View.GONE);
calenderToolbar.setVisibility(View.VISIBLE);
}
private void deleteClicked() {
AlertDialog.Builder alert = new AlertDialog.Builder(MyCalenderActivity.this);
alert.setMessage("are you sure you wanna delete it ??? ");
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.dateNoreDAO().deleteDateNote(entityDates.get(myDates.indexOf(myChosenDateNote)));
init();
}
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.cancel();
}
});
alert.show();
calenderToolbar.setVisibility(View.VISIBLE);
}
private void starClicked() {
if (myChosenDateNote.isarchived()) {
customToolbarOption.setBlackStar();
myChosenDateNote.setarchived(false);
updatearchivedDatesInDataBase();
Toast.makeText(this, "unarchived", Toast.LENGTH_SHORT).show();
} else {
customToolbarOption.setYellowStar();
myChosenDateNote.setarchived(true);
updatearchivedDatesInDataBase();
Toast.makeText(this, "archived", Toast.LENGTH_SHORT).show();
}
}
private void updatearchivedDatesInDataBase() {
noteDataBase.dateNoreDAO().updateDate(myChosenDateNote.getDate(), myChosenDateNote.getDescription(), myChosenDateNote.isarchived(), myChosenDateNote.getId());
}
private void addNewDateAndDescription() {
Intent intent = new Intent(MyCalenderActivity.this, DatePickerActivity.class);
startActivity(intent);
}
private void setAllDateNoteListAndTitles() {
//get data from database to set in recyclerView
entityDates = noteDataBase.dateNoreDAO().getAllDateNotes();
myDates = new ArrayList<>();
for (DateEntity dateEntity : entityDates) {
MyDate myDate = new MyDate(dateEntity.getDate(), dateEntity.getDescription(), dateEntity.isarchived(), dateEntity.getID());
myDates.add(myDate);
}
}
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ public class MyCalenderAdaptor extends RecyclerView.Adapter<MyCalenderAdaptor.Ca
public void onBindViewHolder(@NonNull CalenderViewHolder holder, int position) {
holder.dateTV.setText(dates.get(position).getDate());
holder.descriptionTV.setText(dates.get(position).getDescription());
holder.isarchived = dates.get(position).isarchived();
holder.isarchived = dates.get(position).isArchived();
}
@Override
......
......@@ -3,13 +3,13 @@ package com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimeP
public class MyDate {
private String date , description ;
private boolean isarchived;
private boolean isArchived;
int id;
public MyDate(String date, String description, boolean isarchived , int id) {
this.date = date;
this.description = description;
this.isarchived = isarchived;
this.isArchived = isarchived;
this.id = id;
}
......@@ -21,12 +21,12 @@ public class MyDate {
return description;
}
public boolean isarchived() {
return isarchived;
public boolean isArchived() {
return isArchived;
}
public void setarchived(boolean archived) {
isarchived = archived;
public void setArchived(boolean archived) {
isArchived = archived;
}
public int getId() {
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MenuFeatures.Calender.MyCalenderActivity">
<FrameLayout
android:id="@+id/fragmentPlace_calender"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/allDateListAndTitle"
<fragment
android:id="@+id/fragment_container"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/calenderToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent"
android:layout_height="50dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/index" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:enabled="false"
android:text="@string/calender"
android:textColor="#02091E"
android:textSize="26dp" />
</FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/calenderCustomToolbarOption"
android:layout_width="match_parent"
android:layout_height="50dp" />
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/calenderRecyclerView"
android:layout_width="409dp"
android:layout_height="match_parent"
android:background="#4883B5DD"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp" />
app:defaultNavHost="true"
app:navGraph="@navigation/nav_calender" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addDateButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:clickable="true"
android:src="@drawable/add"
app:backgroundTint="#5266D5"
tools:layout_editor_absoluteX="310dp"
tools:layout_editor_absoluteY="612dp" />
</RelativeLayout>
</FrameLayout>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MenuFeatures.Calender.CalenderNotesListFragment">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/calenderToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent"
android:layout_height="50dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/index"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:enabled="false"
android:text="@string/calender"
android:textColor="#02091E"
android:textSize="26dp"
android:layout_marginStart="10dp"
tools:ignore="SpUsage" />
</FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/calenderCustomToolbarOption"
android:layout_width="match_parent"
android:layout_height="50dp" />
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="UselessParent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/calenderRecyclerView"
android:layout_width="409dp"
android:layout_height="match_parent"
android:background="#4883B5DD"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addDateButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:clickable="true"
android:src="@drawable/add"
app:backgroundTint="#5266D5"
tools:layout_editor_absoluteX="310dp"
tools:layout_editor_absoluteY="612dp"
tools:ignore="KeyboardInaccessibleWidget,RtlHardcoded" />
</RelativeLayout>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_calender"
app:startDestination="@id/calenderNotesListFragment">
<fragment
android:id="@+id/calenderNotesListFragment"
android:name="com.example.mynotepad.MenuFeatures.Calender.CalenderNotesListFragment"
android:label="fragment_calender_notes_list"
tools:layout="@layout/fragment_calender_notes_list" >
<action
android:id="@+id/action_calenderNotesListFragment_to_noteFragment2"
app:destination="@id/noteFragment2"
app:exitAnim="@anim/fade_out"
app:enterAnim="@anim/slide_in"
app:popEnterAnim="@anim/fade_in"
app:popExitAnim="@anim/slide_out"/>
</fragment>
<fragment
android:id="@+id/noteFragment2"
android:name="com.example.mynotepad.MenuFeatures.AllNotes.Note.NoteFragment"
android:label="NoteFragment" />
</navigation>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment