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
c7d4b10e
Commit
c7d4b10e
authored
Oct 05, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug delete voices
parent
618fc2ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
AudioListFragment.java
...notepad/MenuFeatures/VoiceMassages/AudioListFragment.java
+11
-4
No files found.
app/src/main/java/com/example/mynotepad/MenuFeatures/VoiceMassages/AudioListFragment.java
View file @
c7d4b10e
...
...
@@ -43,6 +43,7 @@ public class AudioListFragment extends Fragment {
private
ImageButton
playerPlayBtn
;
private
TextView
fileNameTv
,
headerTitleTv
;
private
SeekBar
seekBar
;
private
File
[]
files
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
...
...
@@ -81,7 +82,7 @@ public class AudioListFragment extends Fragment {
String
path
=
root
.
getAbsolutePath
()
+
"/NotepadVoiceRecorder/Audios"
;
Log
.
d
(
"Files"
,
"Path: "
+
path
);
File
directory
=
new
File
(
path
);
File
[]
files
=
directory
.
listFiles
();
files
=
directory
.
listFiles
();
if
(
files
!=
null
)
{
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
String
fileName
=
files
[
i
].
getName
();
...
...
@@ -146,9 +147,15 @@ public class AudioListFragment extends Fragment {
alert
.
setPositiveButton
(
"yes"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
if
(
files
!=
null
){
for
(
int
j
=
0
;
j
<
files
.
length
;
j
++){
if
(
files
[
j
].
getAbsolutePath
().
equals
(
myChosenVoice
.
getUri
())){
files
[
j
].
delete
();
myVoiceArrayList
.
remove
(
myChosenVoice
);
System
.
out
.
println
(
myChosenVoice
.
getFileName
()
+
" "
+
myChosenVoice
.
getUri
());
new
File
(
myChosenVoice
.
getFileName
()).
delete
();
}
}
}
customToolbarOption
.
setVisibility
(
View
.
GONE
);
recyclerViewRecordings
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
(),
LinearLayoutManager
.
VERTICAL
,
false
));
recyclerViewRecordings
.
setHasFixedSize
(
true
);
...
...
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