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
f631d444
Commit
f631d444
authored
Oct 30, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add button navigation for gallery , camera and list
parent
00410a7c
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
386 additions
and
8 deletions
+386
-8
compiler.xml
.idea/compiler.xml
+6
-0
gradle.xml
.idea/gradle.xml
+1
-0
misc.xml
.idea/misc.xml
+1
-1
build.gradle
app/build.gradle
+0
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+3
-0
MyAllNotesAdaptor.java
...atures/AllNotes/MyNoteRecyclerView/MyAllNotesAdaptor.java
+3
-3
CameraFragment.java
...m/example/mynotepad/MenuFeatures/Pics/CameraFragment.java
+66
-0
GalleryFragment.java
.../example/mynotepad/MenuFeatures/Pics/GalleryFragment.java
+66
-0
NotedPicsFragment.java
...xample/mynotepad/MenuFeatures/Pics/NotedPicsFragment.java
+66
-0
PicsActivity.java
...com/example/mynotepad/MenuFeatures/Pics/PicsActivity.java
+26
-0
RecordFragment.java
.../mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
+3
-3
gallery.xml
app/src/main/res/drawable-v24/gallery.xml
+9
-0
camera.xml
app/src/main/res/drawable/camera.xml
+13
-0
activity_pics.xml
app/src/main/res/layout/activity_pics.xml
+38
-0
fragment_camera.xml
app/src/main/res/layout/fragment_camera.xml
+14
-0
fragment_gallery.xml
app/src/main/res/layout/fragment_gallery.xml
+14
-0
fragment_noted_pics.xml
app/src/main/res/layout/fragment_noted_pics.xml
+14
-0
bottom_nav_pic.xml
app/src/main/res/menu/bottom_nav_pic.xml
+18
-0
bottom_nav_pic.xml
app/src/main/res/navigation/bottom_nav_pic.xml
+23
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
.idea/compiler.xml
0 → 100644
View file @
f631d444
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1.8"
/>
</component>
</project>
\ No newline at end of file
.idea/gradle.xml
View file @
f631d444
...
...
@@ -15,6 +15,7 @@
</set>
</option>
<option
name=
"resolveModulePerSourceSet"
value=
"false"
/>
<option
name=
"useQualifiedModuleNames"
value=
"true"
/>
</GradleProjectSettings>
</option>
</component>
...
...
.idea/misc.xml
View file @
f631d444
...
...
@@ -39,7 +39,7 @@
</value>
</option>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
7
"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
8"
default=
"true
"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
app/build.gradle
View file @
f631d444
...
...
@@ -45,5 +45,4 @@ dependencies {
implementation
"androidx.navigation:navigation-ui:$nav_version"
implementation
'com.google.android.material:material:1.3.0-alpha03'
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
f631d444
...
...
@@ -5,13 +5,16 @@
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.RECORD_AUDIO"
/>
<application
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:requestLegacyExternalStorage=
"true"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MenuFeatures.Pics.PicsActivity"
></activity>
<activity
android:name=
".MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.DatePickerActivity"
/>
<activity
android:name=
".MenuFeatures.Calender.MyCalenderActivity"
/>
<activity
android:name=
".MenuFeatures.VoiceMassages.VoiceMassagesActivity"
/>
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/MyNoteRecyclerView/MyAllNotesAdaptor.java
View file @
f631d444
...
...
@@ -31,7 +31,7 @@ public class MyAllNotesAdaptor extends RecyclerView.Adapter<MyAllNotesAdaptor.Vi
public
void
onBindViewHolder
(
ViewHolder
holder
,
int
position
)
{
holder
.
titleTV
.
setText
(
notes
.
get
(
position
).
getTitle
());
holder
.
descriptionTV
.
setText
(
notes
.
get
(
position
).
getDescription
());
holder
.
is
a
rchived
=
notes
.
get
(
position
).
isArchived
();
holder
.
is
A
rchived
=
notes
.
get
(
position
).
isArchived
();
}
@Override
...
...
@@ -45,13 +45,13 @@ public class MyAllNotesAdaptor extends RecyclerView.Adapter<MyAllNotesAdaptor.Vi
class
ViewHolder
extends
RecyclerView
.
ViewHolder
implements
View
.
OnClickListener
,
View
.
OnLongClickListener
{
protected
TextView
titleTV
,
descriptionTV
;
protected
boolean
is
a
rchived
;
protected
boolean
is
A
rchived
;
public
ViewHolder
(
View
itemView
)
{
super
(
itemView
);
titleTV
=
itemView
.
findViewById
(
R
.
id
.
titleTv
);
descriptionTV
=
itemView
.
findViewById
(
R
.
id
.
descriptionTv
);
is
a
rchived
=
false
;
is
A
rchived
=
false
;
itemView
.
setOnClickListener
(
this
);
itemView
.
setOnLongClickListener
(
this
);
}
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/CameraFragment.java
0 → 100644
View file @
f631d444
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/GalleryFragment.java
0 → 100644
View file @
f631d444
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
0 → 100644
View file @
f631d444
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/PicsActivity.java
0 → 100644
View file @
f631d444
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.navigation.NavController
;
import
androidx.navigation.Navigation
;
import
androidx.navigation.ui.AppBarConfiguration
;
import
androidx.navigation.ui.NavigationUI
;
import
android.os.Bundle
;
import
com.example.mynotepad.R
;
import
com.google.android.material.bottomnavigation.BottomNavigationView
;
public
class
PicsActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
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
.
notedPicsFragment
,
R
.
id
.
cameraFragment
,
R
.
id
.
galleryFragment
).
build
();
//set fragments
NavController
navController
=
Navigation
.
findNavController
(
this
,
R
.
id
.
nav_host_fragment
);
//set place of fragment
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
appBarConfiguration
);
NavigationUI
.
setupWithNavController
(
navView
,
navController
);
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
View file @
f631d444
...
...
@@ -138,9 +138,9 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
mRecorder
.
setAudioEncoder
(
MediaRecorder
.
AudioEncoder
.
AMR_NB
);
try
{
mRecorder
.
prepare
();
if
(
mRecorder
!=
null
)
mRecorder
.
start
();
if
(
mRecorder
!=
null
){
mRecorder
.
prepare
();
mRecorder
.
start
();
}
chronometer
.
setBase
(
SystemClock
.
elapsedRealtime
());
// to start from 00:00
chronometer
.
start
();
}
catch
(
IOException
e
)
{
...
...
app/src/main/res/drawable-v24/gallery.xml
0 → 100644
View file @
f631d444
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FFFFFF"
android:pathData=
"M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z"
/>
</vector>
app/src/main/res/drawable/camera.xml
0 → 100644
View file @
f631d444
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"?attr/colorControlNormal"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
/>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"
/>
</vector>
app/src/main/res/layout/activity_pics.xml
0 → 100644
View file @
f631d444
<?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=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MenuFeatures.Pics.PicsActivity"
>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id=
"@+id/nav_view"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:menu=
"@menu/bottom_nav_pic"
/>
<fragment
android:id=
"@+id/nav_host_fragment"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:defaultNavHost=
"true"
app:layout_constraintBottom_toTopOf=
"@id/nav_view"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"1.0"
app:navGraph=
"@navigation/bottom_nav_pic"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_camera.xml
0 → 100644
View file @
f631d444
<?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.CameraFragment"
>
<!-- 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_gallery.xml
0 → 100644
View file @
f631d444
<?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
0 → 100644
View file @
f631d444
<?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.NotedPicsFragment"
>
<!-- 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/menu/bottom_nav_pic.xml
0 → 100644
View file @
f631d444
<?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=
"pictured notes"
/>
</menu>
\ No newline at end of file
app/src/main/res/navigation/bottom_nav_pic.xml
0 → 100644
View file @
f631d444
<?xml version="1.0" encoding="utf-8"?>
<navigation
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/bottom_nav_pic"
app:startDestination=
"@id/notedPicsFragment"
>
<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:label=
"fragment_gallery"
tools:layout=
"@layout/fragment_gallery"
/>
<fragment
android:id=
"@+id/notedPicsFragment"
android:name=
"com.example.mynotepad.MenuFeatures.Pics.NotedPicsFragment"
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 @
f631d444
...
...
@@ -15,4 +15,6 @@
<string
name=
"not_playing"
>
Not playing
</string>
<string
name=
"media_player"
>
Media player
</string>
<string
name=
"file_name"
>
file name
</string>
<string
name=
"camera"
>
camera
</string>
<string
name=
"gallery"
>
gallery
</string>
</resources>
\ No newline at end of file
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