Commit fc7aee34 authored by 9731301's avatar 9731301

add recyclerView for calender and some changes in ui

parent ee81816f
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".MenuFeatures.Calender.MyCalenderActivity"></activity> <activity android:name=".MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.DatePickerActivity"></activity>
<activity android:name=".MenuFeatures.Calender.MyCalenderActivity" />
<activity android:name=".MenuFeatures.VoiceMassages.VoiceMassages" /> <activity android:name=".MenuFeatures.VoiceMassages.VoiceMassages" />
<activity android:name=".MenuFeatures.AllNotes.AllNotesActivity" /> <activity android:name=".MenuFeatures.AllNotes.AllNotesActivity" />
<activity android:name=".MenuFeatures.AllAchievedNotes.AchivedNotesActivity" /> <activity android:name=".MenuFeatures.AllAchievedNotes.AchivedNotesActivity" />
......
...@@ -15,13 +15,14 @@ import android.widget.FrameLayout; ...@@ -15,13 +15,14 @@ import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAdaptor; import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAllNotesAdaptor;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote; import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.OnItemClickListener; import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.OnAllNotesItemClickListener;
import com.example.mynotepad.MenuFeatures.AllNotes.Note.NoteFragment; import com.example.mynotepad.MenuFeatures.AllNotes.Note.NoteFragment;
import com.example.mynotepad.MenuFeatures.AllNotes.NotesDataBase.Note; import com.example.mynotepad.MenuFeatures.AllNotes.NotesDataBase.Note;
import com.example.mynotepad.MenuFeatures.AllNotes.NotesDataBase.NoteDataBase; import com.example.mynotepad.MenuFeatures.AllNotes.NotesDataBase.NoteDataBase;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption; import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.R; import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
...@@ -37,7 +38,7 @@ public class AllNotesActivity extends AppCompatActivity { ...@@ -37,7 +38,7 @@ public class AllNotesActivity extends AppCompatActivity {
private CustomToolbarOption customToolbarOption; private CustomToolbarOption customToolbarOption;
private FrameLayout allNoteToolBar; private FrameLayout allNoteToolBar;
private RecyclerView recyclerView; private RecyclerView recyclerView;
private MyAdaptor myAdaptor; private MyAllNotesAdaptor myAdaptor;
private List<Note> notes; private List<Note> notes;
private List<MyNote> myNotes; private List<MyNote> myNotes;
public static MyNote myChosenNote; public static MyNote myChosenNote;
...@@ -69,7 +70,7 @@ public class AllNotesActivity extends AppCompatActivity { ...@@ -69,7 +70,7 @@ public class AllNotesActivity extends AppCompatActivity {
// show list with recycler view // show list with recycler view
recyclerView = findViewById(R.id.recyclerView); recyclerView = findViewById(R.id.recyclerView);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
myAdaptor = new MyAdaptor(myNotes); myAdaptor = new MyAllNotesAdaptor(myNotes);
recyclerView.setAdapter(myAdaptor); recyclerView.setAdapter(myAdaptor);
recyclerView.setLayoutManager(linearLayoutManager); recyclerView.setLayoutManager(linearLayoutManager);
...@@ -88,7 +89,7 @@ public class AllNotesActivity extends AppCompatActivity { ...@@ -88,7 +89,7 @@ public class AllNotesActivity extends AppCompatActivity {
}); });
// add listener to recyclerView // add listener to recyclerView
myAdaptor.setOnItemClickListener(new OnItemClickListener() { myAdaptor.setOnItemClickListener(new OnAllNotesItemClickListener() {
@Override @Override
public void onItemClicked(MyNote myNote) { public void onItemClicked(MyNote myNote) {
myChosenNote = myNote; myChosenNote = myNote;
...@@ -115,7 +116,7 @@ public class AllNotesActivity extends AppCompatActivity { ...@@ -115,7 +116,7 @@ public class AllNotesActivity extends AppCompatActivity {
}); });
//add listener to custom toolbar option and set being achieved or not to be saved in database //add listener to custom toolbar option and set being achieved or not to be saved in database
customToolbarOption.setCustomToolbarOptionListener(new CustomAllNotesToolbarOptionListener() { customToolbarOption.setCustomToolbarOptionListener(new CustomToolbarOptionListener() {
@Override @Override
public void onStarClicked(ImageView yellowS, ImageView blackS) { public void onStarClicked(ImageView yellowS, ImageView blackS) {
if (yellowS.getVisibility() == View.VISIBLE){ if (yellowS.getVisibility() == View.VISIBLE){
......
package com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView; package com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -13,16 +12,15 @@ import com.example.mynotepad.R; ...@@ -13,16 +12,15 @@ import com.example.mynotepad.R;
import java.util.List; import java.util.List;
public class MyAdaptor extends RecyclerView.Adapter<MyAdaptor.ViewHolder> { public class MyAllNotesAdaptor extends RecyclerView.Adapter<MyAllNotesAdaptor.ViewHolder> {
private List<MyNote> notes; private List<MyNote> notes;
private OnItemClickListener onItemClickListener; private OnAllNotesItemClickListener onItemClickListener;
public MyAdaptor(List<MyNote> notes) { public MyAllNotesAdaptor(List<MyNote> notes) {
this.notes = notes; this.notes = notes;
} }
@NonNull @NonNull
@Override @Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
...@@ -42,7 +40,7 @@ public class MyAdaptor extends RecyclerView.Adapter<MyAdaptor.ViewHolder> { ...@@ -42,7 +40,7 @@ public class MyAdaptor extends RecyclerView.Adapter<MyAdaptor.ViewHolder> {
return notes.size(); return notes.size();
} }
public void setOnItemClickListener(OnItemClickListener onItemClickListener) { public void setOnItemClickListener(OnAllNotesItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener; this.onItemClickListener = onItemClickListener;
} }
...@@ -61,7 +59,7 @@ public class MyAdaptor extends RecyclerView.Adapter<MyAdaptor.ViewHolder> { ...@@ -61,7 +59,7 @@ public class MyAdaptor extends RecyclerView.Adapter<MyAdaptor.ViewHolder> {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (onItemClickListener != null){ if (onItemClickListener != null) {
onItemClickListener.onItemClicked(notes.get(getAdapterPosition())); onItemClickListener.onItemClicked(notes.get(getAdapterPosition()));
} }
} }
......
package com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView; package com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView;
public interface OnItemClickListener { public interface OnAllNotesItemClickListener {
void onItemClicked(MyNote item); void onItemClicked(MyNote item);
void onItemLongClicked(MyNote item); void onItemLongClicked(MyNote item);
} }
package com.example.mynotepad.MenuFeatures.Calender;
public interface CustomCalenderToolbarOptionListener {
}
...@@ -7,7 +7,7 @@ import java.util.Calendar; ...@@ -7,7 +7,7 @@ import java.util.Calendar;
import java.util.Locale; import java.util.Locale;
public class Date extends DateItem { public class Date extends DateItem {
String getDate() { public String getDate() {
Calendar calendar = getCalendar(); Calendar calendar = getCalendar();
return String.format(Locale.US, return String.format(Locale.US,
"%d/%d/%d", "%d/%d/%d",
......
package com.example.mynotepad.MenuFeatures.Calender; package com.example.mynotepad.MenuFeatures.Calender;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.widget.TextView; import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import com.alirezaafkar.sundatepicker.DatePicker; import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor;
import com.alirezaafkar.sundatepicker.interfaces.DateSetListener; 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.R; import com.example.mynotepad.R;
import java.util.Calendar; import com.google.android.material.floatingactionbutton.FloatingActionButton;
public class MyCalenderActivity extends AppCompatActivity { import java.util.ArrayList;
import java.util.List;
Date mDate; public class MyCalenderActivity extends AppCompatActivity implements View.OnClickListener {
TextView tvDatePersion;
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;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -23,22 +39,51 @@ public class MyCalenderActivity extends AppCompatActivity { ...@@ -23,22 +39,51 @@ public class MyCalenderActivity extends AppCompatActivity {
} }
private void init() { private void init() {
tvDatePersion = findViewById(R.id.dateTv);
DatePicker.Builder builder = new DatePicker setAllNoteListAndTitles();
.Builder() addDateBtn = findViewById(R.id.addDateButton);
.theme(R.style.DialogTheme)
.future(true); customToolbarOption = findViewById(R.id.calenderCustomToolbarOption);
mDate = new Date(); customToolbarOption.setVisibility(View.GONE);
builder.date(mDate.getDay(), mDate.getMonth(), mDate.getYear()); calenderToolbar = findViewById(R.id.calenderToolbar);
builder.build(new DateSetListener() { 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(this);
}
@Override @Override
public void onDateSet(int id, @Nullable Calendar calendar, int day, int month, int year) { public void onClick(View view) {
mDate.setDate(day, month, year); if (view.getId() == addDateBtn.getId()) {
addNewDateAndDescription();
}
//textView }
tvDatePersion.setText(mDate.getDate());
private void addNewDateAndDescription() {
Intent intent = new Intent(MyCalenderActivity.this, DatePickerActivity.class);
startActivity(intent);
} }
}).show(getSupportFragmentManager(), "");
private void setAllNoteListAndTitles() {
myDates = new ArrayList<>();
//todo get data from database
} }
} }
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Calender.MyCalenderDataBase;
public class DateEntity {
}
package com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
import com.example.mynotepad.R;
import java.util.List;
public class MyCalenderAdaptor extends RecyclerView.Adapter<MyCalenderAdaptor.CalenderViewHolder> {
private List<MyDate> dates;
private OnCalenderItemClickListener onCalenderItemClickListener;
public MyCalenderAdaptor(List<MyDate> dates){
this.dates = dates;
}
@NonNull
@Override
public CalenderViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_allnotes_item, parent, false);
return new CalenderViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull CalenderViewHolder holder, int position) {
holder.dateTV.setText(dates.get(position).getDate());
holder.descriptionTV.setText(dates.get(position).getDescription());
holder.isAchieved = dates.get(position).isAchieved();
}
@Override
public int getItemCount() {
return dates.size();
}
public void setOnCalenderItemClickListener(OnCalenderItemClickListener onCalenderItemClickListener) {
this.onCalenderItemClickListener = onCalenderItemClickListener;
}
class CalenderViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
protected TextView dateTV, descriptionTV;
protected boolean isAchieved;
public CalenderViewHolder(@NonNull View itemView) {
super(itemView);
dates = itemView.findViewById(R.id.titleTv);
descriptionTV = itemView.findViewById(R.id.descriptionTv);
isAchieved = false;
itemView.setOnClickListener(this);
itemView.setOnLongClickListener(this);
}
@Override
public void onClick(View view) {
if (onCalenderItemClickListener != null) {
onCalenderItemClickListener.onItemClicked(dates.get(getAdapterPosition()));
}
}
@Override
public boolean onLongClick(View view) {
if (onCalenderItemClickListener != null)
onCalenderItemClickListener.onItemLongClicked(dates.get(getAdapterPosition()));
return true;
}
}
}
package com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
public interface OnCalenderItemClickListener {
void onItemClicked(MyDate item);
void onItemLongClicked(MyDate item);
}
package com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.alirezaafkar.sundatepicker.DatePicker;
import com.alirezaafkar.sundatepicker.interfaces.DateSetListener;
import com.example.mynotepad.MenuFeatures.Calender.Date;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import java.util.Calendar;
public class DatePickerActivity extends AppCompatActivity {
TextView chosenDate, description;
Date mDate;
private FloatingActionButton back;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_date_picker);
init();
showTimePicker();
}
private void init() {
chosenDate = findViewById(R.id.chosenDate);
description = findViewById(R.id.description);
back = findViewById(R.id.calenderBackBtn);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showAlert(view);
}
});
}
private void showTimePicker() {
DatePicker.Builder builder = new DatePicker
.Builder()
.theme(R.style.DialogTheme)
.future(true);
mDate = new Date();
builder.date(mDate.getDay(), mDate.getMonth(), mDate.getYear());
builder.build(new DateSetListener() {
@Override
public void onDateSet(int id, @Nullable Calendar calendar, int day, int month, int year) {
mDate.setDate(day, month, year);
chosenDate.setText(mDate.getDate());
}
}).show(getSupportFragmentManager(), "");
}
private void showAlert(View view) {
if (chosenDate.getText().length() != 0) {
final AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("new note :");
alert.setMessage("Do you want to save the note ?");
alert.setCancelable(true);
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
saveNote();
Toast.makeText(DatePickerActivity.this, "saved", Toast.LENGTH_SHORT).show();
finish();
}
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.cancel();
finish();
}
});
alert.show();
} else if(description.getText().length() != 0){
Snackbar.make(view, "note did not save ! you should pick a date ! ", Snackbar.LENGTH_LONG).setAction("Action", null).show();
finish();
}
else{
finish();
}
}
private void saveNote() {
//todo save in data base
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker;
public class MyDate {
private String date , description ;
private boolean isAchieved;
public MyDate(String date, String description, boolean isAchieved) {
this.date = date;
this.description = description;
this.isAchieved = isAchieved;
}
public String getDate() {
return date;
}
public String getDescription() {
return description;
}
public boolean isAchieved() {
return isAchieved;
}
public void setAchieved(boolean achieved) {
isAchieved = achieved;
}
}
...@@ -7,13 +7,12 @@ import android.widget.ImageView; ...@@ -7,13 +7,12 @@ import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import com.example.mynotepad.MenuFeatures.AllNotes.CustomAllNotesToolbarOptionListener;
import com.example.mynotepad.R; import com.example.mynotepad.R;
public class CustomToolbarOption extends LinearLayout implements View.OnClickListener { public class CustomToolbarOption extends LinearLayout implements View.OnClickListener {
private View rootView; private View rootView;
private ImageView blackStarImg , yellowStarImg , deleteImg , closeImg; private ImageView blackStarImg , yellowStarImg , deleteImg , closeImg;
private CustomAllNotesToolbarOptionListener customToolbarOptionListener; private CustomToolbarOptionListener customToolbarOptionListener;
public CustomToolbarOption(Context context) { public CustomToolbarOption(Context context) {
super(context); super(context);
...@@ -63,7 +62,7 @@ public class CustomToolbarOption extends LinearLayout implements View.OnClickLis ...@@ -63,7 +62,7 @@ public class CustomToolbarOption extends LinearLayout implements View.OnClickLis
} }
} }
public void setCustomToolbarOptionListener(CustomAllNotesToolbarOptionListener customToolbarOptionListener) { public void setCustomToolbarOptionListener(CustomToolbarOptionListener customToolbarOptionListener) {
this.customToolbarOptionListener = customToolbarOptionListener; this.customToolbarOptionListener = customToolbarOptionListener;
} }
} }
package com.example.mynotepad.MenuFeatures.AllNotes; package com.example.mynotepad.MenuFeatures;
import android.widget.ImageView; import android.widget.ImageView;
public interface CustomAllNotesToolbarOptionListener { public interface CustomToolbarOptionListener {
void onStarClicked(ImageView yellowS , ImageView blackS); void onStarClicked(ImageView yellowS , ImageView blackS);
void onDeleteClicked(ImageView imageView); void onDeleteClicked(ImageView imageView);
void onCloseClicked(ImageView imageView); void onCloseClicked(ImageView imageView);
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
android:shape="rectangle">
<solid android:color="#2DCADCEC"/>
<stroke
android:width="10dp"
android:color="#F0CADCEC"/>
<corners android:radius="0dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
android:shape="rectangle">
<solid android:color="#45C0D7EA"/>
<stroke
android:width="5dp"
android:color="#CADCEC"/>
<corners android:radius="0dp"/>
</shape>
\ No newline at end of file
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
android:enabled="false" android:enabled="false"
android:text="@string/all_notes" android:text="@string/all_notes"
android:textColor="#02091E" android:textColor="#02091E"
android:textSize="30dp" /> android:textSize="26dp" />
</FrameLayout> </FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption <com.example.mynotepad.MenuFeatures.CustomToolbarOption
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context=".MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.DatePickerActivity">
<ImageView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="0dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/index" />
<TextView
android:id="@+id/date1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/img"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="60dp"
android:enabled="false"
android:text="@string/date"
android:textSize="30dp"
android:textColor="#000000"
android:background="@drawable/background"/>
<TextView
android:id="@+id/chosenDate"
android:layout_width="219dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/date1"
android:layout_marginLeft="20dp"
android:layout_marginBottom="0dp"
android:layout_toRightOf="@+id/date1"
android:background="@drawable/title_background"
android:enabled="false"
android:textColor="#000000"
android:lines="1"
android:gravity="center"
android:textSize="30dp" />
<TextView
android:id="@+id/date2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/chosenDate"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="60dp"
android:enabled="false"
android:text="@string/description"
android:textSize="30dp"
android:textColor="#000000"
android:background="@drawable/background"/>
<TextView
android:id="@+id/description"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="@+id/date2"
android:layout_centerHorizontal="true"
android:layout_marginLeft="50dp"
android:layout_marginTop="21dp"
android:background="@drawable/title_background"
android:lines="9"
android:enabled="true"
android:textColor="#000000"
android:textSize="20dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/calenderBackBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="330dp"
android:layout_marginTop="520dp"
android:src="@drawable/ic_baseline_keyboard_backspace_24"
app:backgroundTint="#DF4141" />
</RelativeLayout>
\ No newline at end of file
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
tools:context=".MenuFeatures.Calender.MyCalenderActivity"> tools:context=".MenuFeatures.Calender.MyCalenderActivity">
<FrameLayout <FrameLayout
android:id="@+id/fragmentPlace" android:id="@+id/fragmentPlace_calender"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<LinearLayout <LinearLayout
android:id="@+id/allNoteListAndTitle" android:id="@+id/allDateListAndTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<FrameLayout <FrameLayout
android:id="@+id/calenderToolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
...@@ -41,11 +42,11 @@ ...@@ -41,11 +42,11 @@
android:enabled="false" android:enabled="false"
android:text="@string/calender" android:text="@string/calender"
android:textColor="#02091E" android:textColor="#02091E"
android:textSize="30dp" /> android:textSize="26dp" />
</FrameLayout> </FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption <com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/customToolbarOption" android:id="@+id/calenderCustomToolbarOption"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" /> android:layout_height="50dp" />
</FrameLayout> </FrameLayout>
...@@ -55,7 +56,7 @@ ...@@ -55,7 +56,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView" android:id="@+id/calenderRecyclerView"
android:layout_width="409dp" android:layout_width="409dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#4883B5DD" android:background="#4883B5DD"
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
tools:layout_editor_absoluteY="1dp" /> tools:layout_editor_absoluteY="1dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addNoteButton" android:id="@+id/addDateButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="330dp" android:layout_marginLeft="330dp"
...@@ -74,12 +75,5 @@ ...@@ -74,12 +75,5 @@
tools:layout_editor_absoluteX="310dp" tools:layout_editor_absoluteX="310dp"
tools:layout_editor_absoluteY="612dp" /> tools:layout_editor_absoluteY="612dp" />
</FrameLayout> </FrameLayout>
<TextView
android:id="@+id/dateTv"
android:layout_width="153dp"
android:layout_height="40dp"
tools:layout_editor_absoluteX="132dp"
tools:layout_editor_absoluteY="466dp" />
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<TextView <TextView
android:id="@+id/descriptionTv" android:id="@+id/descriptionTv"
android:layout_marginTop="2dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="3" android:layout_weight="3"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:background="@drawable/row_bg">
<TextView
android:id="@+id/dateTextView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/date"
android:textSize="28dp"
android:gravity="center"/>
<TextView
android:id="@+id/descriptionTextView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="6"
android:text="@string/description"
android:textSize="25dp"
android:gravity="center_vertical"/>
</LinearLayout>
\ No newline at end of file
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="title" android:layout_marginTop="5dp"
android:textSize="24dp" android:layout_marginLeft="10dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:layout_marginLeft="10dp"/> android:hint=" title"
android:textSize="24dp"
android:background="@drawable/title_background"/>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -29,10 +30,13 @@ ...@@ -29,10 +30,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignTop="@+id/title" android:layout_alignTop="@+id/title"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:background="@drawable/description_backgroung"
android:gravity="top" android:gravity="top"
android:hint="..." android:hint=" ..."
android:lines="20" /> android:lines="20" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
...@@ -40,7 +44,7 @@ ...@@ -40,7 +44,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="330dp" android:layout_marginLeft="330dp"
android:layout_marginTop="440dp" android:layout_marginTop="480dp"
android:src="@drawable/ic_baseline_keyboard_backspace_24" android:src="@drawable/ic_baseline_keyboard_backspace_24"
app:backgroundTint="#DF4141" /> app:backgroundTint="#DF4141" />
</FrameLayout> </FrameLayout>
......
...@@ -10,4 +10,5 @@ ...@@ -10,4 +10,5 @@
<string name="calender">calender</string> <string name="calender">calender</string>
<string name="description">description</string> <string name="description">description</string>
<string name="date">date</string> <string name="date">date</string>
<string name="chosendate">chosenDate</string>
</resources> </resources>
\ 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