• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

borders  RSS feed

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there fellow Ranchers,

Anyone have any idea how to slowly draw a border around a textview?

the border would start at the middel top of the text view and slowly draw around the textView till it is complete.
The border also needs to rapidly change color while drawing and then turn solid white when it is done.
 
Marshal
Posts: 61777
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum.
That sounds a strange requirement, which will produce a peculiar appearance. It is usual to draw borders as the GUI s being painted the first time, and they don't usually change like that. What's a textview? It doesn't appear to be a class in the standard API. I would suggest you would have to work out the bounds of the component, and paint a line on its parent component around it, using a Swing timer to make it grow gradually. Try a timing pulse every 25ms. For different colours, try multiple lines on top of one another. Or a gradient paint.
If I were drawing a GUI, I wouldn't draw such a border myself.
 
Saloon Keeper
Posts: 5049
135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this once again an Android question? As I pointed out before, those should go into the Android forum.
 
Campbell Ritchie
Marshal
Posts: 61777
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . .  and if it is Android, then I know nothing about it, so ignore my previous post.
 
Jacques van Tonder
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't know where to post it? How was i supposed to know its android, i assumed it can be done using java itself.

Or is this java forum for the normal java only, not android devolopment using java?

I am consfused.
 
Campbell Ritchie
Marshal
Posts: 61777
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the module you are taking called? A lot of people think Android programming is simply Java® with a few tweaks, but it isn't really. That is why we have separate fora. We are always happy to tell people if the ask, and we occasionally get it wrong ourselves.
 
Jacques van Tonder
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So basically anything related to android goes to android forum.. Wether its a java question or not?
 
Marshal
Posts: 6265
420
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jacques van Tonder wrote:So basically anything related to android goes to android forum.. Wether its a java question or not?


Not really. Basically you need to judge your question yourself and come up with an answer. Other than that - moderators will assess and redirect you to a right forum. However, it is a nice thing to post in the right forum right away.

Now how you can assess yourself.

Some dummy intro story: "You are building an Android app, some kind of "Guess A Number" game".

Your question:
"How to iterate over a List to check whether the numbers match?"

Now, even though you are building an Android app, such question and possibly implementation would be the same irrespective of whether you build a desktop app, or text based app, or Android app.

One possible implementation might be:

So such question you post in Beginning Java forum as it fits all types of apps, and there is nothing specific about the particular technology, i.e. GUI: JavaFX, Swing, Android GUI.

If your question were: "How to retrieve a string value stored in resources file of Android application?"

It is clear, that such question and answer is not related to a console app (well, it can, but less likely). So you post in Android forum as it is really what it is the talk about.

Now your question about the TextView (<-- link) is clearly an Android thing, so to post such question in Beginning Java means expect that every Java developer knows Android - well, that's not true, in case of Campbell and myself (at least).

Some of the questions really fit to more than 1 forum, however, you can't post your question in more than 1 forum, that is might be a slight downside of our software, but moderators seeing such occasion would help out and duplicate discussion in the missing forum which fits the question too.

Such question might start...:
"I'm trying to create a method, which is looking whether the user is in a network. However, I don't seem to understand how to represent an IP address in Java and what to take into consideration when scanning network..."

So such question probably best would fit 2 forums right away: Java in General (as it isn't a beginners question) and Networking (from Engineering category).

Hope is clearer how to assess your question to which forum it fits better.
 
Jacques van Tonder
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay thank you and sorry Tim, I understand better now.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!