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
00410a7c
Commit
00410a7c
authored
Oct 05, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some changes
parent
c7d4b10e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
17 deletions
+31
-17
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+0
-1
MainActivity.java
app/src/main/java/com/example/mynotepad/MainActivity.java
+1
-1
AllNotesListFragment.java
...mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
+8
-1
NoteFragment.java
...le/mynotepad/MenuFeatures/AllNotes/Note/NoteFragment.java
+9
-4
RecordFragment.java
.../mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
+10
-6
activity_main.xml
app/src/main/res/layout/activity_main.xml
+3
-4
No files found.
app/src/main/AndroidManifest.xml
View file @
00410a7c
...
...
@@ -12,7 +12,6 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MenuFeatures.VoiceMassages.RecorderActivity"
></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/MainActivity.java
View file @
00410a7c
...
...
@@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
}
private
void
init
()
{
noteDataBase
=
Room
.
databaseBuilder
(
this
,
NoteDataBase
.
class
,
"RoomDb"
).
allowMainThreadQueries
().
build
();
noteDataBase
=
Room
.
databaseBuilder
(
this
,
NoteDataBase
.
class
,
"RoomDb"
).
fallbackToDestructiveMigration
().
allowMainThreadQueries
().
build
();
customMenu
=
findViewById
(
R
.
id
.
mainListItem
);
customMenu
.
setVisibility
(
customMenu
.
GONE
);
wlcTxt
=
findViewById
(
R
.
id
.
wlcTxt
);
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/AllNotesListFragment.java
View file @
00410a7c
...
...
@@ -206,7 +206,14 @@ public class AllNotesListFragment extends Fragment {
}
private
void
showABlankNote
()
{
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
);
//set noteFragment data
final
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"title"
,
""
);
bundle
.
putString
(
"bodyTxt"
,
""
);
bundle
.
putString
(
"type"
,
"note"
);
//change the fragment
navController
.
navigate
(
R
.
id
.
action_allNotesListFragment_to_noteFragment
,
bundle
);
}
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/Note/NoteFragment.java
View file @
00410a7c
...
...
@@ -59,14 +59,13 @@ public class NoteFragment extends Fragment {
back
=
view
.
findViewById
(
R
.
id
.
backBtn
);
titleTxt
=
view
.
findViewById
(
R
.
id
.
myTitle
);
bodyTxt
=
view
.
findViewById
(
R
.
id
.
textBody
);
back
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
if
(
titleTxt
.
getText
().
length
()!=
0
&&
bodyTxt
.
getText
().
length
()!=
0
)
showAlert
();
}
});
}
...
...
@@ -132,8 +131,14 @@ public class NoteFragment extends Fragment {
private
void
setTitleAndBodyTxt
()
{
Bundle
bundle
=
getArguments
();
isAnewNote
=
false
;
if
(
bundle
!=
null
)
{
if
(
bundle
!=
null
)
if
(
bundle
.
getString
(
"title"
).
equals
(
""
)
&&
bundle
.
getString
(
"bodyTxt"
).
equals
(
""
)){
isAnewNote
=
true
;
type
=
bundle
.
getString
(
"type"
);
}
else
{
isAnewNote
=
false
;
titleTxt
.
setText
(
bundle
.
getString
(
"title"
));
bodyTxt
.
setText
(
bundle
.
getString
(
"bodyTxt"
));
type
=
bundle
.
getString
(
"type"
);
...
...
app/src/main/java/com/example/mynotepad/MenuFeatures/VoiceMassages/RecordFragment.java
View file @
00410a7c
...
...
@@ -129,7 +129,7 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
file
.
mkdirs
();
//create a the folders if it does not exists
}
fileName
=
new
SimpleDateFormat
(
"yyyy_MM_dd_hh_mm_ss"
,
Locale
.
CANADA
).
format
(
new
Date
())
+
".mp3"
;
Log
.
d
(
"filename"
,
root
.
getAbsolutePath
()
+
"/NotepadVoiceRecorder/Audios/"
+
fileName
);
Log
.
e
(
"filename"
,
root
.
getAbsolutePath
()
+
"/NotepadVoiceRecorder/Audios/"
+
fileName
);
mRecorder
=
new
MediaRecorder
();
mRecorder
.
setAudioSource
(
MediaRecorder
.
AudioSource
.
MIC
);
...
...
@@ -139,18 +139,22 @@ public class RecordFragment extends Fragment implements View.OnClickListener {
try
{
mRecorder
.
prepare
();
if
(
mRecorder
!=
null
)
mRecorder
.
start
();
chronometer
.
setBase
(
SystemClock
.
elapsedRealtime
());
// to start from 00:00
chronometer
.
start
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
Log
.
e
(
"IOException"
,
e
.
getMessage
()+
""
);
}
mRecorder
.
start
();
chronometer
.
setBase
(
SystemClock
.
elapsedRealtime
());
// to start from 00:00
chronometer
.
start
();
}
private
void
stopRecording
()
{
mRecorder
.
stop
();
mRecorder
.
release
();
if
(
mRecorder
!=
null
)
{
mRecorder
.
stop
();
mRecorder
.
release
();}
mRecorder
=
null
;
chronometer
.
stop
();
chronometer
.
setBase
(
SystemClock
.
elapsedRealtime
());
...
...
app/src/main/res/layout/activity_main.xml
View file @
00410a7c
...
...
@@ -46,12 +46,11 @@
<TextView
android:id=
"@+id/wlcTxt"
android:layout_width=
"211dp"
android:layout_centerHorizontal=
"true"
android:layout_width=
"wrap_content"
android:layout_height=
"73dp"
android:layout_above=
"@+id/imageView"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"173dp"
android:layout_marginBottom=
"37dp"
/>
android:layout_marginBottom=
"30dp"
/>
</RelativeLayout>
...
...
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