Duc Ta

Ranch Hand
+ Follow
since Apr 23, 2017
Merit badge: grant badges
For More
Vietnam
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
8
Received in last 30 days
0
Total given
64
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Duc Ta

Hi guys,
I am an Android developer with 6 years experience,
I am now working as Team Leader for small team (super Android team of 5 members)
I would like to try myself in new work as freelancer, working at home
Or I can lead my team to create Android applications follow the requirement, design.
If you want to know clearly me and our team, please contact me according to my email: ductv53@gmail.com

Thanks for reading!
3 years ago
Dear Android developers,

I need your help to solve the problem:
I have written code below:




When I run the activity, the result not as expectation:

https://imgur.com/5pq8Etw


My expectation is that all radiobutton is in the center of their view (not an the left view as the picture shown above)

Thanks,
3 years ago

Tim Moores wrote:So the question is not about the lifecycle at all, but about how you can persist drawing actions? You can either keep track of the drawing steps as they happen, store them, and redo them step by step once the widget gets recreated, or store the canvas in onPause as a bitmap, and draw that on the canvas in onCreate.



Yeap,
How can I can save and restore stroke I have been drawn on the canvas view?
I have try some methods, but the result not as I expect!

2 small questions I hope you can help me:
1. Which method you use to save drawn line?
2. When you open app from widget, which method you use to re-load drawn line?

Thanks for your helping with all of my grateful !!
3 years ago

Tim Moores wrote:I don't understand why onDestroy not being called would be a problem (you should do housekeeping in onPause or onStop), but check out https://developer.android.com/guide/components/activities/activity-lifecycle to understand why it may not be called right away.



I am making a drawing note app, using paint, canvas on the activity.
I am in activity, then I back to widget of this app.
Then I click to widget to back to app --> an intent must be called (Intent, PendingIntent) --> onCreate() callback of the activity is called --> the old data is erased
I would like to retrieve paint, so what can I do?

Thanks for your helping!
3 years ago
Dear android developers,
I am make an app that support widget.
When I am in the MainActivity, I have press to back on soft keyboard, the activity is in background, then widget is display (to show update view)
Then, I back to MainActivity, onCreate() method is called.
I do not know why?
Before back to home to see the update on widget, I have seen log --> only onStop() and onPause () are called, not call onDestroy()

Can anyone answer my question?

Thanks all!
3 years ago
Dear all Android developers,
I have an issue that
When I open a canvas application, I draw some paints on this canvas
Then I quit the app. After that, I open the app again
As the result, all paints I drawn before is clear.
So how can I retrieve all the paints I have drawn before?

Thanks all for your helping!
3 years ago
Dears guys,
How can I change number of grid in app launcher
For example, I have used a tablet, 5x6 is the number of grid on tablet's screen. I need increase number of grid (10x12). How can I do that?
Thanks all of you!
3 years ago

Tim Moores wrote:Nobody here is going to write code for you. But feel free to post the code you have, and we will take a look and try to help. Also tell us why you think it would be legally OK to scrape that site.



I agree with you

I have written 2 class as below:



and



When I run my code

Error as below:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/ssl/TrustStrategy
at crawl.Controller.main(Controller.java:19)
Caused by: java.lang.ClassNotFoundException: org.apache.http.ssl.TrustStrategy
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more




I have searched on the internet to solve this issue, but it is not resolved.
Can anyone help me to solve it?
3 years ago
Hi guys,
I need source code to crawl 10.000 article from a website ( https://baomoi.com/)
I have run, but my code is already failed.
I tried to fix my source code but, code is not run

Please give me the code! Deadline is coming soon.
Thanks for all your helps!
3 years ago
Hey guys,
Can anyone help me to write regex to match with String below:

24/02/2019 10:46



for mat date time is DD/MM/YYYY HH:MM

This is urgent task of mine. I have searched it but no expected result.
Please help me
4 years ago
Hey guys,
I have some problems when using crawler4j
I have used crawler4j to crawl data from website. This library run smoothly, but when I check the output file which saved text crawled from a website.
There is 2 big problems that now I can not solve.
1. Too many space in an article
- The origin source there is no space between line of text, as the picture below:
https://static.atonline.net/private/zPyXVxBfj7Hz_pbHrqkK0g5lBbNdj83oU8FTScxXb30hnJW4Jvd9o2RiiNbEcKq6/Screen%20Shot%202019-05-26%20at%2001.03.43.png

- However, in the output file, there is too many redundant line and space, as the picture below:
https://static.atonline.net/private/xLj2EE-G5TMeLG-9vJzp9pjUWfXIKrGy_maiPUiLqGuIYlabIlsK7JO67AX4mldO/Screen%20Shot%202019-05-26%20at%2001.07.24.png

2. In origin source, sentences in an article are separated clearly. However, in output file, sentences is sometime not separated.
For example:
- Origin source:

Nam ca sĩ Tuấn Hưng nổi tiếng từ năm 2005. Nam ca sĩ của Tìm lại bầu trời vẫn nổi tiếng tới bây giờ



- The output file:

Nam ca sĩ Tuấn Hưng nổi tiếng từ năm 2005Nam ca sĩ của Tìm lại bầu trời vẫn nổi tiếng tới bây giờ



I do not know how to solve 2 big problems above.
Can anyone help me?



4 years ago

Carey Brown wrote:
Different constructor. Notice additional argument.



The program run properly
Thanks you alots
5 years ago
Hey guys,
I have used crawler4j for crawling data.
The input is a URL
The output is a file which save URLs and content articles.
I would like to append after each URL and content article, I have tried but only one URL and only one article are saved on the file.
The code as below:





Can any pro help me?
5 years ago