This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

gridlines in the surfaceview how to? - SOLVED

 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
i have searched but could not find any solution (probably searching wrong keywords)
Anyway, i want to know that how can i draw grid lines in camera view. Please check following image.

Thanks for any advise.

My code is below

MainActivity


and my CameraShow class is
sample.png
[Thumbnail for sample.png]
 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally found the solution after couple of hours of search.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ibrahim yener wrote:I finally found the solution after couple of hours of search.

I'm happy to hear you found the solution. It's helpful when this happens to reply to your own post with the solution rather than editing it as solved. (We will check it off as solved so it will get the dot in the icon and page title.) This helps it be clear to see the original question and the solution.
 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jeanne
Sorry for that, i completely forgot it.

Here is the solution:
I've just added following code into my constructor, that's all.

this.setWillNotDraw(false);
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!