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
f41c3748
Commit
f41c3748
authored
Nov 05, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add camera to take picture
parent
cc225522
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
827 additions
and
119 deletions
+827
-119
build.gradle
app/build.gradle
+7
-5
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+5
-2
AddTextToPicDialog.java
...uFeatures/Pics/AddTextToPicDialog/AddTextToPicDialog.java
+55
-0
OnSavePicListenerClick.java
...tures/Pics/AddTextToPicDialog/OnSavePicListenerClick.java
+8
-0
CameraActivity.java
...le/mynotepad/MenuFeatures/Pics/Camera/CameraActivity.java
+223
-0
CameraPreview.java
...ple/mynotepad/MenuFeatures/Pics/Camera/CameraPreview.java
+53
-0
ChoosingPicsFragment.java
...ple/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
+29
-0
NotedPicsListFragment.java
...le/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
+40
-0
bin.xml
app/src/main/res/drawable-v24/bin.xml
+0
-10
blackstar.xml
app/src/main/res/drawable-v24/blackstar.xml
+0
-10
ic_calender.xml
app/src/main/res/drawable-v24/ic_calender.xml
+1
-1
ic_list.xml
app/src/main/res/drawable-v24/ic_list.xml
+0
-0
ic_noted_pictures.xml
app/src/main/res/drawable-v24/ic_noted_pictures.xml
+0
-0
ic_save.xml
app/src/main/res/drawable-v24/ic_save.xml
+0
-0
ic_setting.xml
app/src/main/res/drawable-v24/ic_setting.xml
+0
-0
bg_button.xml
app/src/main/res/drawable/bg_button.xml
+3
-8
bg_button2.xml
app/src/main/res/drawable/bg_button2.xml
+12
-0
bg_icon.xml
app/src/main/res/drawable/bg_icon.xml
+11
-0
camera.xml
app/src/main/res/drawable/camera.xml
+3
-3
ic_bin.xml
app/src/main/res/drawable/ic_bin.xml
+18
-0
ic_gallery.xml
app/src/main/res/drawable/ic_gallery.xml
+1
-1
ic_music.xml
app/src/main/res/drawable/ic_music.xml
+0
-0
ic_notes.xml
app/src/main/res/drawable/ic_notes.xml
+1
-1
ic_pause.xml
app/src/main/res/drawable/ic_pause.xml
+0
-0
ic_play.xml
app/src/main/res/drawable/ic_play.xml
+0
-0
ic_switch.xml
app/src/main/res/drawable/ic_switch.xml
+12
-0
ic_voice.xml
app/src/main/res/drawable/ic_voice.xml
+1
-1
ic_yellow_star.xml
app/src/main/res/drawable/ic_yellow_star.xml
+1
-1
activity_camera_x.xml
app/src/main/res/layout/activity_camera_x.xml
+106
-0
activity_main.xml
app/src/main/res/layout/activity_main.xml
+97
-59
custom_toolbar_options.xml
app/src/main/res/layout/custom_toolbar_options.xml
+1
-1
custom_voice_item.xml
app/src/main/res/layout/custom_voice_item.xml
+2
-2
dialog_add_text_to_pic.xml
app/src/main/res/layout/dialog_add_text_to_pic.xml
+67
-0
fragment_choosing_pics.xml
app/src/main/res/layout/fragment_choosing_pics.xml
+63
-3
fragment_noted_pics.xml
app/src/main/res/layout/fragment_noted_pics.xml
+0
-6
fragment_record.xml
app/src/main/res/layout/fragment_record.xml
+1
-1
player_sheet.xml
app/src/main/res/layout/player_sheet.xml
+1
-1
bottom_nav_pic.xml
app/src/main/res/menu/bottom_nav_pic.xml
+2
-2
drawer_menu.xml
app/src/main/res/menu/drawer_menu.xml
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/build.gradle
View file @
f41c3748
...
...
@@ -25,13 +25,13 @@ android {
dependencies
{
implementation
fileTree
(
dir:
"libs"
,
include:
[
"*.jar"
])
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.constraintlayout:constraintlayout:2.0.
1
'
implementation
'androidx.constraintlayout:constraintlayout:2.0.
2
'
implementation
'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation
'junit:junit:4.1
2
'
testImplementation
'junit:junit:4.1
3.1
'
androidTestImplementation
'androidx.test.ext:junit:1.1.2'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.3.0'
implementation
'androidx.navigation:navigation-fragment:2.3.
0
'
implementation
'androidx.navigation:navigation-ui:2.3.
0
'
implementation
'androidx.navigation:navigation-fragment:2.3.
1
'
implementation
'androidx.navigation:navigation-ui:2.3.
1
'
compile
'com.alirezaafkar:sundatepicker:2.0.4'
def
room_version
=
"2.2.5"
...
...
@@ -40,9 +40,11 @@ dependencies {
annotationProcessor
"androidx.room:room-compiler:$room_version"
//i added these parts just for voice recorder
def
nav_version
=
"2.3.
0
"
def
nav_version
=
"2.3.
1
"
implementation
"androidx.navigation:navigation-fragment:$nav_version"
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 @
f41c3748
...
...
@@ -5,6 +5,7 @@
<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"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<application
android:allowBackup=
"true"
...
...
@@ -14,13 +15,15 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MenuFeatures.Pics.PicsActivity"
></activity>
<activity
android:name=
".MenuFeatures.Pics.Camera.CameraActivity"
></activity>
<activity
android:name=
".MenuFeatures.Pics.PicsActivity"
/>
<activity
android:name=
".MenuFeatures.Calender.MyCalenderActivity"
/>
<activity
android:name=
".MenuFeatures.VoiceMassages.VoiceMassagesActivity"
/>
<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/MenuFeatures/Pics/AddTextToPicDialog/AddTextToPicDialog.java
0 → 100644
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
AddTextToPicDialog
;
import
android.app.Activity
;
import
android.app.Dialog
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
com.example.mynotepad.R
;
public
class
AddTextToPicDialog
{
private
OnSavePicListenerClick
onSavePicListenerClick
;
private
ImageView
imageView
;
private
EditText
editText
;
private
Button
save
,
back
;
public
void
showAddTxtDialog
(
Activity
activity
,
String
filePath
)
{
final
Dialog
dialog
=
new
Dialog
(
activity
);
dialog
.
setCancelable
(
true
);
dialog
.
setContentView
(
R
.
layout
.
dialog_add_text_to_pic
);
save
=
dialog
.
findViewById
(
R
.
id
.
save_button
);
back
=
dialog
.
findViewById
(
R
.
id
.
back_button
);
imageView
=
dialog
.
findViewById
(
R
.
id
.
imageView
);
editText
=
dialog
.
findViewById
(
R
.
id
.
editText
);
addListener
(
dialog
,
filePath
);
dialog
.
show
();
}
private
void
addListener
(
final
Dialog
dialog
,
String
filePath
)
{
setPic
(
filePath
);
save
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onSavePicListenerClick
.
saveClicked
(
editText
.
getText
().
toString
());
dialog
.
dismiss
();
}
});
back
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
dialog
.
dismiss
();
}
});
}
private
void
setPic
(
String
filePath
)
{
}
public
void
setOnSavePicListenerClick
(
OnSavePicListenerClick
onSavePicListenerClick
)
{
this
.
onSavePicListenerClick
=
onSavePicListenerClick
;
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/AddTextToPicDialog/OnSavePicListenerClick.java
0 → 100644
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
AddTextToPicDialog
;
import
android.text.Editable
;
import
android.widget.EditText
;
public
interface
OnSavePicListenerClick
{
void
saveClicked
(
String
editTextTxt
);
}
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/Camera/CameraActivity.java
0 → 100644
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
Camera
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.RequiresApi
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.core.content.ContextCompat
;
import
android.Manifest
;
import
android.app.AlertDialog
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.SeekBar
;
import
android.widget.Toast
;
import
com.example.mynotepad.MenuFeatures.Pics.AddTextToPicDialog.AddTextToPicDialog
;
import
com.example.mynotepad.R
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.Executors
;
public
class
CameraActivity
extends
AppCompatActivity
{
private
Executor
executor
=
Executors
.
newSingleThreadExecutor
();
private
int
REQUEST_CODE_PERMISSIONS
=
1001
;
private
ImageView
switchCamera
;
private
Button
torch
,
flash
,
captureBtn
;
private
SeekBar
seekBarZoom
;
private
static
String
filePath
;
private
android
.
hardware
.
Camera
mCamera
;
private
Bitmap
bitmap
;
private
final
int
RECORD_CAMERA_CODE
=
130
;
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
M
)
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_camera_x
);
checkRuntimePermission
();
init
();
addListeners
();
}
private
void
init
()
{
captureBtn
=
findViewById
(
R
.
id
.
buttonCaptureImage
);
switchCamera
=
findViewById
(
R
.
id
.
switchCamera
);
flash
=
findViewById
(
R
.
id
.
buttonToggleFlash
);
torch
=
findViewById
(
R
.
id
.
buttonToggleTorch
);
seekBarZoom
=
findViewById
(
R
.
id
.
seekBarZoom
);
mCamera
=
getCameraInstance
();
CameraPreview
mCameraPreview
=
new
CameraPreview
(
this
,
mCamera
);
FrameLayout
preview
=
findViewById
(
R
.
id
.
camera_preview
);
preview
.
addView
(
mCameraPreview
);
// backBtn = findViewById(R.id.cameraBackBtn);
}
private
android
.
hardware
.
Camera
getCameraInstance
()
{
android
.
hardware
.
Camera
camera
=
null
;
try
{
camera
=
android
.
hardware
.
Camera
.
open
();
}
catch
(
Exception
e
)
{
// cannot get camera or does not exist
Toast
.
makeText
(
this
,
"camera not found"
,
Toast
.
LENGTH_LONG
).
show
();
}
return
camera
;
}
private
void
addListeners
()
{
captureBtn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onCaptureImage
(
v
);
}
});
switchCamera
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onSwitchCamera
();
}
});
flash
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onFlash
();
}
});
torch
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
onTorch
();
}
});
seekBarZoom
.
setOnSeekBarChangeListener
(
onSeekBarChange
());
}
private
void
onCaptureImage
(
View
v
)
{
mCamera
.
takePicture
(
null
,
null
,
mPicture
);
showCapturedImage
(
v
);
}
private
SeekBar
.
OnSeekBarChangeListener
onSeekBarChange
()
{
return
null
;
}
private
void
onTorch
()
{
}
private
void
onFlash
()
{
}
private
void
onSwitchCamera
()
{
}
android
.
hardware
.
Camera
.
PictureCallback
mPicture
=
new
android
.
hardware
.
Camera
.
PictureCallback
()
{
@Override
public
void
onPictureTaken
(
byte
[]
data
,
android
.
hardware
.
Camera
camera
)
{
bitmap
=
BitmapFactory
.
decodeByteArray
(
data
,
0
,
data
.
length
);
File
pictureFile
=
getOutputMediaFile
();
if
(
pictureFile
==
null
)
{
return
;
}
try
{
FileOutputStream
out
=
new
FileOutputStream
(
pictureFile
);
//write on a file
out
.
write
(
data
);
bitmap
.
compress
(
Bitmap
.
CompressFormat
.
JPEG
,
100
,
out
);
out
.
close
();
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
};
private
static
File
getOutputMediaFile
()
{
//create a file to put pics in it
File
mediaStorageDir
=
new
File
(
Environment
.
getExternalStorageDirectory
(),
"MyNotePad"
);
if
(!
mediaStorageDir
.
exists
())
{
if
(!
mediaStorageDir
.
mkdirs
())
{
System
.
out
.
println
(
"failed to create directory"
);
return
null
;
}
}
// Create a media file for pic
String
timeStamp
=
new
SimpleDateFormat
(
"yyyyMMdd_HHmmss"
).
format
(
new
Date
());
File
mediaFile
=
new
File
(
mediaStorageDir
.
getPath
()
+
File
.
separator
+
"IMG_"
+
timeStamp
+
".jpg"
);
filePath
=
mediaFile
.
getPath
();
return
mediaFile
;
// return the pic file which we wanna write a pic on it
}
private
void
showCapturedImage
(
View
view
)
{
AddTextToPicDialog
addTextToPicDialog
=
new
AddTextToPicDialog
();
addTextToPicDialog
.
showAddTxtDialog
(
this
,
filePath
);
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
this
);
alert
.
setMessage
(
"do you want to save the pic?"
);
alert
.
setPositiveButton
(
"yes"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
if
(
filePath
!=
null
)
{
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"filePath"
,
filePath
);
setResult
(
2
,
intent
);
}
finish
();
}
});
alert
.
setNegativeButton
(
"no"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
Intent
intent
=
getIntent
();
finish
();
startActivity
(
intent
);
dialog
.
dismiss
();
}
});
alert
.
show
();
}
//check permissions
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
M
)
private
void
checkRuntimePermission
()
{
if
(
ContextCompat
.
checkSelfPermission
(
this
,
Manifest
.
permission
.
CAMERA
)
!=
PackageManager
.
PERMISSION_GRANTED
||
ContextCompat
.
checkSelfPermission
(
this
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
!=
PackageManager
.
PERMISSION_GRANTED
||
ContextCompat
.
checkSelfPermission
(
this
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
requestPermissions
(
new
String
[]{
Manifest
.
permission
.
CAMERA
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
},
RECORD_CAMERA_CODE
);
}
}
@Override
public
void
onRequestPermissionsResult
(
int
requestCode
,
@NonNull
String
[]
permissions
,
@NonNull
int
[]
grantResults
)
{
super
.
onRequestPermissionsResult
(
requestCode
,
permissions
,
grantResults
);
if
(
requestCode
==
RECORD_CAMERA_CODE
)
{
if
(
grantResults
.
length
==
3
&&
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
&&
grantResults
[
1
]
==
PackageManager
.
PERMISSION_GRANTED
&&
grantResults
[
2
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
Toast
.
makeText
(
this
,
"accepted"
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
Toast
.
makeText
(
this
,
"You must give permissions to use this app. App is exiting."
,
Toast
.
LENGTH_SHORT
).
show
();
finish
();
}
}
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/Camera/CameraPreview.java
0 → 100644
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
.
Camera
;
import
android.content.Context
;
import
android.hardware.Camera
;
import
android.view.SurfaceHolder
;
import
android.view.SurfaceView
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
androidx.annotation.NonNull
;
import
java.io.IOException
;
public
class
CameraPreview
extends
SurfaceView
implements
SurfaceHolder
.
Callback
{
private
final
Camera
mCamera
;
// Constructor that obtains context and camera
@SuppressWarnings
(
"deprecation"
)
public
CameraPreview
(
Context
context
,
Camera
camera
)
{
super
(
context
);
this
.
mCamera
=
camera
;
SurfaceHolder
mSurfaceHolder
=
this
.
getHolder
();
mSurfaceHolder
.
addCallback
(
this
);
mSurfaceHolder
.
setType
(
SurfaceHolder
.
SURFACE_TYPE_PUSH_BUFFERS
);
}
@Override
public
void
surfaceCreated
(
@NonNull
SurfaceHolder
surfaceHolder
)
{
try
{
mCamera
.
setPreviewDisplay
(
surfaceHolder
);
mCamera
.
setDisplayOrientation
(
90
);
mCamera
.
startPreview
();
}
catch
(
IOException
e
)
{
// left blank for now
}
}
@Override
public
void
surfaceDestroyed
(
@NonNull
SurfaceHolder
surfaceHolder
)
{
mCamera
.
stopPreview
();
mCamera
.
release
();
}
@Override
public
void
surfaceChanged
(
@NonNull
SurfaceHolder
surfaceHolder
,
int
format
,
int
width
,
int
height
)
{
// start preview with new settings
try
{
mCamera
.
setPreviewDisplay
(
surfaceHolder
);
mCamera
.
startPreview
();
}
catch
(
Exception
e
)
{
// intentionally left blank for a test
}
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/ChoosingPicsFragment.java
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
android.provider.MediaStore
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.LinearLayout
;
import
com.example.mynotepad.MenuFeatures.Pics.Camera.CameraActivity
;
import
com.example.mynotepad.R
;
public
class
ChoosingPicsFragment
extends
Fragment
{
LinearLayout
camera
,
gallery
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
...
...
@@ -26,6 +31,30 @@ public class ChoosingPicsFragment extends Fragment {
@Override
public
void
onViewCreated
(
@NonNull
View
view
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
init
(
view
);
addListeners
();
}
private
void
init
(
View
view
)
{
camera
=
view
.
findViewById
(
R
.
id
.
cameraBtn
);
gallery
=
view
.
findViewById
(
R
.
id
.
galleryBtn
);
}
private
void
addListeners
(){
camera
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
startActivityForResult
(
new
Intent
(
getActivity
()
,
CameraActivity
.
class
)
,
2
);
}
});
gallery
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_PICK
,
MediaStore
.
Images
.
Media
.
EXTERNAL_CONTENT_URI
);
startActivityForResult
(
intent
,
1
);
}
});
}
}
\ No newline at end of file
app/src/main/java/com/example/mynotepad/MenuFeatures/Pics/NotedPicsListFragment.java
View file @
f41c3748
package
com
.
example
.
mynotepad
.
MenuFeatures
.
Pics
;
import
android.content.Intent
;
import
android.graphics.BitmapFactory
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
...
...
@@ -11,10 +14,17 @@ import android.view.View;
import
android.view.ViewGroup
;
import
com.example.mynotepad.MainActivity
;
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
{
private
String
newFilePath
;
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
...
...
@@ -27,4 +37,34 @@ public class NotedPicsListFragment extends Fragment {
public
void
onViewCreated
(
@NonNull
View
view
,
@Nullable
Bundle
savedInstanceState
)
{
super
.
onViewCreated
(
view
,
savedInstanceState
);
}
@Override
public
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
newFilePath
=
""
;
if
(
data
!=
null
)
if
(
requestCode
==
1
)
{
newFilePath
=
data
.
getData
().
getPath
();
}
else
if
(
requestCode
==
2
)
{
newFilePath
=
data
.
getStringExtra
(
"filePath"
);
}
//show dialog to save pic with note
AddTextToPicDialog
addTextToPicDialog
=
new
AddTextToPicDialog
();
addTextToPicDialog
.
showAddTxtDialog
(
getActivity
(),
newFilePath
);
addTextToPicDialog
.
setOnSavePicListenerClick
(
new
OnSavePicListenerClick
()
{
@Override
public
void
saveClicked
(
String
editTextTxt
)
{
// sent data to activity
if
(!
newFilePath
.
equals
(
""
))
{
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"filePath"
,
newFilePath
);
intent
.
putExtra
(
"imageTxt"
,
editTextTxt
);
//todo txt should be save in database with pic path if file pah is not null and add it to my list
}
}
});
}
}
\ No newline at end of file
app/src/main/res/drawable-v24/bin.xml
deleted
100644 → 0
View file @
cc225522
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"@color/black"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"
/>
</vector>
app/src/main/res/drawable-v24/blackstar.xml
deleted
100644 → 0
View file @
cc225522
<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=
"M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"
/>
</vector>
app/src/main/res/drawable-v24/calender.xml
→
app/src/main/res/drawable-v24/
ic_
calender.xml
View file @
f41c3748
...
...
@@ -3,7 +3,7 @@
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"
?attr/colorControlNormal
"
>
android:tint=
"
@color/white
"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M17,10L7,10v2h10v-2zM19,3h-1L18,1h-2v2L8,3L8,1L6,1v2L5,3c-1.11,0 -1.99,0.9 -1.99,2L3,19c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,8h14v11zM14,14L7,14v2h7v-2z"
/>
...
...
app/src/main/res/drawable-v24/list.xml
→
app/src/main/res/drawable-v24/
ic_
list.xml
View file @
f41c3748
File moved
app/src/main/res/drawable-v24/
gallery
.xml
→
app/src/main/res/drawable-v24/
ic_noted_pictures
.xml
View file @
f41c3748
File moved
app/src/main/res/drawable-v24/save.xml
→
app/src/main/res/drawable-v24/
ic_
save.xml
View file @
f41c3748
File moved
app/src/main/res/drawable-v24/setting.xml
→
app/src/main/res/drawable-v24/
ic_
setting.xml
View file @
f41c3748
File moved
app/src/main/res/drawable/bg_button.xml
View file @
f41c3748
...
...
@@ -3,15 +3,10 @@
<corners
android:radius=
"27dp"
/>
<gradient
android:angle=
"45"
android:centerX=
"35%"
android:startColor=
"#2980b9"
android:endColor=
"#2980b9"
android:type=
"linear"
/>
<solid
android:color=
"#2980b9"
/>
<size
android:width=
"1
8
0dp"
android:width=
"1
9
0dp"
android:height=
"54dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_button2.xml
0 → 100644
View file @
f41c3748
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"27dp"
/>
<solid
android:color=
"#2980b9"
/>
<size
android:width=
"120dp"
android:height=
"54dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_icon.xml
0 → 100644
View file @
f41c3748
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"27dp"
/>
<solid
android:color=
"#2980b9"
/>
<size
android:width=
"54dp"
android:height=
"54dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/camera.xml
View file @
f41c3748
...
...
@@ -3,11 +3,11 @@
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"
?attr/colorControlNormal
"
>
android:tint=
"
#FFFFFF
"
>
<path
android:fillColor=
"
@android:color/white
"
android:fillColor=
"
#FFFFFF
"
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:fillColor=
"
#FFFCFC
"
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/drawable/ic_bin.xml
0 → 100644
View file @
f41c3748
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"427dp"
android:height=
"427dp"
android:viewportWidth=
"427"
android:viewportHeight=
"427.0013"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"m272.398,154.703c-5.523,0 -10,4.477 -10,10v189c0,5.52 4.477,10 10,10 5.523,0 10,-4.48 10,-10v-189c0,-5.523 -4.477,-10 -10,-10zM272.398,154.703"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"m154.398,154.703c-5.523,0 -10,4.477 -10,10v189c0,5.52 4.477,10 10,10 5.523,0 10,-4.48 10,-10v-189c0,-5.523 -4.477,-10 -10,-10zM154.398,154.703"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"m68.398,127.121v246.379c0,14.563 5.34,28.238 14.668,38.051 9.285,9.84 22.207,15.426 35.73,15.449h189.203c13.527,-0.023 26.449,-5.609 35.73,-15.449 9.328,-9.813 14.668,-23.488 14.668,-38.051v-246.379c18.543,-4.922 30.559,-22.836 28.078,-41.863 -2.484,-19.023 -18.691,-33.254 -37.879,-33.258h-51.199v-12.5c0.059,-10.512 -4.098,-20.605 -11.539,-28.031 -7.441,-7.422 -17.551,-11.555 -28.063,-11.469h-88.797c-10.512,-0.086 -20.621,4.047 -28.063,11.469 -7.441,7.426 -11.598,17.52 -11.539,28.031v12.5h-51.199c-19.188,0.004 -35.395,14.234 -37.879,33.258 -2.48,19.027 9.535,36.941 28.078,41.863zM308,407h-189.203c-17.098,0 -30.398,-14.688 -30.398,-33.5v-245.5h250v245.5c0,18.813 -13.301,33.5 -30.398,33.5zM149.398,39.5c-0.066,-5.207 1.98,-10.219 5.676,-13.895 3.691,-3.676 8.715,-5.695 13.926,-5.605h88.797c5.211,-0.09 10.234,1.93 13.926,5.605 3.695,3.672 5.742,8.688 5.676,13.895v12.5h-128zM78.199,72h270.398c9.941,0 18,8.059 18,18s-8.059,18 -18,18h-270.398c-9.941,0 -18,-8.059 -18,-18s8.059,-18 18,-18zM78.199,72"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"m213.398,154.703c-5.523,0 -10,4.477 -10,10v189c0,5.52 4.477,10 10,10 5.523,0 10,-4.48 10,-10v-189c0,-5.523 -4.477,-10 -10,-10zM213.398,154.703"
/>
</vector>
app/src/main/res/drawable/
noted_pics
.xml
→
app/src/main/res/drawable/
ic_gallery
.xml
View file @
f41c3748
...
...
@@ -4,6 +4,6 @@
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF
000000
"
android:fillColor=
"#FF
FFFF
"
android:pathData=
"M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z"
/>
</vector>
app/src/main/res/drawable/music.xml
→
app/src/main/res/drawable/
ic_
music.xml
View file @
f41c3748
File moved
app/src/main/res/drawable/notes.xml
→
app/src/main/res/drawable/
ic_
notes.xml
View file @
f41c3748
...
...
@@ -3,7 +3,7 @@
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"
?attr/colorControlNormal
"
>
android:tint=
"
@color/white
"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M3,18h12v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h18v-2L3,11v2z"
/>
...
...
app/src/main/res/drawable/pause.xml
→
app/src/main/res/drawable/
ic_
pause.xml
View file @
f41c3748
File moved
app/src/main/res/drawable/play.xml
→
app/src/main/res/drawable/
ic_
play.xml
View file @
f41c3748
File moved
app/src/main/res/drawable/ic_switch.xml
0 → 100644
View file @
f41c3748
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"30dp"
android:height=
"30dp"
android:viewportWidth=
"512"
android:viewportHeight=
"512"
>
<path
android:fillColor=
"#FFFFFF"
android:pathData=
"M267.998,125.671L177.997,5.669c-5.654,-7.559 -18.34,-7.559 -23.994,0L64.002,125.671c-7.399,9.844 -0.355,23.994 11.997,23.994h45.001v285.003c0,8.291 6.709,15 15,15H196c8.291,0 14.8,-6.709 14.8,-15V149.665h45.2C268.363,149.665 275.389,135.505 267.998,125.671z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M436.003,362.005h-45.201V77.001c0,-8.291 -6.509,-15 -14.8,-15h-60.001c-8.291,0 -15,6.709 -15,15v285.003h-45.001c-12.353,0 -19.396,14.15 -11.997,23.994L334.005,506c5.989,8.006 18.014,7.994 23.994,0L448,385.999C455.391,376.165 448.365,362.005 436.003,362.005z"
/>
</vector>
app/src/main/res/drawable/voice.xml
→
app/src/main/res/drawable/
ic_
voice.xml
View file @
f41c3748
...
...
@@ -3,7 +3,7 @@
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"
?attr/colorControlNormal
"
>
android:tint=
"
@color/white
"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M12,15c1.66,0 2.99,-1.34 2.99,-3L15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6v6c0,1.66 1.34,3 3,3zM17.3,12c0,3 -2.54,5.1 -5.3,5.1S6.7,15 6.7,12L5,12c0,3.42 2.72,6.23 6,6.72L11,22h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"
/>
...
...
app/src/main/res/drawable/ic_yellow_star.xml
View file @
f41c3748
...
...
@@ -5,5 +5,5 @@
android:viewportHeight=
"24"
>
<path
android:pathData=
"m23.363,8.584 l-7.378,-1.127 -3.307,-7.044c-0.247,-0.526 -1.11,-0.526 -1.357,0l-3.306,7.044 -7.378,1.127c-0.606,0.093 -0.848,0.83 -0.423,1.265l5.36,5.494 -1.267,7.767c-0.101,0.617 0.558,1.08 1.103,0.777l6.59,-3.642 6.59,3.643c0.54,0.3 1.205,-0.154 1.103,-0.777l-1.267,-7.767 5.36,-5.494c0.425,-0.436 0.182,-1.173 -0.423,-1.266z"
android:fillColor=
"#f
fc107
"
/>
android:fillColor=
"#f
1c40f
"
/>
</vector>
app/src/main/res/layout/activity_camera_x.xml
0 → 100644
View file @
f41c3748
<?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"
android:orientation=
"vertical"
tools:context=
".MenuFeatures.Pics.Camera.CameraActivity"
>
<FrameLayout
android:id=
"@+id/camera_preview"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
/>
<Button
android:id=
"@+id/buttonCaptureImage"
style=
"@style/Widget.AppCompat.Button.Colored"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_marginBottom=
"16dp"
android:background=
"@drawable/start_stop_bg"
android:textAllCaps=
"false"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintDimensionRatio=
"1:1"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintStart_toStartOf=
"parent"
/>
<ImageView
android:id=
"@+id/switchCamera"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
android:layout_marginBottom=
"16dp"
android:background=
"@drawable/bg_icon"
android:padding=
"10dp"
android:src=
"@drawable/ic_switch"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<TextView
android:id=
"@+id/textViewZoomLevel"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"50dp"
android:ems=
"5"
android:gravity=
"end"
android:textColor=
"@color/black"
android:textSize=
"15dp"
app:layout_constraintBottom_toTopOf=
"@+id/buttonCaptureImage"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
tools:text=
"Zoom 10.0x"
/>
<TextView
android:id=
"@+id/textViewZoom"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
android:text=
"zoom"
android:textSize=
"16dp"
app:layout_constraintBottom_toTopOf=
"@id/buttonCaptureImage"
app:layout_constraintEnd_toStartOf=
"@id/seekBarZoom"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintStart_toStartOf=
"parent"
/>
<SeekBar
android:id=
"@+id/seekBarZoom"
android:layout_width=
"60dp"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"@id/textViewZoom"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/textViewZoom"
app:layout_constraintTop_toTopOf=
"@id/textViewZoom"
/>
<Button
android:id=
"@+id/buttonToggleFlash"
style=
"@style/Widget.AppCompat.Button.Colored"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"flash_off"
android:textAllCaps=
"false"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintDimensionRatio=
"1:1"
app:layout_constraintStart_toStartOf=
"parent"
/>
<Button
android:id=
"@+id/buttonToggleTorch"
style=
"@style/Widget.AppCompat.Button.Colored"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"torch_off"
android:textAllCaps=
"false"
app:layout_constraintBottom_toTopOf=
"@id/buttonToggleFlash"
app:layout_constraintDimensionRatio=
"1:1"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
f41c3748
...
...
@@ -23,7 +23,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:layout_scrollFlags=
"scroll|enterAlways"
/>
app:layout_scrollFlags=
"scroll|enterAlways"
/>
</com.google.android.material.appbar.AppBarLayout>
...
...
@@ -41,26 +41,43 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<
Button
android:id=
"@+id/
button2
"
<
LinearLayout
android:id=
"@+id/
allNotesBtn
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
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"
/>
android:textColor=
"@color/design_default_color_surface"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_icon"
android:padding=
"8dp"
android:src=
"@drawable/ic_notes"
/>
</LinearLayout>
<
Button
android:id=
"@+id/
button4
"
<
LinearLayout
android:id=
"@+id/
calendarBtn
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_button"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:onClick=
"onCalendarClicked"
android:text=
"@string/calendar"
android:textColor=
"@color/design_default_color_surface"
...
...
@@ -69,26 +86,53 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button2"
/>
<Button
android:id=
"@+id/button6"
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_icon"
android:padding=
"10dp"
android:src=
"@drawable/ic_calender"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/voiceMassagesBtn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_button"
android:onClick=
"onVoiceMassagesClicked"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
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"
/>
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:onClick=
"allNoteClicked"
android:textColor=
"@color/design_default_color_surface"
/>
<Button
android:id=
"@+id/button8"
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_icon"
android:padding=
"8dp"
android:src=
"@drawable/ic_voice"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/notedPicsBtn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:background=
"@drawable/bg_button"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/button8"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:onClick=
"noNotedPicsClicked"
android:text=
"@string/noted_pics"
android:textColor=
"@color/design_default_color_surface"
...
...
@@ -97,31 +141,25 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/button6"
/>
<Button
<ImageView
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"
/>
android:background=
"@drawable/bg_icon"
android:padding=
"10dp"
android:src=
"@drawable/ic_noted_pictures"
/>
</LinearLayout>
</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"
android:layout_height=
"match_parent"
android:layout_gravity=
"start"
android:fitsSystemWindows=
"true"
android:background=
"#e3f2fb"
android:fitsSystemWindows=
"true"
app:headerLayout=
"@layout/menu_header"
app:menu=
"@menu/drawer_menu"
/>
</androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file
app/src/main/res/layout/custom_toolbar_options.xml
View file @
f41c3748
...
...
@@ -42,7 +42,7 @@
android:layout_height=
"match_parent"
android:layout_alignRight=
"@id/star"
android:layout_marginRight=
"40dp"
android:src=
"@drawable/bin"
/>
android:src=
"@drawable/
ic_
bin"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/custom_voice_item.xml
View file @
f41c3748
...
...
@@ -17,13 +17,13 @@
android:id=
"@+id/playImg"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/play"
/>
android:src=
"@drawable/
ic_
play"
/>
<ImageView
android:id=
"@+id/pauseImg"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/pause"
/>
android:src=
"@drawable/
ic_
pause"
/>
</FrameLayout>
<LinearLayout
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/dialog_add_text_to_pic.xml
0 → 100644
View file @
f41c3748
<?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"
android:background=
"#CBE3F6"
>
<ImageView
android:id=
"@+id/imageView"
android:layout_width=
"414dp"
android:layout_height=
"562dp"
android:layout_marginBottom=
"60dp"
android:src=
"@drawable/main_bg_bright"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<EditText
android:id=
"@+id/editText"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginStart=
"8dp"
android:layout_marginLeft=
"8dp"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"8dp"
android:hint=
"insert txt ..."
android:padding=
"5dp"
android:textColorHint=
"@android:color/darker_gray"
android:textSize=
"15dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/imageView"
/>
<Button
android:id=
"@+id/save_button"
android:layout_width=
"93dp"
android:layout_height=
"53dp"
android:layout_marginStart=
"32dp"
android:layout_marginLeft=
"32dp"
android:layout_marginTop=
"8dp"
android:background=
"@drawable/bg_button"
android:gravity=
"center"
android:text=
"@string/save"
android:textColor=
"#FFFFFF"
android:textSize=
"20dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/imageView"
app:layout_constraintTop_toBottomOf=
"@+id/editText"
/>
<Button
android:id=
"@+id/back_button"
android:layout_width=
"93dp"
android:layout_height=
"53dp"
android:layout_marginTop=
"8dp"
android:layout_marginEnd=
"32dp"
android:layout_marginRight=
"32dp"
android:background=
"@drawable/bg_button"
android:gravity=
"center"
android:text=
"@string/back"
android:textColor=
"#FFFFFF"
android:textSize=
"20dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/imageView"
app:layout_constraintTop_toBottomOf=
"@+id/editText"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_choosing_pics.xml
View file @
f41c3748
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<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.ChoosingPicsFragment"
>
tools:context=
".MenuFeatures.Pics.ChoosingPicsFragment"
android:background=
"@drawable/main_bg_bright"
>
</FrameLayout>
\ No newline at end of file
<LinearLayout
android:layout_width=
"wrap_content"
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"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/cameraBtn"
android:background=
"@drawable/bg_button"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/camera"
android:textColor=
"@color/white"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:textSize=
"20dp"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_icon"
android:padding=
"10dp"
android:src=
"@drawable/camera"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/bg_button"
android:id=
"@+id/galleryBtn"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_button2"
android:gravity=
"center"
android:text=
"@string/gallery"
android:textColor=
"@color/white"
android:textSize=
"20dp"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/ic_gallery"
android:background=
"@drawable/bg_icon"
android:padding=
"10dp"
/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_noted_pics.xml
View file @
f41c3748
...
...
@@ -5,10 +5,4 @@
android:layout_height=
"match_parent"
tools:context=
".MenuFeatures.Pics.NotedPicsListFragment"
>
<!-- 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_record.xml
View file @
f41c3748
...
...
@@ -59,7 +59,7 @@
android:layout_alignBottom=
"@id/recordBtn"
android:layout_marginLeft=
"40dp"
android:layout_toRightOf=
"@id/recordBtn"
android:src=
"@drawable/list"
/>
android:src=
"@drawable/
ic_
list"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/player_sheet.xml
View file @
f41c3748
...
...
@@ -30,7 +30,7 @@
android:layout_weight=
"5"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
app:srcCompat=
"@drawable/music"
app:srcCompat=
"@drawable/
ic_
music"
tools:ignore=
"VectorDrawableCompat"
/>
<TextView
...
...
app/src/main/res/menu/bottom_nav_pic.xml
View file @
f41c3748
...
...
@@ -3,11 +3,11 @@
<item
android:id=
"@+id/navigation_picturedNoteList"
android:icon=
"@drawable/list"
android:icon=
"@drawable/
ic_
list"
android:title=
"@string/noted_pics"
/>
<item
android:id=
"@+id/navigation_choosePic"
android:icon=
"@drawable/
gallery
"
android:icon=
"@drawable/
ic_noted_pictures
"
android:title=
"@string/choosing_pics"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/drawer_menu.xml
View file @
f41c3748
...
...
@@ -15,7 +15,7 @@
android:title=
"@string/folders"
/>
<item
android:id=
"@+id/settings"
android:icon=
"@drawable/setting"
android:icon=
"@drawable/
ic_
setting"
android:title=
"@string/setting"
/>
<item
android:id=
"@+id/information"
...
...
app/src/main/res/values/strings.xml
View file @
f41c3748
...
...
@@ -25,4 +25,6 @@
<string
name=
"choosing_pics"
>
choosing pics
</string>
<string
name=
"navigation_drawer_open"
>
open
</string>
<string
name=
"navigation_drawer_close"
>
close
</string>
<string
name=
"back"
>
back
</string>
<string
name=
"save"
>
save
</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