Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
My notepad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731301
My notepad
Commits
c8a3009f
Commit
c8a3009f
authored
Nov 07, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add custom dialog and add SharedPreferencesClass to change the theme
parent
606a8931
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
295 additions
and
215 deletions
+295
-215
AddTextToPicDialog.java
...otepad/Dialogs/AddTxtToPicsDialog/AddTextToPicDialog.java
+1
-1
OnSavePicListenerClick.java
...ad/Dialogs/AddTxtToPicsDialog/OnSavePicListenerClick.java
+1
-1
CustomDialog.java
...main/java/com/example/mynotepad/Dialogs/CustomDialog.java
+49
-0
onCustomDialogClickListener.java
...xample/mynotepad/Dialogs/onCustomDialogClickListener.java
+6
-0
MainActivity.java
app/src/main/java/com/example/mynotepad/MainActivity.java
+12
-20
ArchivedNoesListFragment.java
...nuFeatures/AllArchivedNotes/ArchivedNoesListFragment.java
+1
-4
AllNotesListFragment.java
...mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
+27
-36
NoteFragment.java
...le/mynotepad/MenuFeatures/AllNotes/Note/NoteFragment.java
+21
-26
CalenderNotesListFragment.java
...epad/MenuFeatures/Calender/CalenderNotesListFragment.java
+6
-6
ChoosingPicsFragment.java
...ple/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
+5
-8
NotedPicsListFragment.java
...le/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
+0
-11
Utils.java
...c/main/java/com/example/mynotepad/MenuFeatures/Utils.java
+1
-10
RecordFragment.java
.../mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
+16
-0
SharedPreferencesClass.java
...in/java/com/example/mynotepad/SharedPreferencesClass.java
+25
-0
main_bg_bright.png
app/src/main/res/drawable-v24/main_bg_bright.png
+0
-0
pic_stones.jpg
app/src/main/res/drawable-v24/pic_stones.jpg
+0
-0
bg_button.xml
app/src/main/res/drawable/bg_button.xml
+9
-1
bg_button2.xml
app/src/main/res/drawable/bg_button2.xml
+8
-6
bg_icon.xml
app/src/main/res/drawable/bg_icon.xml
+1
-1
bg_player.xml
app/src/main/res/drawable/bg_player.xml
+1
-1
bg_row.xml
app/src/main/res/drawable/bg_row.xml
+2
-5
main_bg_bright.jpg
app/src/main/res/drawable/main_bg_bright.jpg
+0
-0
main_bg_colored.jpg
app/src/main/res/drawable/main_bg_colored.jpg
+0
-0
activity_main.xml
app/src/main/res/layout/activity_main.xml
+13
-16
dialog_add_text_to_pic.xml
app/src/main/res/layout/dialog_add_text_to_pic.xml
+1
-2
dialog_custom.xml
app/src/main/res/layout/dialog_custom.xml
+45
-0
fragment_choosing_pics.xml
app/src/main/res/layout/fragment_choosing_pics.xml
+4
-6
fragment_note.xml
app/src/main/res/layout/fragment_note.xml
+3
-1
fragment_record.xml
app/src/main/res/layout/fragment_record.xml
+7
-14
player_sheet.xml
app/src/main/res/layout/player_sheet.xml
+1
-1
colors.xml
app/src/main/res/values/colors.xml
+12
-20
strings.xml
app/src/main/res/values/strings.xml
+1
-0
styles.xml
app/src/main/res/values/styles.xml
+16
-18
No files found.
app/src/main/java/com/example/mynotepad/
MenuFeatures/Pics/AddTextToPic
Dialog/AddTextToPicDialog.java
→
app/src/main/java/com/example/mynotepad/
Dialogs/AddTxtToPics
Dialog/AddTextToPicDialog.java
View file @
c8a3009f
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
AddTextToPic
Dialog
;
package
com
.
example
.
mynotepad
.
Dialogs
.
AddTxtToPics
Dialog
;
import
android.app.Activity
;
import
android.app.Dialog
;
...
...
app/src/main/java/com/example/mynotepad/
MenuFeatures/Pics/AddTextToPic
Dialog/OnSavePicListenerClick.java
→
app/src/main/java/com/example/mynotepad/
Dialogs/AddTxtToPics
Dialog/OnSavePicListenerClick.java
View file @
c8a3009f
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
AddTextToPic
Dialog
;
package
com
.
example
.
mynotepad
.
Dialogs
.
AddTxtToPics
Dialog
;
import
android.widget.ImageView
;
...
...
app/src/main/java/com/example/mynotepad/Dialogs/CustomDialog.java
0 → 100644
View file @
c8a3009f
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
;
}
}
app/src/main/java/com/example/mynotepad/Dialogs/onCustomDialogClickListener.java
0 → 100644
View file @
c8a3009f
package
com
.
example
.
mynotepad
.
Dialogs
;
public
interface
onCustomDialogClickListener
{
void
yesClicked
();
void
noClicked
();
}
app/src/main/java/com/example/mynotepad/MainActivity.java
View file @
c8a3009f
...
...
@@ -30,12 +30,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private
DrawerLayout
drawerLayout
;
private
ImageView
theme
;
private
NavigationView
navigationView
;
private
S
tring
themeState
=
"colored"
;
private
S
haredPreferencesClass
sharedPreferencesClass
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
//todo check prefreces and set primitive theme and it is enough to set sTheme
super
.
onCreate
(
savedInstanceState
);
sharedPreferencesClass
=
new
SharedPreferencesClass
();
sharedPreferencesClass
.
getThemeOnMainActivityCreate
(
this
);
Utils
.
onActivityCreateThemeForMainActivity
(
this
);
setContentView
(
R
.
layout
.
activity_main
);
...
...
@@ -52,13 +54,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
case
"bright"
:
drawerLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_bright
);
break
;
case
"colored"
:
drawerLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_colored
);
break
;
}
}
private
void
init
()
{
noteDataBase
=
Room
.
databaseBuilder
(
this
,
NoteDataBase
.
class
,
"RoomDb"
).
fallbackToDestructiveMigration
().
allowMainThreadQueries
().
build
();
...
...
@@ -79,18 +77,20 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
View
header
=
navigationView
.
getHeaderView
(
0
);
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
()
{
theme
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
themeStat
e
.
equals
(
"bright"
))
{
if
(
Utils
.
sThem
e
.
equals
(
"bright"
))
{
changeThemeToDark
();
}
else
if
(
themeState
.
equals
(
"dark"
))
{
changeThemeToColored
();
}
else
if
(
themeState
.
equals
(
"colored"
))
{
}
else
if
(
Utils
.
sTheme
.
equals
(
"dark"
))
{
changeThemeToBright
();
}
}
...
...
@@ -142,24 +142,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private
void
changeThemeToDark
()
{
animations
(
theme
);
theme
.
setImageResource
(
R
.
drawable
.
ic_colored
);
Utils
.
changeToTheme
(
this
,
"dark"
);
themeState
=
"dark"
;
sharedPreferencesClass
.
changeTheTheme
(
this
)
;
}
private
void
changeThemeToBright
()
{
animations
(
theme
);
theme
.
setImageResource
(
R
.
drawable
.
ic_night_mode
);
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
)
{
ObjectAnimator
alpha
=
ObjectAnimator
.
ofFloat
(
imageView
,
"alpha"
,
0
f
,
1
f
);
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllArchivedNotes/ArchivedNoesListFragment.java
View file @
c8a3009f
...
...
@@ -72,9 +72,6 @@ public class ArchivedNoesListFragment extends Fragment {
case
"bright"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_bright
);
break
;
case
"colored"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_colored
);
break
;
}
}
...
...
@@ -162,7 +159,7 @@ public class ArchivedNoesListFragment extends Fragment {
closeClicked
(
customToolbarOption
);
}
});
}
}
private
void
updateToUnarchiveInDataBase
()
{
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
View file @
c8a3009f
...
...
@@ -3,6 +3,7 @@ package com.example.mynotepad.MenuFeatures.AllNotes;
import
android.app.AlertDialog
;
import
android.content.DialogInterface
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
...
...
@@ -10,12 +11,17 @@ 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.LinearLayout
;
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.MyNoteRecyclerView.MyAllNotesAdaptor
;
import
com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote
;
...
...
@@ -25,8 +31,10 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import
com.example.mynotepad.MenuFeatures.Utils
;
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
;
...
...
@@ -42,6 +50,7 @@ public class AllNotesListFragment extends Fragment {
public
static
MyNote
myChosenNote
;
private
NavController
navController
;
private
LinearLayout
allNotesListLayout
;
private
CustomDialog
customDialog
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
...
...
@@ -67,14 +76,10 @@ public class AllNotesListFragment extends Fragment {
case
"bright"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_bright
);
break
;
case
"colored"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_colored
);
break
;
}
}
private
void
init
(
View
view
)
{
// get data from database
setAllNoteListAndTitles
();
...
...
@@ -86,6 +91,7 @@ public class AllNotesListFragment extends Fragment {
addNoteButton
=
view
.
findViewById
(
R
.
id
.
addButton
);
navController
=
Navigation
.
findNavController
(
view
);
allNotesListLayout
=
view
.
findViewById
(
R
.
id
.
allNoteListLayout
);
customDialog
=
new
CustomDialog
();
// show list with recycler view
recyclerView
=
view
.
findViewById
(
R
.
id
.
recyclerView
);
...
...
@@ -104,7 +110,6 @@ public class AllNotesListFragment extends Fragment {
showAddAlert
();
}
});
// add listener to recyclerView
myAdaptor
.
setOnItemClickListener
(
new
OnAllNotesItemClickListener
()
{
@Override
...
...
@@ -114,10 +119,10 @@ public class AllNotesListFragment extends Fragment {
final
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"title"
,
myNote
.
getTitle
());
bundle
.
putString
(
"bodyTxt"
,
myNote
.
getDescription
());
bundle
.
putString
(
"type"
,
"note"
);
bundle
.
putString
(
"type"
,
"note"
);
//change the fragment
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
,
bundle
);
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
,
bundle
);
}
@Override
...
...
@@ -125,10 +130,9 @@ public class AllNotesListFragment extends Fragment {
customToolbarOption
.
setVisibility
(
View
.
VISIBLE
);
allNoteToolBar
.
setVisibility
(
View
.
GONE
);
myChosenNote
=
myNote
;
if
(
myChosenNote
.
isArchived
()){
if
(
myChosenNote
.
isArchived
())
{
customToolbarOption
.
setYellowStar
();
}
else
{
}
else
{
customToolbarOption
.
setBlackStar
();
}
}
...
...
@@ -155,31 +159,25 @@ public class AllNotesListFragment extends Fragment {
}
protected
void
closeClicked
(
CustomToolbarOption
customToolbarOption
)
{
customToolbarOption
.
setVisibility
(
View
.
GONE
);
allNoteToolBar
.
setVisibility
(
View
.
VISIBLE
);
}
protected
void
deleteClicked
(
final
Note
note
)
{
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
getContext
());
alert
.
setMessage
(
"are you sure you wanna delete it ??? "
);
alert
.
setPositiveButton
(
"yes"
,
new
DialogInterface
.
OnClickListener
()
{
customDialog
.
showAddTxtDialog
(
getActivity
(),
"are you sure you wanna delete it ??? "
);
customDialog
.
setOnCustomDialogClickListener
(
new
onCustomDialogClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
public
void
yesClicked
(
)
{
noteDataBase
.
noteDao
().
deleteNote
(
note
);
myNotes
.
remove
(
myChosenNote
);
myAdaptor
.
notifyDataSetChanged
();
}
});
alert
.
setNegativeButton
(
"no"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
dialogInterface
.
cancel
();
public
void
noClicked
()
{
}
});
alert
.
show
();
allNoteToolBar
.
setVisibility
(
View
.
VISIBLE
);
customToolbarOption
.
setVisibility
(
View
.
GONE
);
allNoteToolBar
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -206,38 +204,31 @@ public class AllNotesListFragment extends Fragment {
private
void
showAddAlert
()
{
final
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
getContext
());
alert
.
setTitle
(
"new note :"
);
alert
.
setMessage
(
"Do you want to create a new note ?"
);
alert
.
setCancelable
(
true
);
alert
.
setPositiveButton
(
"yes"
,
new
DialogInterface
.
OnClickListener
()
{
customDialog
.
showAddTxtDialog
(
getActivity
(),
"Do you want to create a new note ?"
);
customDialog
.
setOnCustomDialogClickListener
(
new
onCustomDialogClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
public
void
yesClicked
(
)
{
showABlankNote
();
}
});
alert
.
setNegativeButton
(
"no"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
dialogInterface
.
cancel
();
public
void
noClicked
()
{
}
});
alert
.
show
();
}
private
void
showABlankNote
()
{
//set noteFragment data
final
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"title"
,
""
);
bundle
.
putString
(
"bodyTxt"
,
""
);
bundle
.
putString
(
"type"
,
"note"
);
bundle
.
putString
(
"bodyTxt"
,
""
);
bundle
.
putString
(
"type"
,
"note"
);
//change the fragment
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
,
bundle
);
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
,
bundle
);
}
private
void
setAllNoteListAndTitles
()
{
entityNotes
=
noteDataBase
.
noteDao
().
getAll
();
myNotes
=
new
ArrayList
<>();
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/Note/NoteFragment.java
View file @
c8a3009f
...
...
@@ -14,6 +14,8 @@ import android.view.ViewGroup;
import
android.widget.EditText
;
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.AllNotes.AllNotesListFragment
;
import
com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity
;
...
...
@@ -62,7 +64,7 @@ public class NoteFragment extends Fragment {
back
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
if
(
titleTxt
.
getText
().
length
()
!=
0
&&
bodyTxt
.
getText
().
length
()!=
0
)
if
(
titleTxt
.
getText
().
length
()
!=
0
&&
bodyTxt
.
getText
().
length
()
!=
0
)
showAlert
();
}
});
...
...
@@ -70,13 +72,11 @@ public class NoteFragment extends Fragment {
private
void
showAlert
()
{
final
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
getContext
());
alert
.
setTitle
(
"new note :"
);
alert
.
setMessage
(
"Do you want to save the note ?"
);
alert
.
setCancelable
(
true
);
alert
.
setPositiveButton
(
"yes"
,
new
DialogInterface
.
OnClickListener
()
{
CustomDialog
customDialog
=
new
CustomDialog
();
customDialog
.
showAddTxtDialog
(
getActivity
(),
"Do you want to save the note ?"
);
customDialog
.
setOnCustomDialogClickListener
(
new
onCustomDialogClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
public
void
yesClicked
(
)
{
if
(
type
.
equals
(
"note"
))
saveNote
();
else
if
(
type
.
equals
(
"date"
))
...
...
@@ -85,26 +85,22 @@ public class NoteFragment extends Fragment {
System
.
out
.
println
(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++"
);
if
(
noteDateType
.
equals
(
"note"
))
{
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
());
}
}
if
(
getActivity
()
!=
null
)
getActivity
().
onBackPressed
();
}
});
alert
.
setNegativeButton
(
"no"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
dialogInterface
.
cancel
();
public
void
noClicked
()
{
getActivity
().
onBackPressed
();
}
});
alert
.
show
();
}
private
void
saveNote
()
{
if
(
isAnewNote
)
{
note
=
new
Note
(
titleTxt
.
getText
().
toString
(),
bodyTxt
.
getText
().
toString
(),
false
);
...
...
@@ -133,11 +129,10 @@ public class NoteFragment extends Fragment {
Bundle
bundle
=
getArguments
();
if
(
bundle
!=
null
)
if
(
bundle
.
getString
(
"title"
).
equals
(
""
)
&&
bundle
.
getString
(
"bodyTxt"
).
equals
(
""
))
{
if
(
bundle
.
getString
(
"title"
).
equals
(
""
)
&&
bundle
.
getString
(
"bodyTxt"
).
equals
(
""
))
{
isAnewNote
=
true
;
type
=
bundle
.
getString
(
"type"
);
}
else
{
}
else
{
isAnewNote
=
false
;
titleTxt
.
setText
(
bundle
.
getString
(
"title"
));
bodyTxt
.
setText
(
bundle
.
getString
(
"bodyTxt"
));
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Calender/CalenderNotesListFragment.java
View file @
c8a3009f
...
...
@@ -12,12 +12,14 @@ 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.LinearLayout
;
import
android.widget.Toast
;
import
com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity
;
import
com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor
;
import
com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.OnCalenderItemClickListener
;
...
...
@@ -27,6 +29,7 @@ import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import
com.example.mynotepad.MenuFeatures.Utils
;
import
com.example.mynotepad.R
;
import
com.google.android.material.floatingactionbutton.FloatingActionButton
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -79,9 +82,6 @@ public class CalenderNotesListFragment extends Fragment {
case
"bright"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_bright
);
break
;
case
"colored"
:
allNotesListLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_colored
);
break
;
}
}
...
...
@@ -112,7 +112,7 @@ public class CalenderNotesListFragment extends Fragment {
addDateBtn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
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 {
final
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"title"
,
myChosenDateNote
.
getDate
());
bundle
.
putString
(
"bodyTxt"
,
myChosenDateNote
.
getDescription
());
bundle
.
putString
(
"type"
,
"date"
);
bundle
.
putString
(
"type"
,
"date"
);
//change the fragment
navController
.
navigate
(
R
.
id
.
action_calenderNotesListFragment_to_noteFragment2
,
bundle
);
navController
.
navigate
(
R
.
id
.
action_calenderNotesListFragment_to_noteFragment2
,
bundle
);
}
@Override
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
View file @
c8a3009f
...
...
@@ -14,11 +14,10 @@ import android.provider.MediaStore;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
com.example.mynotepad.
MenuFeatures.Pics.AddTextToPic
Dialog.AddTextToPicDialog
;
import
com.example.mynotepad.
MenuFeatures.Pics.AddTextToPic
Dialog.OnSavePicListenerClick
;
import
com.example.mynotepad.
Dialogs.AddTxtToPics
Dialog.AddTextToPicDialog
;
import
com.example.mynotepad.
Dialogs.AddTxtToPics
Dialog.OnSavePicListenerClick
;
import
com.example.mynotepad.MenuFeatures.Pics.Camera.CameraActivity
;
import
com.example.mynotepad.MenuFeatures.Utils
;
import
com.example.mynotepad.R
;
...
...
@@ -31,7 +30,7 @@ public class ChoosingPicsFragment extends Fragment {
private
LinearLayout
camera
,
gallery
;
private
String
newFilePath
;
private
ConstraintLayout
constraintLayout
;
private
ConstraintLayout
constraintLayout
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
...
...
@@ -57,11 +56,9 @@ public class ChoosingPicsFragment extends Fragment {
case
"bright"
:
constraintLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_bright
);
break
;
case
"colored"
:
constraintLayout
.
setBackgroundResource
(
R
.
drawable
.
main_bg_colored
);
break
;
}
}
private
void
init
(
View
view
)
{
camera
=
view
.
findViewById
(
R
.
id
.
cameraBtn
);
gallery
=
view
.
findViewById
(
R
.
id
.
galleryBtn
);
...
...
@@ -115,7 +112,7 @@ public class ChoosingPicsFragment extends Fragment {
private
void
showDialogOnResult
(
final
Bitmap
bitmap
)
{
//show dialog to save pic with note
AddTextToPicDialog
addTextToPicDialog
=
new
AddTextToPicDialog
();
addTextToPicDialog
.
showAddTxtDialog
(
getActivity
()
,
bitmap
);
addTextToPicDialog
.
showAddTxtDialog
(
getActivity
(),
bitmap
);
addTextToPicDialog
.
setOnSavePicListenerClick
(
new
OnSavePicListenerClick
()
{
@Override
public
void
saveClicked
(
String
editTextTxt
)
{
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
View file @
c8a3009f
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
androidx.annotation.NonNull
;
...
...
@@ -13,16 +9,9 @@ import androidx.fragment.app.Fragment;
import
android.view.LayoutInflater
;
import
android.view.View
;
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
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.InputStream
;
public
class
NotedPicsListFragment
extends
Fragment
{
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Utils.java
View file @
c8a3009f
...
...
@@ -9,7 +9,7 @@ import androidx.appcompat.app.ActionBar;
import
com.example.mynotepad.R
;
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.
...
...
@@ -36,11 +36,6 @@ public class Utils {
supportActionBar
.
setBackgroundDrawable
(
new
ColorDrawable
(
activity
.
getResources
().
getColor
(
R
.
color
.
colorPrimary
)));
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 {
activity
.
setTheme
(
R
.
style
.
AppThemeNoActionBArBright
);
break
;
}
case
"colored"
:
{
activity
.
setTheme
(
R
.
style
.
AppThemeColored
);
break
;
}
}
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
View file @
c8a3009f
...
...
@@ -24,8 +24,10 @@ import android.view.ViewGroup;
import
android.widget.Chronometer
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.RelativeLayout
;
import
android.widget.Toast
;
import
com.example.mynotepad.MenuFeatures.Utils
;
import
com.example.mynotepad.R
;
import
java.io.File
;
...
...
@@ -45,6 +47,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
private
String
fileName
=
null
;
private
Chronometer
chronometer
;
private
int
RECORD_AUDIO_REQUEST_CODE
=
123
;
private
RelativeLayout
layout
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
...
...
@@ -60,6 +63,18 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
getPermissionToRecordAudio
();
}
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
)
...
...
@@ -91,6 +106,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
listBtn
=
view
.
findViewById
(
R
.
id
.
recordList
);
recordBtn
=
view
.
findViewById
(
R
.
id
.
recordBtn
);
chronometer
=
view
.
findViewById
(
R
.
id
.
chronometerTimer
);
layout
=
view
.
findViewById
(
R
.
id
.
layout
);
listBtn
.
setOnClickListener
(
this
);
recordBtn
.
setOnClickListener
(
this
);
...
...
app/src/main/java/com/example/mynotepad/SharedPreferencesClass.java
0 → 100644
View file @
c8a3009f
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"
);
}
}
app/src/main/res/drawable-v24/main_bg_bright.png
0 → 100644
View file @
c8a3009f
146 KB
app/src/main/res/drawable-v24/pic_stones.jpg
deleted
100644 → 0
View file @
606a8931
7.93 KB
app/src/main/res/drawable/bg_button.xml
View file @
c8a3009f
...
...
@@ -3,7 +3,15 @@
<corners
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
android:width=
"190dp"
...
...
app/src/main/res/drawable/bg_button2.xml
View file @
c8a3009f
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"27dp"
/>
<solid
android:color=
"?colorSecondary"
/>
<corners
android:radius=
"27dp"
/>
<gradient
android:startColor=
"?colorSecondary"
android:endColor=
"?colorOnSecondary"
android:type=
"linear"
android:angle=
"45"
/>
<size
android:width=
"120dp"
android:height=
"54dp"
/>
android:height=
"54dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_icon.xml
View file @
c8a3009f
...
...
@@ -3,7 +3,7 @@
<corners
android:radius=
"27dp"
/>
<solid
android:color=
"?colorSecondary"
/>
<size
android:width=
"54dp"
android:height=
"54dp"
...
...
app/src/main/res/drawable/
player_bg
.xml
→
app/src/main/res/drawable/
bg_player
.xml
View file @
c8a3009f
...
...
@@ -2,7 +2,7 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape>
<solid
android:color=
"?
colorPrimaryDark"
/>
<solid
android:color=
"?
background"
/>
<corners
android:radius=
"0dp"
/>
</shape>
</item>
...
...
app/src/main/res/drawable/bg_row.xml
View file @
c8a3009f
...
...
@@ -2,11 +2,8 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:startColor=
"?colorSecondary"
android:endColor=
"?colorSecondary"
android:type=
"radial"
android:gradientRadius=
"500dp"
/>
<solid
android:color=
"?colorOnPrimary"
/>
<stroke
android:width=
"20dp"
android:color=
"#16A0B9FC"
/>
...
...
app/src/main/res/drawable/main_bg_bright.jpg
deleted
100644 → 0
View file @
606a8931
50.6 KB
app/src/main/res/drawable/main_bg_colored.jpg
deleted
100644 → 0
View file @
606a8931
59.7 KB
app/src/main/res/layout/activity_main.xml
View file @
c8a3009f
...
...
@@ -49,9 +49,10 @@
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:width=
"120dp"
android:height=
"54dp"
android:gravity=
"center"
android:onClick=
"allNoteClicked"
android:text=
"@string/all_notes"
/>
...
...
@@ -75,9 +76,8 @@
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:gravity=
"center"
android:onClick=
"onCalendarClicked"
android:text=
"@string/calendar"
...
...
@@ -105,9 +105,8 @@
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:gravity=
"center"
android:onClick=
"onVoiceMassagesClicked"
android:text=
"@string/voice_massages"
/>
...
...
@@ -132,9 +131,8 @@
<TextView
android:id=
"@+id/button8"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:gravity=
"center"
android:onClick=
"noNotedPicsClicked"
android:text=
"@string/noted_pics"
...
...
@@ -163,9 +161,8 @@
<TextView
android:id=
"@+id/program"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:gravity=
"center"
android:onClick=
"onProgramsClicked"
android:text=
"@string/programs"
...
...
@@ -193,7 +190,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_gravity=
"start"
android:background=
"?
colorSecondaryVariant
"
android:background=
"?
itemBackground
"
android:fitsSystemWindows=
"true"
app:headerLayout=
"@layout/menu_header"
app:menu=
"@menu/drawer_menu"
/>
...
...
app/src/main/res/layout/dialog_add_text_to_pic.xml
View file @
c8a3009f
...
...
@@ -2,10 +2,9 @@
<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=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"
#CBE3F6
"
>
android:background=
"
?colorButtonNormal
"
>
<ImageView
android:id=
"@+id/imageView"
...
...
app/src/main/res/layout/dialog_custom.xml
0 → 100644
View file @
c8a3009f
<?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
app/src/main/res/layout/fragment_choosing_pics.xml
View file @
c8a3009f
...
...
@@ -25,10 +25,9 @@
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"
match_parent
"
android:layout_height=
"
match_parent
"
android:layout_width=
"
120dp
"
android:layout_height=
"
54dp
"
android:text=
"@string/camera"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:textSize=
"20dp"
/>
...
...
@@ -48,9 +47,8 @@
android:id=
"@+id/galleryBtn"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button2"
android:layout_width=
"120dp"
android:layout_height=
"54dp"
android:gravity=
"center"
android:text=
"@string/gallery"
android:textSize=
"20dp"
/>
...
...
app/src/main/res/layout/fragment_note.xml
View file @
c8a3009f
...
...
@@ -52,5 +52,7 @@
android:src=
"@drawable/ic_baseline_keyboard_backspace_24"
app:backgroundTint=
"?colorError"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintEnd_toEndOf=
"parent"
android:tint=
"?android:textColor"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_record.xml
View file @
c8a3009f
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/layout"
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.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
android:id=
"@+id/linearLayoutRecorder"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/img"
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"127dp"
android:orientation=
"vertical"
>
<ImageView
...
...
@@ -46,12 +39,12 @@
android:id=
"@+id/recordBtn"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_
alignParentBottom=
"true
"
android:layout_
below=
"@+id/linearLayoutRecorder
"
android:layout_centerHorizontal=
"true"
android:layout_margin
Bottom=
"50
dp"
android:layout_margin
Top=
"95
dp"
android:background=
"@drawable/start_stop_bg"
android:src=
"@drawable/ic_record"
app:tint=
"@color/black"
/>
app:tint=
"@color/black"
/>
<ImageView
...
...
app/src/main/res/layout/player_sheet.xml
View file @
c8a3009f
...
...
@@ -66,7 +66,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/
player_bg
"
android:background=
"@drawable/
bg_player
"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
...
...
app/src/main/res/values/colors.xml
View file @
c8a3009f
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"colorPrimary"
>
#
457FAE
</color>
<color
name=
"colorPrimaryDark"
>
#
3A478C
</color>
<color
name=
"colorAccent"
>
#
2980b9
</color>
<color
name=
"colorPrimary"
>
#
B4A3D8
</color>
<color
name=
"colorPrimaryDark"
>
#
9685B8
</color>
<color
name=
"colorAccent"
>
#
9685B8
</color>
<color
name=
"colorButtonTxt"
>
#FFFFFF
</color>
<color
name=
"colorBtn"
>
#2980b9
</color>
<color
name=
"colorDrawer"
>
#e3f2fb
</color>
<color
name=
"colorHeader"
>
#F57AA0B5
</color>
<color
name=
"mediaHeader"
>
#30336b
</color>
<color
name=
"floatingButton"
>
#f5c7c5
</color>
<color
name=
"background"
>
#607AA0B5
</color>
<color
name=
"colorBtn"
>
#8e44ad
</color>
<color
name=
"colorBtnGradient"
>
#E2A4FF
</color>
<color
name=
"colorDrawer"
>
#FCF3FF
</color>
<color
name=
"colorHeader"
>
#B4A3D8
</color>
<color
name=
"mediaHeader"
>
#8e44ad
</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=
"colorPrimaryDark2"
>
#4A4A4A
</color>
<color
name=
"colorAccent2"
>
#ffda79
</color>
<color
name=
"colorButtonTxt2"
>
#FFFFFF
</color>
<color
name=
"colorBtn2"
>
#f2dbb2
</color>
<color
name=
"colorDrawer2"
>
#
1b1b1b
</color>
<color
name=
"colorDrawer2"
>
#
232323
</color>
<color
name=
"colorHeader2"
>
#ffda79
</color>
<color
name=
"mediaHeader2"
>
#f0932b
</color>
<color
name=
"floatingButton2"
>
#efefef
</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>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
c8a3009f
...
...
@@ -27,4 +27,5 @@
<string
name=
"navigation_drawer_close"
>
close
</string>
<string
name=
"back"
>
back
</string>
<string
name=
"save"
>
save
</string>
<string
name=
"saved_high_score_key"
/>
</resources>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
c8a3009f
...
...
@@ -6,12 +6,16 @@
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark2
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorSecondary"
>
@color/colorBtn
</item>
<item
name=
"colorOnSecondary"
>
@color/colorBtnGradient
</item>
<item
name=
"android:textColor"
>
@color/white
</item>
<item
name=
"android:textColorPrimary"
>
@color/black
</item>
<item
name=
"colorSecondaryVariant"
>
@color/colorDrawer
</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>
<!-- bright application theme. -->
...
...
@@ -23,13 +27,17 @@
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorSecondary"
>
@color/colorBtn
</item>
<item
name=
"colorOnSecondary"
>
@color/colorBtnGradient
</item>
<item
name=
"android:textColor"
>
@color/white
</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=
"android:textColorTertiary"
>
@color/
mediaHeader
</item>
<item
name=
"android:textColorTertiary"
>
@color/
colorBtn
</item>
<item
name=
"colorError"
>
@color/floatingButton
</item>
<item
name=
"colorButtonNormal"
>
@color/background
</item>
<item
name=
"colorOnPrimary"
>
@color/item_bg_color
</item>
<item
name=
"colorBackgroundFloating"
>
@color/colorPrimaryDark
</item>
</style>
<!-- dark application theme. -->
...
...
@@ -39,28 +47,18 @@
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark2
</item>
<item
name=
"colorAccent"
>
@color/colorAccent2
</item>
<item
name=
"colorSecondary"
>
@color/colorBtn2
</item>
<item
name=
"colorOnSecondary"
>
@color/colorBtn2
</item>
<item
name=
"android:textColor"
>
@color/black
</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=
"android:textColorTertiary"
>
@color/mediaHeader2
</item>
<item
name=
"colorError"
>
@color/floatingButton2
</item>
<item
name=
"colorButtonNormal"
>
@color/background2
</item>
<item
name=
"colorOnPrimary"
>
@color/colorBtn2
</item>
<item
name=
"colorBackgroundFloating"
>
@color/background
</item>
</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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment