Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-129
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-129
2021-129
Commits
2547873d
Commit
2547873d
authored
Nov 25, 2021
by
dilshan-98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code clean
parent
cb67cde4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
31 deletions
+3
-31
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/BackgroundCustomization.java
...tphotoeditor/ImageProcessing/BackgroundCustomization.java
+3
-27
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/Backgroundupload.java
...pp/smartphotoeditor/ImageProcessing/Backgroundupload.java
+0
-2
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/Selectedit.java
.../com/app/smartphotoeditor/ImageProcessing/Selectedit.java
+0
-2
No files found.
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/BackgroundCustomization.java
View file @
2547873d
...
...
@@ -70,23 +70,11 @@ public class BackgroundCustomization extends AppCompatActivity
btnedit
=
(
Button
)
findViewById
(
R
.
id
.
btnedit
);
image
=
findViewById
(
R
.
id
.
img
);
//displayFileChoose();
btnedit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
// if(filePath==null)
// {
//Toast.makeText(BackgroundCustomization.this,"Select An Image", Toast.LENGTH_LONG).show();
//}else{
//****
progress
=
new
ProgressDialog
(
BackgroundCustomization
.
this
);
progress
.
setTitle
(
"Uploading"
);
progress
.
setMessage
(
"Please Wait..."
);
...
...
@@ -101,10 +89,6 @@ public class BackgroundCustomization extends AppCompatActivity
try
{
//if(fileExtn.equals("img") || fileExtn.equals("jpg") || fileExtn.equals("jpeg") || fileExtn.equals("gif") || fileExtn.equals("png")) {
//Toast.makeText(BackgroundCustomization.this, filePath, Toast.LENGTH_SHORT).show();
Thread
t
=
new
Thread
(
new
Runnable
()
{
@Override
...
...
@@ -113,20 +97,15 @@ public class BackgroundCustomization extends AppCompatActivity
//To upload the image to server
String
input
=
convert
(
ImageList
.
getInstance
().
getCurrentBitmap
());
System
.
out
.
println
(
input
);
//File file = new File(f_path);
//String content_type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(f_extension);
OkHttpClient
okHttpClient
=
new
OkHttpClient
().
newBuilder
()
.
connectTimeout
(
320
,
TimeUnit
.
SECONDS
)
.
readTimeout
(
320
,
TimeUnit
.
SECONDS
)
.
writeTimeout
(
320
,
TimeUnit
.
SECONDS
)
.
build
();
//RequestBody file_body = RequestBody.create(MediaType.parse(content_type), file);
RequestBody
request_body
=
new
FormBody
.
Builder
()
.
add
(
"image"
,
input
)
//.addFormDataPart("image", f_path.substring(f_path.lastIndexOf("/") +1), file_body)
.
build
();
Request
request
=
new
Request
.
Builder
()
...
...
@@ -150,14 +129,11 @@ public class BackgroundCustomization extends AppCompatActivity
}
});
t
.
start
();
//}else
//{
//}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//******
//}
}
}
});
...
...
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/Backgroundupload.java
View file @
2547873d
...
...
@@ -136,8 +136,6 @@ public class Backgroundupload extends AppCompatActivity {
public
void
onResponse
(
Call
<
ResponseBody
>
call
,
retrofit2
.
Response
<
ResponseBody
>
response
)
{
try
{
//String s = response.body().string();
//Toast.makeText(Backgroundupload.this, s, Toast.LENGTH_LONG).show();
progress
.
dismiss
();
openCutActivity
();
}
catch
(
Exception
e
)
{
...
...
app/src/main/java/com/app/smartphotoeditor/ImageProcessing/Selectedit.java
View file @
2547873d
...
...
@@ -125,8 +125,6 @@ public class Selectedit extends AppCompatActivity {
@Override
public
void
onResponse
(
Call
<
ResponseBody
>
call
,
Response
<
ResponseBody
>
response
)
{
try
{
//String s = response.body().string();
//Toast.makeText(Selectedit.this, s, Toast.LENGTH_LONG).show();
progress
.
dismiss
();
openBokehActivity
();
}
catch
(
Exception
e
)
{
...
...
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