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
cc225522
Commit
cc225522
authored
Nov 02, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add button navigation for pics and change action bar and toolbars
parent
3180d840
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
253 additions
and
381 deletions
+253
-381
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-1
MainActivity.java
app/src/main/java/com/example/mynotepad/MainActivity.java
+31
-20
AllNotesActivity.java
...ple/mynotepad/MenuFeatures/AllNotes/AllNotesActivity.java
+1
-0
AllNotesListFragment.java
...mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
+3
-0
CalenderNotesListFragment.java
...epad/MenuFeatures/Calender/CalenderNotesListFragment.java
+2
-0
MyCalenderActivity.java
...e/mynotepad/MenuFeatures/Calender/MyCalenderActivity.java
+1
-0
CameraFragment.java
...m/example/mynotepad/MenuFeatures/Pics/CameraFragment.java
+0
-66
ChoosingPicsFragment.java
...ple/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
+31
-0
GalleryFragment.java
.../example/mynotepad/MenuFeatures/Pics/GalleryFragment.java
+0
-66
NotedPicsFragment.java
...xample/mynotepad/MenuFeatures/Pics/NotedPicsFragment.java
+0
-66
NotedPicsListFragment.java
...le/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
+30
-0
PicsActivity.java
...com/example/mynotepad/MenuFeatures/Pics/PicsActivity.java
+3
-2
VoiceMassagesActivity.java
...pad/MenuFeatures/VoiceMassages/VoiceMassagesActivity.java
+1
-0
bg_button.xml
app/src/main/res/drawable/bg_button.xml
+1
-1
bg_row.xml
app/src/main/res/drawable/bg_row.xml
+2
-2
activity_main.xml
app/src/main/res/layout/activity_main.xml
+102
-82
activity_pics.xml
app/src/main/res/layout/activity_pics.xml
+1
-1
custom_allnotes_item.xml
app/src/main/res/layout/custom_allnotes_item.xml
+3
-1
fragment_all_notes_list.xml
app/src/main/res/layout/fragment_all_notes_list.xml
+0
-15
fragment_audio_list.xml
app/src/main/res/layout/fragment_audio_list.xml
+0
-16
fragment_choosing_pics.xml
app/src/main/res/layout/fragment_choosing_pics.xml
+8
-0
fragment_gallery.xml
app/src/main/res/layout/fragment_gallery.xml
+0
-14
fragment_noted_pics.xml
app/src/main/res/layout/fragment_noted_pics.xml
+1
-1
bottom_nav_pic.xml
app/src/main/res/menu/bottom_nav_pic.xml
+6
-11
drawer_menu.xml
app/src/main/res/menu/drawer_menu.xml
+1
-1
bottom_nav_pic.xml
app/src/main/res/navigation/bottom_nav_pic.xml
+6
-11
strings.xml
app/src/main/res/values/strings.xml
+5
-2
styles.xml
app/src/main/res/values/styles.xml
+12
-2
No files found.
app/src/main/AndroidManifest.xml
View file @
cc225522
...
...
@@ -20,7 +20,8 @@
<activity
android:name=
".MenuFeatures.AllNotes.AllNotesActivity"
/>
<activity
android:name=
".MenuFeatures.AllArchivedNotes.ArchivedNotesActivity"
/>
<activity
android:name=
".MenuFeatures.Setting.SettingActivity"
/>
<activity
android:name=
".MainActivity"
>
<activity
android:name=
".MainActivity"
android:theme=
"@style/AppThemeNoActionBAr"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/com/example/mynotepad/MainActivity.java
View file @
cc225522
package
com
.
example
.
mynotepad
;
import
androidx.appcompat.app.ActionBarDrawerToggle
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.widget.Toolbar
;
import
androidx.drawerlayout.widget.DrawerLayout
;
import
androidx.navigation.ui.AppBarConfiguration
;
import
androidx.room.Room
;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.Gravity
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.widget.ImageView
;
import
com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNotesActivity
;
import
com.example.mynotepad.MenuFeatures.AllNotes.AllNotesActivity
;
import
com.example.mynotepad.MenuFeatures.AllNotes.DataBase.NoteDataBase
;
...
...
@@ -22,6 +28,7 @@ import com.google.android.material.navigation.NavigationView;
public
class
MainActivity
extends
AppCompatActivity
implements
NavigationView
.
OnNavigationItemSelectedListener
{
public
static
NoteDataBase
noteDataBase
;
private
DrawerLayout
drawerLayout
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -34,39 +41,41 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private
void
init
()
{
noteDataBase
=
Room
.
databaseBuilder
(
this
,
NoteDataBase
.
class
,
"RoomDb"
).
fallbackToDestructiveMigration
().
allowMainThreadQueries
().
build
();
final
DrawerLayout
drawerLayout
=
findViewById
(
R
.
id
.
drawerLayout
);
drawerLayout
=
findViewById
(
R
.
id
.
drawerLayout
);
Toolbar
toolbar
=
findViewById
(
R
.
id
.
toolbar_main
);
NavigationView
navigationView
=
findViewById
(
R
.
id
.
main_menu
);
//menu drawer in ui
navigationView
.
setNavigationItemSelectedListener
(
this
);
ImageView
toolbarListImg
=
findViewById
(
R
.
id
.
toolbarList
);
toolbarListImg
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@SuppressLint
(
"WrongConstant"
)
@Override
public
void
onClick
(
View
v
)
{
if
(!
drawerLayout
.
isDrawerOpen
(
Gravity
.
START
))
drawerLayout
.
openDrawer
(
Gravity
.
START
);
else
drawerLayout
.
closeDrawer
(
Gravity
.
END
);
}
});
setSupportActionBar
(
toolbar
);
getSupportActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
ActionBarDrawerToggle
toggle
=
new
ActionBarDrawerToggle
(
this
,
drawerLayout
,
toolbar
,
R
.
string
.
navigation_drawer_open
,
R
.
string
.
navigation_drawer_close
);
toggle
.
setDrawerIndicatorEnabled
(
true
);
toggle
.
syncState
();
drawerLayout
.
addDrawerListener
(
toggle
);
}
public
void
allNoteClicked
(
View
view
){
public
void
allNoteClicked
(
View
view
)
{
startActivity
(
new
Intent
(
getApplicationContext
(),
AllNotesActivity
.
class
));
}
public
void
onCalendarClicked
(
View
view
){
public
void
onCalendarClicked
(
View
view
)
{
startActivity
(
new
Intent
(
getApplicationContext
(),
MyCalenderActivity
.
class
));
}
public
void
onVoiceMassagesClicked
(
View
view
){
public
void
onVoiceMassagesClicked
(
View
view
)
{
startActivity
(
new
Intent
(
getApplicationContext
(),
VoiceMassagesActivity
.
class
));
}
public
void
noNotedPicsClicked
(
View
view
){
public
void
noNotedPicsClicked
(
View
view
)
{
startActivity
(
new
Intent
(
getApplicationContext
(),
PicsActivity
.
class
));
}
public
void
onProgramsClicked
(
View
view
){
public
void
onProgramsClicked
(
View
view
)
{
}
...
...
@@ -77,19 +86,21 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
int
id
=
item
.
getItemId
();
switch
(
id
)
{
case
R
.
id
.
favorites
:{
case
R
.
id
.
favorites
:
{
startActivity
(
new
Intent
(
getApplicationContext
(),
ArchivedNotesActivity
.
class
));
break
;
}
case
R
.
id
.
folders
:{
case
R
.
id
.
folders
:
{
break
;
}
case
R
.
id
.
setting
:
{
case
R
.
id
.
setting
s
:
{
startActivity
(
new
Intent
(
getApplicationContext
(),
SettingActivity
.
class
));
}
case
R
.
id
.
information
:{
case
R
.
id
.
information
:
{
}
}
return
true
;
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/AllNotesActivity.java
View file @
cc225522
...
...
@@ -12,5 +12,6 @@ public class AllNotesActivity extends AppCompatActivity {
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_all_notes
);
setTitle
(
"all notes"
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
View file @
cc225522
...
...
@@ -148,6 +148,7 @@ public class AllNotesListFragment extends Fragment {
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
noteDataBase
.
noteDao
().
deleteNote
(
note
);
myNotes
.
remove
(
myChosenNote
);
myAdaptor
.
notifyDataSetChanged
();
}
});
...
...
@@ -159,6 +160,8 @@ public class AllNotesListFragment extends Fragment {
});
alert
.
show
();
allNoteToolBar
.
setVisibility
(
View
.
VISIBLE
);
customToolbarOption
.
setVisibility
(
View
.
GONE
);
allNoteToolBar
.
setVisibility
(
View
.
VISIBLE
);
}
protected
void
starClicked
()
{
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Calender/CalenderNotesListFragment.java
View file @
cc225522
...
...
@@ -157,6 +157,7 @@ public class CalenderNotesListFragment extends Fragment {
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
noteDataBase
.
dateNoreDAO
().
deleteDateNote
(
entityDates
.
get
(
myDates
.
indexOf
(
myChosenDateNote
)));
myDates
.
remove
(
myChosenDateNote
);
myAdaptor
.
notifyDataSetChanged
();
}
});
...
...
@@ -168,6 +169,7 @@ public class CalenderNotesListFragment extends Fragment {
});
alert
.
show
();
calenderToolbar
.
setVisibility
(
View
.
VISIBLE
);
customToolbarOption
.
setVisibility
(
View
.
GONE
);
}
private
void
starClicked
()
{
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Calender/MyCalenderActivity.java
View file @
cc225522
...
...
@@ -15,5 +15,6 @@ public class MyCalenderActivity extends AppCompatActivity {
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_my_calender
);
setTitle
(
"calendar"
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/CameraFragment.java
deleted
100644 → 0
View file @
3180d840
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.os.Bundle
;
import
androidx.fragment.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.mynotepad.R
;
/**
* A simple {@link Fragment} subclass.
* Use the {@link CameraFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
CameraFragment
extends
Fragment
{
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private
static
final
String
ARG_PARAM1
=
"param1"
;
private
static
final
String
ARG_PARAM2
=
"param2"
;
// TODO: Rename and change types of parameters
private
String
mParam1
;
private
String
mParam2
;
public
CameraFragment
()
{
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment CameraFragment.
*/
// TODO: Rename and change types and number of parameters
public
static
CameraFragment
newInstance
(
String
param1
,
String
param2
)
{
CameraFragment
fragment
=
new
CameraFragment
();
Bundle
args
=
new
Bundle
();
args
.
putString
(
ARG_PARAM1
,
param1
);
args
.
putString
(
ARG_PARAM2
,
param2
);
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
getArguments
()
!=
null
)
{
mParam1
=
getArguments
().
getString
(
ARG_PARAM1
);
mParam2
=
getArguments
().
getString
(
ARG_PARAM2
);
}
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_camera
,
container
,
false
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
0 → 100644
View file @
cc225522
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.mynotepad.R
;
public
class
ChoosingPicsFragment
extends
Fragment
{
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
((
PicsActivity
)
getActivity
()).
getSupportActionBar
().
setTitle
(
"Choose Pic"
);
return
inflater
.
inflate
(
R
.
layout
.
fragment_choosing_pics
,
container
,
false
);
}
@Override
public
void
onViewCreated
(
@NonNull
View
view
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/GalleryFragment.java
deleted
100644 → 0
View file @
3180d840
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.os.Bundle
;
import
androidx.fragment.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.mynotepad.R
;
/**
* A simple {@link Fragment} subclass.
* Use the {@link GalleryFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
GalleryFragment
extends
Fragment
{
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private
static
final
String
ARG_PARAM1
=
"param1"
;
private
static
final
String
ARG_PARAM2
=
"param2"
;
// TODO: Rename and change types of parameters
private
String
mParam1
;
private
String
mParam2
;
public
GalleryFragment
()
{
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment GalleryFragment.
*/
// TODO: Rename and change types and number of parameters
public
static
GalleryFragment
newInstance
(
String
param1
,
String
param2
)
{
GalleryFragment
fragment
=
new
GalleryFragment
();
Bundle
args
=
new
Bundle
();
args
.
putString
(
ARG_PARAM1
,
param1
);
args
.
putString
(
ARG_PARAM2
,
param2
);
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
getArguments
()
!=
null
)
{
mParam1
=
getArguments
().
getString
(
ARG_PARAM1
);
mParam2
=
getArguments
().
getString
(
ARG_PARAM2
);
}
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_gallery
,
container
,
false
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/NotedPicsFragment.java
deleted
100644 → 0
View file @
3180d840
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.os.Bundle
;
import
androidx.fragment.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.mynotepad.R
;
/**
* A simple {@link Fragment} subclass.
* Use the {@link NotedPicsFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
NotedPicsFragment
extends
Fragment
{
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private
static
final
String
ARG_PARAM1
=
"param1"
;
private
static
final
String
ARG_PARAM2
=
"param2"
;
// TODO: Rename and change types of parameters
private
String
mParam1
;
private
String
mParam2
;
public
NotedPicsFragment
()
{
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment NotedPicsFragment.
*/
// TODO: Rename and change types and number of parameters
public
static
NotedPicsFragment
newInstance
(
String
param1
,
String
param2
)
{
NotedPicsFragment
fragment
=
new
NotedPicsFragment
();
Bundle
args
=
new
Bundle
();
args
.
putString
(
ARG_PARAM1
,
param1
);
args
.
putString
(
ARG_PARAM2
,
param2
);
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
getArguments
()
!=
null
)
{
mParam1
=
getArguments
().
getString
(
ARG_PARAM1
);
mParam2
=
getArguments
().
getString
(
ARG_PARAM2
);
}
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_noted_pics
,
container
,
false
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
0 → 100644
View file @
cc225522
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.example.mynotepad.MainActivity
;
import
com.example.mynotepad.R
;
public
class
NotedPicsListFragment
extends
Fragment
{
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
((
PicsActivity
)
getActivity
()).
getSupportActionBar
().
setTitle
(
"Pics List"
);
return
inflater
.
inflate
(
R
.
layout
.
fragment_noted_pics
,
container
,
false
);
}
@Override
public
void
onViewCreated
(
@NonNull
View
view
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/PicsActivity.java
View file @
cc225522
...
...
@@ -18,9 +18,10 @@ public class PicsActivity extends AppCompatActivity {
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_pics
);
BottomNavigationView
navView
=
findViewById
(
R
.
id
.
nav_view
);
//set bottom navigation view
AppBarConfiguration
appBarConfiguration
=
new
AppBarConfiguration
.
Builder
(
R
.
id
.
n
otedPicsFragment
,
R
.
id
.
cameraFragment
,
R
.
id
.
galleryFragment
).
build
();
//set fragments
NavController
navController
=
Navigation
.
findNavController
(
this
,
R
.
id
.
nav_
host_fragment
);
//set place of fragment
AppBarConfiguration
appBarConfiguration
=
new
AppBarConfiguration
.
Builder
(
R
.
id
.
n
avigation_picturedNoteList
,
R
.
id
.
navigation_choosePic
).
build
();
//set fragments
NavController
navController
=
Navigation
.
findNavController
(
this
,
R
.
id
.
nav_
pic_fragment_place
);
//set place of fragment
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
appBarConfiguration
);
NavigationUI
.
setupWithNavController
(
navView
,
navController
);
getSupportActionBar
().
setTitle
(
"Pics"
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/VoiceMassages/VoiceMassagesActivity.java
View file @
cc225522
...
...
@@ -11,6 +11,7 @@ public class VoiceMassagesActivity extends AppCompatActivity {
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_voice_massages
);
setTitle
(
"voice massages"
);
}
}
app/src/main/res/drawable/bg_button.xml
View file @
cc225522
...
...
@@ -7,7 +7,7 @@
android:angle=
"45"
android:centerX=
"35%"
android:startColor=
"#2980b9"
android:endColor=
"#
D0E4F1
"
android:endColor=
"#
2980b9
"
android:type=
"linear"
/>
<size
...
...
app/src/main/res/drawable/bg_row.xml
View file @
cc225522
...
...
@@ -3,8 +3,8 @@
android:shape=
"rectangle"
>
<gradient
android:startColor=
"
@color/white
"
android:endColor=
"#
e3f2fb
"
android:startColor=
"
#D0E4F1
"
android:endColor=
"#
2980b9
"
android:type=
"radial"
android:gradientRadius=
"500dp"
/>
<stroke
...
...
app/src/main/res/layout/activity_main.xml
View file @
cc225522
...
...
@@ -8,93 +8,113 @@
android:background=
"@drawable/main_bg_bright"
android:orientation=
"vertical"
>
<androidx.co
nstraintlayout.widget.Constraint
Layout
<androidx.co
ordinatorlayout.widget.Coordinator
Layout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
tools:context=
".MainActivity"
>
<Button
android:id=
"@+id/button2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"120dp"
android:background=
"@drawable/bg_button"
android:onClick=
"allNoteClicked"
android:padding=
"4dp"
android:text=
"@string/all_notes"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/toolBarId"
app:rippleColor=
"#F6F6F6"
/>
<Button
android:id=
"@+id/button4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onCalendarClicked"
android:text=
"@string/calendar"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button2"
/>
<Button
android:id=
"@+id/button6"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onVoiceMassagesClicked"
android:text=
"@string/voice_massages"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.497"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button4"
/>
<Button
android:id=
"@+id/button8"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"noNotedPicsClicked"
android:text=
"@string/noted_pics"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button6"
/>
<Button
android:layout_width=
"wrap_content"
<com.google.android.material.appbar.AppBarLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onProgramsClicked"
android:text=
"@string/programs"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button8"
/>
<Toolbar
android:id=
"@+id/toolBarId"
android:fitsSystemWindows=
"true"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar_main"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:layout_scrollFlags=
"scroll|enterAlways"
/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@drawable/bg_toolbar"
app:layout_constraintTop_toTopOf=
"parent"
tools:layout_editor_absoluteX=
"-68dp"
tools:targetApi=
"lollipop"
>
<ImageView
android:id=
"@+id/toolbarList"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:adjustViewBounds=
"true"
android:src=
"@drawable/list"
/>
</Toolbar>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<Button
android:id=
"@+id/button2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button"
android:onClick=
"allNoteClicked"
android:padding=
"4dp"
android:text=
"@string/all_notes"
android:textColor=
"@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:rippleColor=
"#F6F6F6"
/>
<Button
android:id=
"@+id/button4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onCalendarClicked"
android:text=
"@string/calendar"
android:textColor=
"@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button2"
/>
<Button
android:id=
"@+id/button6"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onVoiceMassagesClicked"
android:text=
"@string/voice_massages"
android:textColor=
"@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.497"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button4"
/>
<Button
android:id=
"@+id/button8"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"noNotedPicsClicked"
android:text=
"@string/noted_pics"
android:textColor=
"@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.502"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button6"
/>
<Button
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onProgramsClicked"
android:text=
"@string/programs"
android:textColor=
"@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button8"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id=
"@+id/main_menu"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/activity_pics.xml
View file @
cc225522
...
...
@@ -20,7 +20,7 @@
app:menu=
"@menu/bottom_nav_pic"
/>
<fragment
android:id=
"@+id/nav_
host_fragment
"
android:id=
"@+id/nav_
pic_fragment_place
"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
...
...
app/src/main/res/layout/custom_allnotes_item.xml
View file @
cc225522
...
...
@@ -12,7 +12,7 @@
android:layout_weight=
"1"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:layout_marginTop=
"
5
dp"
android:layout_marginTop=
"
12
dp"
android:text=
"title"
android:padding=
"5dp"
android:textColor=
"#000A43"
...
...
@@ -27,6 +27,8 @@
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:lines=
"3"
android:padding=
"5dp"
android:text=
"body text"
android:textSize=
"12dp"
/>
...
...
app/src/main/res/layout/fragment_all_notes_list.xml
View file @
cc225522
...
...
@@ -18,21 +18,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/imageView7"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:scaleType=
"fitXY"
app:srcCompat=
"@drawable/index"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:enabled=
"false"
android:text=
"@string/all_notes"
android:textColor=
"#02091E"
android:textSize=
"26dp"
/>
</FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
...
...
app/src/main/res/layout/fragment_audio_list.xml
View file @
cc225522
...
...
@@ -15,22 +15,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/imageView7"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/index"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:enabled=
"false"
android:text=
"all voice massages"
android:textColor=
"#02091E"
android:textSize=
"26dp"
/>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id=
"@+id/customToolbarOption"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/fragment_c
amera
.xml
→
app/src/main/res/layout/fragment_c
hoosing_pics
.xml
View file @
cc225522
...
...
@@ -3,12 +3,6 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MenuFeatures.Pics.CameraFragment"
>
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/hello_blank_fragment"
/>
tools:context=
".MenuFeatures.Pics.ChoosingPicsFragment"
>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_gallery.xml
deleted
100644 → 0
View file @
3180d840
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MenuFeatures.Pics.GalleryFragment"
>
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/hello_blank_fragment"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_noted_pics.xml
View file @
cc225522
...
...
@@ -3,7 +3,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MenuFeatures.Pics.NotedPicsFragment"
>
tools:context=
".MenuFeatures.Pics.NotedPics
List
Fragment"
>
<!-- TODO: Update blank fragment layout -->
<TextView
...
...
app/src/main/res/menu/bottom_nav_pic.xml
View file @
cc225522
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/navigation_gallery"
android:icon=
"@drawable/gallery"
android:title=
"@string/gallery"
/>
<item
android:id=
"@+id/navigation_camera"
android:icon=
"@drawable/camera"
android:title=
"@string/camera"
/>
<item
android:id=
"@+id/navigation_picturedNoteList"
android:icon=
"@drawable/list"
android:title=
"noted pics"
/>
android:title=
"@string/noted_pics"
/>
<item
android:id=
"@+id/navigation_choosePic"
android:icon=
"@drawable/gallery"
android:title=
"@string/choosing_pics"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/drawer_menu.xml
View file @
cc225522
...
...
@@ -14,7 +14,7 @@
android:icon=
"@drawable/folder"
android:title=
"@string/folders"
/>
<item
android:id=
"@+id/setting"
android:id=
"@+id/setting
s
"
android:icon=
"@drawable/setting"
android:title=
"@string/setting"
/>
<item
...
...
app/src/main/res/navigation/bottom_nav_pic.xml
View file @
cc225522
...
...
@@ -3,21 +3,16 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/bottom_nav_pic"
app:startDestination=
"@id/n
otedPicsFragmen
t"
>
app:startDestination=
"@id/n
avigation_picturedNoteLis
t"
>
<fragment
android:id=
"@+id/cameraFragment"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.CameraFragment"
android:label=
"fragment_camera"
tools:layout=
"@layout/fragment_camera"
/>
<fragment
android:id=
"@+id/galleryFragment"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.GalleryFragment"
android:id=
"@+id/navigation_choosePic"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.ChoosingPicsFragment"
android:label=
"fragment_gallery"
tools:layout=
"@layout/fragment_
gallery
"
/>
tools:layout=
"@layout/fragment_
choosing_pics
"
/>
<fragment
android:id=
"@+id/n
otedPicsFragmen
t"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.NotedPicsFragment"
android:id=
"@+id/n
avigation_picturedNoteLis
t"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.NotedPics
List
Fragment"
android:label=
"fragment_noted_pics"
tools:layout=
"@layout/fragment_noted_pics"
/>
</navigation>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
cc225522
<resources>
<string
name=
"app_name"
>
MyNotepad
</string>
<string
name=
"setting"
>
setting
</string>
<string
name=
"setting"
>
setting
s
</string>
<string
name=
"all_notes"
>
all notes
</string>
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<string
name=
"title"
>
title
</string>
...
...
@@ -18,8 +18,11 @@
<string
name=
"camera"
>
camera
</string>
<string
name=
"gallery"
>
gallery
</string>
<string
name=
"favourites"
>
favourites
</string>
<string
name=
"noted_pics"
>
noted pics
</string>
<string
name=
"programs"
>
programs
</string>
<string
name=
"folders"
>
folders
</string>
<string
name=
"calendar"
>
calendar
</string>
<string
name=
"noted_pics"
>
noted pics
</string>
<string
name=
"choosing_pics"
>
choosing pics
</string>
<string
name=
"navigation_drawer_open"
>
open
</string>
<string
name=
"navigation_drawer_close"
>
close
</string>
</resources>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
cc225522
<resources>
<!-- Base application theme. -->
<style
name=
"AppTheme"
parent=
"Theme.
MaterialComponents.Light.No
ActionBar"
>
<style
name=
"AppTheme"
parent=
"Theme.
AppCompat.Light.Dark
ActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
</style>
</resources>
\ No newline at end of file
<style
name=
"AppThemeNoActionBAr"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</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