Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to create a tooltip like thing in Android to help show my users what something is, as people have told me they don't know what it is. For an idea of what i'm after here is a drawing:
This is the QuickAction UI pattern. Take a look at:
GreenDroid, a collection of Android widgets - namely the QuickAction... widgets such as QuickActionBar, QuickActionGrid etc
How to create a QuickAction dialog in Android
another alternative would be "super-tooltips":
https://github.com/nhaarman/supertooltips
here's a demo of it:
https://play.google.com/store/apps/details?id=com.haarman.supertooltips
There are several libraries available that will assist you in implementing tooltips in Android.
I recommend the Android Tooltip library which you can find on Github
Example usage:
Tooltip.make(this,
new Builder(101)
.anchor(aView, Gravity.BOTTOM)
.closePolicy(new ClosePolicy()
.insidePolicy(true, false)
.outsidePolicy(true, false), 3000)
.activateDelay(800)
.showDelay(300)
.text(R.string.hello_world)
.maxWidth(500)
.withArrow(true)
.withOverlay(true)
floatingAnimation(AnimationBuilder.DEFAULT)
.build()
).show();
For anyone just joining us from searching this.
This is a better Holo solution https://gist.github.com/romannurik/3982005
You could use android-formidable-validation's .betterSetError() feature, customising the ErrorPopup balloon's background drawable and the error exclamation mark icon that gets set as the drawableRight in the EditText. To fine tune to your requirements you'd need to play with the code that lays out the ErrorPopup.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
enter image description here
Is it possible to put a button in the table like the attached image?
NatTable is a custom painted table control. Putting real buttons in the table is possible, but actually does not really make sense and could even lead to resource issues in larger tables.
You can actually render anything if you have a corresponding painter. And for a button you of course also need the action binding. NatTable has the ButtonCellPainter to render a cell as a button. But actually the implementation to mimik the button press is a bit outdated IMHO. The corresponding example should give you an idea what you can do and how to do it.
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/tree/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/examples/_102_Configuration/Rendering_cells_as_a_link_and_button.java
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to place some images on a JPanel and make them "relocatable" so I can click on one of the images and move to somewhere else on the JPanel while holding the button. It works fine with one image but I just can't come up with a solution for more images than one. I have checked many examples and tried many different ways. If you have any idea please share with me. Thanks!
It works fine with one image but I just can't come up with a solution for more images than one.
You can use the Component Mover. You register the component with the class and then you can move any component.
Or if you don't need the full features of the ComponentMover class you can just use the basic listener for dragging a component.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I need to develop a Java programe using NetBeans. And In a JFrame I need to add a a image of planetary system and when the user sets a date and a time, Planets should rotate to their relevant positions. I don't have any idea about this yet. What is the possible way to do this? Please tell me soon
There are literally dozens of ways this might be achieved.
You could use:
Swing Timer
The Timing Framework
Trident
java-universal-tween-engine
The last three are animation engines. Personally, I use the Timing Framework, but that's more to do with what I'm familiar with and my needs at the time.
You'll probably need to do a lot of custom painting to get this to work, take a look at:
Custom Painting
2D Graphics
For more details
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to add emoji for a java swing chat application.But I couldn't success yet. Anyone helps me.Thank you.
There is no universal standard for a "smile" icon.
Chat clients that support smilies and other icons send a special code across the wire that the chat client interprets and renders as a smile.
You can take the same approach.
A simpler but more limited approach is to use the Unicode Emoticons (make sure they are properly rendered in your client app though, as not every platform properly renders every Unicode character.)
http://unicodeemoticons.com/
Easy.
Firts, you need print on screen the messages using a JEditorPane, this Swing Component allows you print images and text.
Display images using JEditorPane
The next step is create a "scanner method" to identify "Unicode Emoticons" like ':)' or ':P', etc. If the scanner identify a "unicode emoticon" change this characters for a string with the image corresponding.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to implement a game board in swing (needs to be a table, though about either jtable or gridlayout etc ...) where I will be able to drag and drop a picture on to this game board and all the cells that the picture fell on will get a notification that they were chosen.
Can anyone help with that? how do I get a couple of cells in a table know that an object was dropped on them?
Have a look at this tutorial.
I think you have to spent some time with Google. I found the following with a little time with Google.
Introduction to DnD
How to drag and drop with Java 2, Part 1
How to drag and drop with Java 2, Part 2
Drag and Drop Effects
Hope this helps :)
Read this and if you have an more specific questions come back and ask them.