Commit c8a3009f authored by 9731301's avatar 9731301

add custom dialog and add SharedPreferencesClass to change the theme

parent 606a8931
package com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog; package com.example.mynotepad.Dialogs.AddTxtToPicsDialog;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
......
package com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog; package com.example.mynotepad.Dialogs.AddTxtToPicsDialog;
import android.widget.ImageView; import android.widget.ImageView;
......
package com.example.mynotepad.Dialogs;
import android.app.Activity;
import android.app.Dialog;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.example.mynotepad.R;
public class CustomDialog {
private Button yes, no ;
private TextView textView ;
private onCustomDialogClickListener onCustomDialogClickListener;
public void showAddTxtDialog(Activity activity,String txt) {
final Dialog dialog = new Dialog(activity);
dialog.setCancelable(true);
dialog.setContentView(R.layout.dialog_custom);
yes = dialog.findViewById(R.id.yes);
no = dialog.findViewById(R.id.no);
textView = dialog.findViewById(R.id.textView2);
textView.setText(txt);
addListener(dialog);
dialog.show();
}
private void addListener(final Dialog dialog) {
yes.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onCustomDialogClickListener.yesClicked();
dialog.dismiss();
}
});
no.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onCustomDialogClickListener.noClicked();
dialog.dismiss();
}
});
}
public void setOnCustomDialogClickListener(com.example.mynotepad.Dialogs.onCustomDialogClickListener onCustomDialogClickListener) {
this.onCustomDialogClickListener = onCustomDialogClickListener;
}
}
package com.example.mynotepad.Dialogs;
public interface onCustomDialogClickListener {
void yesClicked();
void noClicked();
}
...@@ -30,12 +30,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -30,12 +30,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private DrawerLayout drawerLayout; private DrawerLayout drawerLayout;
private ImageView theme; private ImageView theme;
private NavigationView navigationView; private NavigationView navigationView;
private String themeState = "colored"; private SharedPreferencesClass sharedPreferencesClass;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
//todo check prefreces and set primitive theme and it is enough to set sTheme //todo check prefreces and set primitive theme and it is enough to set sTheme
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
sharedPreferencesClass = new SharedPreferencesClass();
sharedPreferencesClass.getThemeOnMainActivityCreate(this);
Utils.onActivityCreateThemeForMainActivity(this); Utils.onActivityCreateThemeForMainActivity(this);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
...@@ -52,13 +54,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -52,13 +54,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
case "bright": case "bright":
drawerLayout.setBackgroundResource(R.drawable.main_bg_bright); drawerLayout.setBackgroundResource(R.drawable.main_bg_bright);
break; break;
case "colored":
drawerLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
} }
} }
private void init() { private void init() {
noteDataBase = Room.databaseBuilder(this, NoteDataBase.class, "RoomDb").fallbackToDestructiveMigration().allowMainThreadQueries().build(); noteDataBase = Room.databaseBuilder(this, NoteDataBase.class, "RoomDb").fallbackToDestructiveMigration().allowMainThreadQueries().build();
...@@ -79,18 +77,20 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -79,18 +77,20 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
View header = navigationView.getHeaderView(0); View header = navigationView.getHeaderView(0);
theme = header.findViewById(R.id.theme); theme = header.findViewById(R.id.theme);
// changeThemeToBright();//todo should be set by shared prefrence if (Utils.sTheme.equals("dark")){
theme.setImageResource(R.drawable.ic_sun);
}else {
theme.setImageResource(R.drawable.ic_night_mode);
}
} }
private void addListener() { private void addListener() {
theme.setOnClickListener(new View.OnClickListener() { theme.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (themeState.equals("bright")) { if (Utils.sTheme.equals("bright")) {
changeThemeToDark(); changeThemeToDark();
} else if (themeState.equals("dark")) { } else if (Utils.sTheme.equals("dark")) {
changeThemeToColored();
} else if (themeState.equals("colored")) {
changeThemeToBright(); changeThemeToBright();
} }
} }
...@@ -142,24 +142,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -142,24 +142,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private void changeThemeToDark() { private void changeThemeToDark() {
animations(theme); animations(theme);
theme.setImageResource(R.drawable.ic_colored);
Utils.changeToTheme(this, "dark"); Utils.changeToTheme(this, "dark");
themeState = "dark"; sharedPreferencesClass.changeTheTheme(this);
} }
private void changeThemeToBright() { private void changeThemeToBright() {
animations(theme); animations(theme);
theme.setImageResource(R.drawable.ic_night_mode);
Utils.changeToTheme(this, "bright"); Utils.changeToTheme(this, "bright");
themeState = "bright"; sharedPreferencesClass.changeTheTheme(this);
} }
private void changeThemeToColored() {
Utils.changeToTheme(this, "colored");
animations(theme);
theme.setImageResource(R.drawable.ic_sun);
themeState = "colored";
}
private void animations(ImageView imageView) { private void animations(ImageView imageView) {
ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1f); ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1f);
......
...@@ -72,9 +72,6 @@ public class ArchivedNoesListFragment extends Fragment { ...@@ -72,9 +72,6 @@ public class ArchivedNoesListFragment extends Fragment {
case "bright": case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright); allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break; break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
} }
} }
...@@ -162,7 +159,7 @@ public class ArchivedNoesListFragment extends Fragment { ...@@ -162,7 +159,7 @@ public class ArchivedNoesListFragment extends Fragment {
closeClicked(customToolbarOption); closeClicked(customToolbarOption);
} }
}); });
} }
private void updateToUnarchiveInDataBase() { private void updateToUnarchiveInDataBase() {
......
...@@ -3,6 +3,7 @@ package com.example.mynotepad.MenuFeatures.AllNotes; ...@@ -3,6 +3,7 @@ package com.example.mynotepad.MenuFeatures.AllNotes;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
...@@ -10,12 +11,17 @@ import androidx.navigation.NavController; ...@@ -10,12 +11,17 @@ import androidx.navigation.NavController;
import androidx.navigation.Navigation; import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import com.example.mynotepad.Dialogs.AddTxtToPicsDialog.AddTextToPicDialog;
import com.example.mynotepad.Dialogs.CustomDialog;
import com.example.mynotepad.Dialogs.onCustomDialogClickListener;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note; import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAllNotesAdaptor; import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAllNotesAdaptor;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote; import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
...@@ -25,8 +31,10 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener; ...@@ -25,8 +31,10 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.MenuFeatures.Utils; import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R; import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.example.mynotepad.MainActivity.noteDataBase; import static com.example.mynotepad.MainActivity.noteDataBase;
...@@ -42,6 +50,7 @@ public class AllNotesListFragment extends Fragment { ...@@ -42,6 +50,7 @@ public class AllNotesListFragment extends Fragment {
public static MyNote myChosenNote; public static MyNote myChosenNote;
private NavController navController; private NavController navController;
private LinearLayout allNotesListLayout; private LinearLayout allNotesListLayout;
private CustomDialog customDialog;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
...@@ -67,14 +76,10 @@ public class AllNotesListFragment extends Fragment { ...@@ -67,14 +76,10 @@ public class AllNotesListFragment extends Fragment {
case "bright": case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright); allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break; break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
} }
} }
private void init(View view) { private void init(View view) {
// get data from database // get data from database
setAllNoteListAndTitles(); setAllNoteListAndTitles();
...@@ -86,6 +91,7 @@ public class AllNotesListFragment extends Fragment { ...@@ -86,6 +91,7 @@ public class AllNotesListFragment extends Fragment {
addNoteButton = view.findViewById(R.id.addButton); addNoteButton = view.findViewById(R.id.addButton);
navController = Navigation.findNavController(view); navController = Navigation.findNavController(view);
allNotesListLayout = view.findViewById(R.id.allNoteListLayout); allNotesListLayout = view.findViewById(R.id.allNoteListLayout);
customDialog = new CustomDialog();
// show list with recycler view // show list with recycler view
recyclerView = view.findViewById(R.id.recyclerView); recyclerView = view.findViewById(R.id.recyclerView);
...@@ -104,7 +110,6 @@ public class AllNotesListFragment extends Fragment { ...@@ -104,7 +110,6 @@ public class AllNotesListFragment extends Fragment {
showAddAlert(); showAddAlert();
} }
}); });
// add listener to recyclerView // add listener to recyclerView
myAdaptor.setOnItemClickListener(new OnAllNotesItemClickListener() { myAdaptor.setOnItemClickListener(new OnAllNotesItemClickListener() {
@Override @Override
...@@ -114,10 +119,10 @@ public class AllNotesListFragment extends Fragment { ...@@ -114,10 +119,10 @@ public class AllNotesListFragment extends Fragment {
final Bundle bundle = new Bundle(); final Bundle bundle = new Bundle();
bundle.putString("title", myNote.getTitle()); bundle.putString("title", myNote.getTitle());
bundle.putString("bodyTxt", myNote.getDescription()); bundle.putString("bodyTxt", myNote.getDescription());
bundle.putString("type" , "note"); bundle.putString("type", "note");
//change the fragment //change the fragment
navController.navigate(R.id.action_allNotesListFragment_to_noteFragment ,bundle); navController.navigate(R.id.action_allNotesListFragment_to_noteFragment, bundle);
} }
@Override @Override
...@@ -125,10 +130,9 @@ public class AllNotesListFragment extends Fragment { ...@@ -125,10 +130,9 @@ public class AllNotesListFragment extends Fragment {
customToolbarOption.setVisibility(View.VISIBLE); customToolbarOption.setVisibility(View.VISIBLE);
allNoteToolBar.setVisibility(View.GONE); allNoteToolBar.setVisibility(View.GONE);
myChosenNote = myNote; myChosenNote = myNote;
if (myChosenNote.isArchived()){ if (myChosenNote.isArchived()) {
customToolbarOption.setYellowStar(); customToolbarOption.setYellowStar();
} } else {
else {
customToolbarOption.setBlackStar(); customToolbarOption.setBlackStar();
} }
} }
...@@ -155,31 +159,25 @@ public class AllNotesListFragment extends Fragment { ...@@ -155,31 +159,25 @@ public class AllNotesListFragment extends Fragment {
} }
protected void closeClicked(CustomToolbarOption customToolbarOption) { protected void closeClicked(CustomToolbarOption customToolbarOption) {
customToolbarOption.setVisibility(View.GONE); customToolbarOption.setVisibility(View.GONE);
allNoteToolBar.setVisibility(View.VISIBLE); allNoteToolBar.setVisibility(View.VISIBLE);
} }
protected void deleteClicked(final Note note) { protected void deleteClicked(final Note note) {
AlertDialog.Builder alert = new AlertDialog.Builder(getContext()); customDialog.showAddTxtDialog(getActivity(), "are you sure you wanna delete it ??? ");
alert.setMessage("are you sure you wanna delete it ??? "); customDialog.setOnCustomDialogClickListener(new onCustomDialogClickListener() {
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void yesClicked() {
noteDataBase.noteDao().deleteNote(note); noteDataBase.noteDao().deleteNote(note);
myNotes.remove(myChosenNote); myNotes.remove(myChosenNote);
myAdaptor.notifyDataSetChanged(); myAdaptor.notifyDataSetChanged();
} }
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void noClicked() {
dialogInterface.cancel();
} }
}); });
alert.show();
allNoteToolBar.setVisibility(View.VISIBLE); allNoteToolBar.setVisibility(View.VISIBLE);
customToolbarOption.setVisibility(View.GONE); customToolbarOption.setVisibility(View.GONE);
allNoteToolBar.setVisibility(View.VISIBLE); allNoteToolBar.setVisibility(View.VISIBLE);
...@@ -206,38 +204,31 @@ public class AllNotesListFragment extends Fragment { ...@@ -206,38 +204,31 @@ public class AllNotesListFragment extends Fragment {
private void showAddAlert() { private void showAddAlert() {
final AlertDialog.Builder alert = new AlertDialog.Builder(getContext()); customDialog.showAddTxtDialog(getActivity(), "Do you want to create a new note ?");
alert.setTitle("new note :"); customDialog.setOnCustomDialogClickListener(new onCustomDialogClickListener() {
alert.setMessage("Do you want to create a new note ?");
alert.setCancelable(true);
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void yesClicked() {
showABlankNote(); showABlankNote();
} }
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void noClicked() {
dialogInterface.cancel();
} }
}); });
alert.show();
} }
private void showABlankNote() { private void showABlankNote() {
//set noteFragment data //set noteFragment data
final Bundle bundle = new Bundle(); final Bundle bundle = new Bundle();
bundle.putString("title", ""); bundle.putString("title", "");
bundle.putString("bodyTxt",""); bundle.putString("bodyTxt", "");
bundle.putString("type" , "note"); bundle.putString("type", "note");
//change the fragment //change the fragment
navController.navigate(R.id.action_allNotesListFragment_to_noteFragment ,bundle); navController.navigate(R.id.action_allNotesListFragment_to_noteFragment, bundle);
} }
private void setAllNoteListAndTitles() { private void setAllNoteListAndTitles() {
entityNotes = noteDataBase.noteDao().getAll(); entityNotes = noteDataBase.noteDao().getAll();
myNotes = new ArrayList<>(); myNotes = new ArrayList<>();
......
...@@ -14,6 +14,8 @@ import android.view.ViewGroup; ...@@ -14,6 +14,8 @@ import android.view.ViewGroup;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast; import android.widget.Toast;
import com.example.mynotepad.Dialogs.CustomDialog;
import com.example.mynotepad.Dialogs.onCustomDialogClickListener;
import com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNoesListFragment; import com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNoesListFragment;
import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesListFragment; import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesListFragment;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity; import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
...@@ -62,7 +64,7 @@ public class NoteFragment extends Fragment { ...@@ -62,7 +64,7 @@ public class NoteFragment extends Fragment {
back.setOnClickListener(new View.OnClickListener() { back.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (titleTxt.getText().length()!=0&&bodyTxt.getText().length()!=0) if (titleTxt.getText().length() != 0 && bodyTxt.getText().length() != 0)
showAlert(); showAlert();
} }
}); });
...@@ -70,13 +72,11 @@ public class NoteFragment extends Fragment { ...@@ -70,13 +72,11 @@ public class NoteFragment extends Fragment {
private void showAlert() { private void showAlert() {
final AlertDialog.Builder alert = new AlertDialog.Builder(getContext()); CustomDialog customDialog = new CustomDialog();
alert.setTitle("new note :"); customDialog.showAddTxtDialog(getActivity(), "Do you want to save the note ?");
alert.setMessage("Do you want to save the note ?"); customDialog.setOnCustomDialogClickListener(new onCustomDialogClickListener() {
alert.setCancelable(true);
alert.setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void yesClicked() {
if (type.equals("note")) if (type.equals("note"))
saveNote(); saveNote();
else if (type.equals("date")) else if (type.equals("date"))
...@@ -85,26 +85,22 @@ public class NoteFragment extends Fragment { ...@@ -85,26 +85,22 @@ public class NoteFragment extends Fragment {
System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++"); System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
if (noteDateType.equals("note")) { if (noteDateType.equals("note")) {
noteDataBase.noteDao().updateNote(titleTxt.getText().toString(), bodyTxt.getText().toString(), true, ArchivedNoesListFragment.chosenDateOrNote.getId()); noteDataBase.noteDao().updateNote(titleTxt.getText().toString(), bodyTxt.getText().toString(), true, ArchivedNoesListFragment.chosenDateOrNote.getId());
} else if (noteDateType.equals("date")){ } else if (noteDateType.equals("date")) {
noteDataBase.dateNoreDAO().updateDate(titleTxt.getText().toString(), bodyTxt.getText().toString(), true, ArchivedNoesListFragment.chosenDateOrNote.getId()); noteDataBase.dateNoreDAO().updateDate(titleTxt.getText().toString(), bodyTxt.getText().toString(), true, ArchivedNoesListFragment.chosenDateOrNote.getId());
} }
} }
if (getActivity() != null) if (getActivity() != null)
getActivity().onBackPressed(); getActivity().onBackPressed();
} }
});
alert.setNegativeButton("no", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void noClicked() {
dialogInterface.cancel();
getActivity().onBackPressed(); getActivity().onBackPressed();
} }
}); });
alert.show();
} }
private void saveNote() { private void saveNote() {
if (isAnewNote) { if (isAnewNote) {
note = new Note(titleTxt.getText().toString(), bodyTxt.getText().toString(), false); note = new Note(titleTxt.getText().toString(), bodyTxt.getText().toString(), false);
...@@ -133,11 +129,10 @@ public class NoteFragment extends Fragment { ...@@ -133,11 +129,10 @@ public class NoteFragment extends Fragment {
Bundle bundle = getArguments(); Bundle bundle = getArguments();
if (bundle != null) if (bundle != null)
if (bundle.getString("title").equals("") && bundle.getString("bodyTxt").equals("")){ if (bundle.getString("title").equals("") && bundle.getString("bodyTxt").equals("")) {
isAnewNote = true; isAnewNote = true;
type = bundle.getString("type"); type = bundle.getString("type");
} } else {
else {
isAnewNote = false; isAnewNote = false;
titleTxt.setText(bundle.getString("title")); titleTxt.setText(bundle.getString("title"));
bodyTxt.setText(bundle.getString("bodyTxt")); bodyTxt.setText(bundle.getString("bodyTxt"));
......
...@@ -12,12 +12,14 @@ import androidx.navigation.NavController; ...@@ -12,12 +12,14 @@ import androidx.navigation.NavController;
import androidx.navigation.Navigation; import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity; import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor; import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.OnCalenderItemClickListener; import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.OnCalenderItemClickListener;
...@@ -27,6 +29,7 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener; ...@@ -27,6 +29,7 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.MenuFeatures.Utils; import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R; import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -79,9 +82,6 @@ public class CalenderNotesListFragment extends Fragment { ...@@ -79,9 +82,6 @@ public class CalenderNotesListFragment extends Fragment {
case "bright": case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright); allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break; break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
} }
} }
...@@ -112,7 +112,7 @@ public class CalenderNotesListFragment extends Fragment { ...@@ -112,7 +112,7 @@ public class CalenderNotesListFragment extends Fragment {
addDateBtn.setOnClickListener(new View.OnClickListener() { addDateBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
navController.navigate(R.id.action_calenderNotesListFragment_to_timePickerFragment ); navController.navigate(R.id.action_calenderNotesListFragment_to_timePickerFragment);
} }
}); });
...@@ -125,9 +125,9 @@ public class CalenderNotesListFragment extends Fragment { ...@@ -125,9 +125,9 @@ public class CalenderNotesListFragment extends Fragment {
final Bundle bundle = new Bundle(); final Bundle bundle = new Bundle();
bundle.putString("title", myChosenDateNote.getDate()); bundle.putString("title", myChosenDateNote.getDate());
bundle.putString("bodyTxt", myChosenDateNote.getDescription()); bundle.putString("bodyTxt", myChosenDateNote.getDescription());
bundle.putString("type","date"); bundle.putString("type", "date");
//change the fragment //change the fragment
navController.navigate(R.id.action_calenderNotesListFragment_to_noteFragment2 ,bundle); navController.navigate(R.id.action_calenderNotesListFragment_to_noteFragment2, bundle);
} }
@Override @Override
......
...@@ -14,11 +14,10 @@ import android.provider.MediaStore; ...@@ -14,11 +14,10 @@ import android.provider.MediaStore;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog.AddTextToPicDialog; import com.example.mynotepad.Dialogs.AddTxtToPicsDialog.AddTextToPicDialog;
import com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog.OnSavePicListenerClick; import com.example.mynotepad.Dialogs.AddTxtToPicsDialog.OnSavePicListenerClick;
import com.example.mynotepad.MenuFeatures.Pics.Camera.CameraActivity; import com.example.mynotepad.MenuFeatures.Pics.Camera.CameraActivity;
import com.example.mynotepad.MenuFeatures.Utils; import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R; import com.example.mynotepad.R;
...@@ -31,7 +30,7 @@ public class ChoosingPicsFragment extends Fragment { ...@@ -31,7 +30,7 @@ public class ChoosingPicsFragment extends Fragment {
private LinearLayout camera, gallery; private LinearLayout camera, gallery;
private String newFilePath; private String newFilePath;
private ConstraintLayout constraintLayout ; private ConstraintLayout constraintLayout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
...@@ -57,11 +56,9 @@ public class ChoosingPicsFragment extends Fragment { ...@@ -57,11 +56,9 @@ public class ChoosingPicsFragment extends Fragment {
case "bright": case "bright":
constraintLayout.setBackgroundResource(R.drawable.main_bg_bright); constraintLayout.setBackgroundResource(R.drawable.main_bg_bright);
break; break;
case "colored":
constraintLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
} }
} }
private void init(View view) { private void init(View view) {
camera = view.findViewById(R.id.cameraBtn); camera = view.findViewById(R.id.cameraBtn);
gallery = view.findViewById(R.id.galleryBtn); gallery = view.findViewById(R.id.galleryBtn);
...@@ -115,7 +112,7 @@ public class ChoosingPicsFragment extends Fragment { ...@@ -115,7 +112,7 @@ public class ChoosingPicsFragment extends Fragment {
private void showDialogOnResult(final Bitmap bitmap) { private void showDialogOnResult(final Bitmap bitmap) {
//show dialog to save pic with note //show dialog to save pic with note
AddTextToPicDialog addTextToPicDialog = new AddTextToPicDialog(); AddTextToPicDialog addTextToPicDialog = new AddTextToPicDialog();
addTextToPicDialog.showAddTxtDialog(getActivity() , bitmap); addTextToPicDialog.showAddTxtDialog(getActivity(), bitmap);
addTextToPicDialog.setOnSavePicListenerClick(new OnSavePicListenerClick() { addTextToPicDialog.setOnSavePicListenerClick(new OnSavePicListenerClick() {
@Override @Override
public void saveClicked(String editTextTxt) { public void saveClicked(String editTextTxt) {
......
package com.example.mynotepad.MenuFeatures.Pics; package com.example.mynotepad.MenuFeatures.Pics;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
...@@ -13,16 +9,9 @@ import androidx.fragment.app.Fragment; ...@@ -13,16 +9,9 @@ import androidx.fragment.app.Fragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView;
import com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog.AddTextToPicDialog;
import com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog.OnSavePicListenerClick;
import com.example.mynotepad.R; import com.example.mynotepad.R;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
public class NotedPicsListFragment extends Fragment { public class NotedPicsListFragment extends Fragment {
......
...@@ -9,7 +9,7 @@ import androidx.appcompat.app.ActionBar; ...@@ -9,7 +9,7 @@ import androidx.appcompat.app.ActionBar;
import com.example.mynotepad.R; import com.example.mynotepad.R;
public class Utils { public class Utils {
public static String sTheme ="colored"; public static String sTheme = "colored";
/** /**
* Set the theme of the Activity, and restart it by creating a new Activity of the same type. * Set the theme of the Activity, and restart it by creating a new Activity of the same type.
...@@ -36,11 +36,6 @@ public class Utils { ...@@ -36,11 +36,6 @@ public class Utils {
supportActionBar.setBackgroundDrawable(new ColorDrawable(activity.getResources().getColor(R.color.colorPrimary))); supportActionBar.setBackgroundDrawable(new ColorDrawable(activity.getResources().getColor(R.color.colorPrimary)));
break; break;
} }
case "colored": {
activity.setTheme(R.style.AppThemeColored);
supportActionBar.setBackgroundDrawable(new ColorDrawable(activity.getResources().getColor(R.color.colorPrimary3)));
break;
}
} }
} }
...@@ -54,10 +49,6 @@ public class Utils { ...@@ -54,10 +49,6 @@ public class Utils {
activity.setTheme(R.style.AppThemeNoActionBArBright); activity.setTheme(R.style.AppThemeNoActionBArBright);
break; break;
} }
case "colored": {
activity.setTheme(R.style.AppThemeColored);
break;
}
} }
} }
} }
...@@ -24,8 +24,10 @@ import android.view.ViewGroup; ...@@ -24,8 +24,10 @@ import android.view.ViewGroup;
import android.widget.Chronometer; import android.widget.Chronometer;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Toast; import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R; import com.example.mynotepad.R;
import java.io.File; import java.io.File;
...@@ -45,6 +47,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener { ...@@ -45,6 +47,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
private String fileName = null; private String fileName = null;
private Chronometer chronometer; private Chronometer chronometer;
private int RECORD_AUDIO_REQUEST_CODE = 123; private int RECORD_AUDIO_REQUEST_CODE = 123;
private RelativeLayout layout;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
...@@ -60,6 +63,18 @@ public class RecordFragment extends Fragment implements View.OnClickListener { ...@@ -60,6 +63,18 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
getPermissionToRecordAudio(); getPermissionToRecordAudio();
} }
init(view); init(view);
setBg(Utils.sTheme);
}
private void setBg(String sTheme) {
switch (sTheme) {
case "dark":
layout.setBackgroundResource(R.drawable.main_bg_dark);
break;
case "bright":
layout.setBackgroundResource(R.drawable.main_bg_bright);
break;
}
} }
@RequiresApi(api = Build.VERSION_CODES.M) @RequiresApi(api = Build.VERSION_CODES.M)
...@@ -91,6 +106,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener { ...@@ -91,6 +106,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
listBtn = view.findViewById(R.id.recordList); listBtn = view.findViewById(R.id.recordList);
recordBtn = view.findViewById(R.id.recordBtn); recordBtn = view.findViewById(R.id.recordBtn);
chronometer = view.findViewById(R.id.chronometerTimer); chronometer = view.findViewById(R.id.chronometerTimer);
layout = view.findViewById(R.id.layout);
listBtn.setOnClickListener(this); listBtn.setOnClickListener(this);
recordBtn.setOnClickListener(this); recordBtn.setOnClickListener(this);
......
package com.example.mynotepad;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import com.example.mynotepad.MenuFeatures.Utils;
public class SharedPreferencesClass {
private SharedPreferences sharedPreferences;
private SharedPreferences.Editor editor;
public void changeTheTheme( Activity activity) {
sharedPreferences = activity.getPreferences(Context.MODE_PRIVATE);
editor = sharedPreferences.edit();
editor.putString(activity.getString(R.string.saved_high_score_key), Utils.sTheme).apply();
}
public void getThemeOnMainActivityCreate(Activity activity){
SharedPreferences sharedPref = activity.getPreferences(Context.MODE_PRIVATE);
Utils.sTheme = sharedPref.getString( activity.getString(R.string.saved_high_score_key) , "bright");
}
}
...@@ -3,7 +3,15 @@ ...@@ -3,7 +3,15 @@
<corners <corners
android:radius="27dp" android:radius="27dp"
/> />
<solid android:color="?colorSecondary"/> <gradient
android:startColor="?colorSecondary"
android:endColor="?colorOnSecondary"
android:type="linear"
android:angle="45"
/>
<size
android:width="120dp"
android:height="54dp" />
<size <size
android:width="190dp" android:width="190dp"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners <corners android:radius="27dp" />
android:radius="27dp"
/>
<solid android:color="?colorSecondary"/>
<gradient
android:startColor="?colorSecondary"
android:endColor="?colorOnSecondary"
android:type="linear"
android:angle="45"
/>
<size <size
android:width="120dp" android:width="120dp"
android:height="54dp" android:height="54dp" />
/>
</shape> </shape>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<corners <corners
android:radius="27dp" android:radius="27dp"
/> />
<solid android:color="?colorSecondary"/>
<size <size
android:width="54dp" android:width="54dp"
android:height="54dp" android:height="54dp"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<shape> <shape>
<solid android:color="?colorPrimaryDark" /> <solid android:color="?background"/>
<corners android:radius="0dp" /> <corners android:radius="0dp" />
</shape> </shape>
</item> </item>
......
...@@ -2,11 +2,8 @@ ...@@ -2,11 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<gradient
android:startColor="?colorSecondary" <solid android:color="?colorOnPrimary"/>
android:endColor="?colorSecondary"
android:type="radial"
android:gradientRadius="500dp"/>
<stroke <stroke
android:width="20dp" android:width="20dp"
android:color="#16A0B9FC"/> android:color="#16A0B9FC"/>
......
...@@ -49,9 +49,10 @@ ...@@ -49,9 +49,10 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="54dp"
android:background="@drawable/bg_button2" android:width="120dp"
android:height="54dp"
android:gravity="center" android:gravity="center"
android:onClick="allNoteClicked" android:onClick="allNoteClicked"
android:text="@string/all_notes" /> android:text="@string/all_notes" />
...@@ -75,9 +76,8 @@ ...@@ -75,9 +76,8 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="54dp"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:onClick="onCalendarClicked" android:onClick="onCalendarClicked"
android:text="@string/calendar" android:text="@string/calendar"
...@@ -105,9 +105,8 @@ ...@@ -105,9 +105,8 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="54dp"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:onClick="onVoiceMassagesClicked" android:onClick="onVoiceMassagesClicked"
android:text="@string/voice_massages" /> android:text="@string/voice_massages" />
...@@ -132,9 +131,8 @@ ...@@ -132,9 +131,8 @@
<TextView <TextView
android:id="@+id/button8" android:id="@+id/button8"
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="54dp"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:onClick="noNotedPicsClicked" android:onClick="noNotedPicsClicked"
android:text="@string/noted_pics" android:text="@string/noted_pics"
...@@ -163,9 +161,8 @@ ...@@ -163,9 +161,8 @@
<TextView <TextView
android:id="@+id/program" android:id="@+id/program"
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="54dp"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:onClick="onProgramsClicked" android:onClick="onProgramsClicked"
android:text="@string/programs" android:text="@string/programs"
...@@ -193,7 +190,7 @@ ...@@ -193,7 +190,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:background="?colorSecondaryVariant" android:background="?itemBackground"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
app:headerLayout="@layout/menu_header" app:headerLayout="@layout/menu_header"
app:menu="@menu/drawer_menu" /> app:menu="@menu/drawer_menu" />
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#CBE3F6"> android:background="?colorButtonNormal">
<ImageView <ImageView
android:id="@+id/imageView" android:id="@+id/imageView"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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="280dp"
android:layout_height="160dp"
android:background="?colorButtonNormal">
<Button
android:id="@+id/yes"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
android:background="@drawable/bg_button"
android:text="yes"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<Button
android:id="@+id/no"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:background="@drawable/bg_button"
android:text="no"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="TextView"
android:textColor="?colorSecondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="54dp"
android:text="@string/camera" android:text="@string/camera"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:textSize="20dp"/> android:textSize="20dp"/>
...@@ -48,9 +47,8 @@ ...@@ -48,9 +47,8 @@
android:id="@+id/galleryBtn"> android:id="@+id/galleryBtn">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="54dp"
android:background="@drawable/bg_button2"
android:gravity="center" android:gravity="center"
android:text="@string/gallery" android:text="@string/gallery"
android:textSize="20dp"/> android:textSize="20dp"/>
......
...@@ -52,5 +52,7 @@ ...@@ -52,5 +52,7 @@
android:src="@drawable/ic_baseline_keyboard_backspace_24" android:src="@drawable/ic_baseline_keyboard_backspace_24"
app:backgroundTint="?colorError" app:backgroundTint="?colorError"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent"
android:tint="?android:textColor"
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MenuFeatures.VoiceMassages.RecordFragment" tools:context=".MenuFeatures.VoiceMassages.RecordFragment"
android:background="?colorButtonNormal"> android:background="@drawable/main_bg_bright">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="60dp"
android:src="@drawable/pic_stones" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayoutRecorder" android:id="@+id/linearLayoutRecorder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/img" android:layout_alignParentTop="true"
android:layout_marginTop="127dp"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
...@@ -46,12 +39,12 @@ ...@@ -46,12 +39,12 @@
android:id="@+id/recordBtn" android:id="@+id/recordBtn"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_alignParentBottom="true" android:layout_below="@+id/linearLayoutRecorder"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp" android:layout_marginTop="95dp"
android:background="@drawable/start_stop_bg" android:background="@drawable/start_stop_bg"
android:src="@drawable/ic_record" android:src="@drawable/ic_record"
app:tint="@color/black"/> app:tint="@color/black" />
<ImageView <ImageView
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/player_bg" android:background="@drawable/bg_player"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="colorPrimary">#457FAE</color> <color name="colorPrimary">#B4A3D8</color>
<color name="colorPrimaryDark">#3A478C</color> <color name="colorPrimaryDark">#9685B8</color>
<color name="colorAccent">#2980b9</color> <color name="colorAccent">#9685B8</color>
<color name="colorButtonTxt">#FFFFFF</color> <color name="colorButtonTxt">#FFFFFF</color>
<color name="colorBtn">#2980b9</color> <color name="colorBtn">#8e44ad</color>
<color name="colorDrawer">#e3f2fb</color> <color name="colorBtnGradient">#E2A4FF</color>
<color name="colorHeader">#F57AA0B5</color> <color name="colorDrawer">#FCF3FF</color>
<color name="mediaHeader">#30336b</color> <color name="colorHeader">#B4A3D8</color>
<color name="floatingButton">#f5c7c5</color> <color name="mediaHeader">#8e44ad</color>
<color name="background">#607AA0B5</color> <color name="floatingButton">#E196D0</color>
<color name="background">#FCF3FF</color>
<color name="item_bg_color">#8676A5</color>
<color name="colorPrimary2">#242424</color> <color name="colorPrimary2">#242424</color>
<color name="colorPrimaryDark2">#4A4A4A</color> <color name="colorPrimaryDark2">#4A4A4A</color>
<color name="colorAccent2">#ffda79</color> <color name="colorAccent2">#ffda79</color>
<color name="colorButtonTxt2">#FFFFFF</color> <color name="colorButtonTxt2">#FFFFFF</color>
<color name="colorBtn2">#f2dbb2</color> <color name="colorBtn2">#f2dbb2</color>
<color name="colorDrawer2">#1b1b1b</color> <color name="colorDrawer2">#232323</color>
<color name="colorHeader2">#ffda79</color> <color name="colorHeader2">#ffda79</color>
<color name="mediaHeader2">#f0932b</color> <color name="mediaHeader2">#f0932b</color>
<color name="floatingButton2">#efefef</color> <color name="floatingButton2">#efefef</color>
<color name="background2">#2f2f2f</color> <color name="background2">#2f2f2f</color>
<color name="colorPrimary3">#ff9da2</color>
<color name="colorPrimaryDark3">#808e9b</color>
<color name="colorAccent3">#ffda79</color>
<color name="colorButtonTxt3">#ff6348</color>
<color name="colorBtn3">#808e9b</color>
<color name="colorDrawer3">#F6D2D0</color>
<color name="colorHeader3">#C39F9E</color>
<color name="mediaHeader3">#C39F9E</color>
<color name="floatingButton3">#ff9da2</color>
<color name="background3">#F3DEDE</color>
</resources> </resources>
\ No newline at end of file
...@@ -27,4 +27,5 @@ ...@@ -27,4 +27,5 @@
<string name="navigation_drawer_close">close</string> <string name="navigation_drawer_close">close</string>
<string name="back">back</string> <string name="back">back</string>
<string name="save">save</string> <string name="save">save</string>
<string name="saved_high_score_key" />
</resources> </resources>
\ No newline at end of file
...@@ -6,12 +6,16 @@ ...@@ -6,12 +6,16 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark2</item> <item name="colorPrimaryDark">@color/colorPrimaryDark2</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorSecondary">@color/colorBtn</item> <item name="colorSecondary">@color/colorBtn</item>
<item name="colorOnSecondary">@color/colorBtnGradient</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="android:textColorPrimary">@color/black</item> <item name="android:textColorPrimary">@color/black</item>
<item name="colorSecondaryVariant">@color/colorDrawer</item> <item name="colorSecondaryVariant">@color/colorDrawer</item>
<item name="colorSurface">@color/colorHeader</item> <item name="colorSurface">@color/colorHeader</item>
<item name="android:textColorTertiary">@color/mediaHeader</item> <item name="android:textColorTertiary">@color/colorBtn</item>
<item name="colorError">@color/floatingButton</item>
<item name="colorButtonNormal">@color/colorDrawer</item>
<item name="colorOnPrimary">@color/item_bg_color</item>
<item name="colorBackgroundFloating">@color/colorPrimaryDark</item>
</style> </style>
<!-- bright application theme. --> <!-- bright application theme. -->
...@@ -23,13 +27,17 @@ ...@@ -23,13 +27,17 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorSecondary">@color/colorBtn</item> <item name="colorSecondary">@color/colorBtn</item>
<item name="colorOnSecondary">@color/colorBtnGradient</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="android:textColorPrimary">@color/black</item> <item name="android:textColorPrimary">@color/black</item>
<item name="colorSecondaryVariant">@color/colorDrawer</item> <item name="itemBackground">@color/colorDrawer</item>
<item name="colorSurface">@color/colorHeader</item> <item name="colorSurface">@color/colorHeader</item>
<item name="android:textColorTertiary">@color/mediaHeader</item> <item name="android:textColorTertiary">@color/colorBtn</item>
<item name="colorError">@color/floatingButton</item> <item name="colorError">@color/floatingButton</item>
<item name="colorButtonNormal">@color/background</item> <item name="colorButtonNormal">@color/background</item>
<item name="colorOnPrimary">@color/item_bg_color</item>
<item name="colorBackgroundFloating">@color/colorPrimaryDark</item>
</style> </style>
<!-- dark application theme. --> <!-- dark application theme. -->
...@@ -39,28 +47,18 @@ ...@@ -39,28 +47,18 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark2</item> <item name="colorPrimaryDark">@color/colorPrimaryDark2</item>
<item name="colorAccent">@color/colorAccent2</item> <item name="colorAccent">@color/colorAccent2</item>
<item name="colorSecondary">@color/colorBtn2</item> <item name="colorSecondary">@color/colorBtn2</item>
<item name="colorOnSecondary">@color/colorBtn2</item>
<item name="android:textColor">@color/black</item> <item name="android:textColor">@color/black</item>
<item name="android:textColorPrimary">@color/white</item> <item name="android:textColorPrimary">@color/white</item>
<item name="colorSecondaryVariant">@color/colorDrawer2</item> <item name="itemBackground">@color/colorDrawer2</item>
<item name="colorSurface">@color/colorHeader2</item> <item name="colorSurface">@color/colorHeader2</item>
<item name="android:textColorTertiary">@color/mediaHeader2</item> <item name="android:textColorTertiary">@color/mediaHeader2</item>
<item name="colorError">@color/floatingButton2</item> <item name="colorError">@color/floatingButton2</item>
<item name="colorButtonNormal">@color/background2</item> <item name="colorButtonNormal">@color/background2</item>
<item name="colorOnPrimary">@color/colorBtn2</item>
<item name="colorBackgroundFloating">@color/background</item>
</style> </style>
<style name="AppThemeColored">
<item name="colorPrimary">@color/colorPrimary3</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark3</item>
<item name="colorAccent">@color/colorAccent3</item>
<item name="colorSecondary">@color/colorBtn3</item>
<item name="android:textColor">@color/white</item>
<item name="android:textColorPrimary">@color/black</item>
<item name="colorSecondaryVariant">@color/colorDrawer3</item>
<item name="colorSurface">@color/colorHeader3</item>
<item name="android:textColorTertiary">@color/mediaHeader3</item>
<item name="colorError">@color/floatingButton3</item>
<item name="colorButtonNormal">@color/background3</item>
</style>
</resources> </resources>
......
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