I have an idea for my application, but I don't how to go about implementing it. Basically, I have a chat application, but you're able to tell the application whether it's a happy or sad message. I drew it out to hopefully make it easier for you to understand. Can anyone provide me with any insight on creating this kind of effect?
Step one (Hidden):
Step two (User clicks face):
Step three (user clicks face and it disappears):
Try this library.
Tutorial here - http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Library here - https://github.com/lorensiuswlt/NewQuickAction
Use QuickActionController. Find the source of the Control at https://github.com/lorensiuswlt/NewQuickAction.
You just need to shift the position of display towards the right at quickaction UI class. Your requirement will be met.
Related
I added an image below to show what i am trying to achieve. I've seen similar implementations of this else where but isn't sure what it's called.
What it will do is when a box/panel/card on the left is clicked, a detailed panel on the right will be displayed, showing very detailed information. If a user simply wants to see a little more, an arrow or a "show more" hyper link will expand the panel/card to display more information.
I'm wondering if some sort of java plugin is already in existence which i can modify and utilize to fit my needs, instead of coding the entire thing from scratch.
If anyone has any idea of this, i would love to hear more! Thanks in advance!
Im using this library to create a gallery,and im kinda new to android programing but i want to add a listener to when the user swipe down the image it will be deleted.
thanks for the helpers,and if you didnt understood me tell me to rephrase.
Ok, since you haven't tried anything, and thus you don't have a specific question, all I can do is trying to point you in the right direction (I hope).
I suggest that you do the following:
1) Setup the library: take a look at the examples provided by FancyOverFlow.
2) Make sure that you understand what is going on about the code that you use, don't add code "just because it works". Do this as a rule of thumb for every code that you write. If you are using a 3rd party code library, you don't have to fully understand how every method works internally, but make sure that you understand in/outputs of the methods you are calling. Understanding how things work will make it much easier to modify your own code.
3) Find out which component has the hold of your current image in displayed gallery. This will be the control on which you will set up a swipe listener do detect user swipe moves. I haven't tested this, but I suspect taht in this case the component is called FancyCoverFlow (take a look at README.md file).
4) Take a look at Swipe Views (or any tutorial that does swiping) and adapt your code.
If you are new to Android, it may take a while, but don't give up!
I want to write an address in the address bar of a browser as well as click on a link using java Robot class. How can I track the different objects in a certain window?
Just giving a look at the API http://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html, anyone who do this should know that via Robot Class there is no "trackComponent(Component specificComponent)" method, you got 2 things that may help you:
1-getPixelColor (more than help, seems useless for you by now, maybe i'm wrong).
2-createScreenCapture.
the second method is maybe the answer for your problem, you could take a picture of the screen and with some image processor (javaCV could help you on this: https://code.google.com/p/javacv/) you could then track the components on the screen you took (for instance: from pixels xxx to pixels yyy is the Address bar of browser), of course you need to read some documentation about javaCV (OpenCV) for get this done, after that just use the method for move cursor and enter keys for fill the components, hope someone give a simpler way to do this, but i think this way you learn a bit of JavaCV a really powerful tool.
I would like to create a quiz for my Java GUI.
I'd like it to display a question on one page, then have a next button which takes the user to another page telling them if that question was correct or not, and if it is correct they can move on to the next question (by clicking another next button) and if they got it wrong, have to go back and answer it again. However I have no clue how to do this!!
So far I have a simple GUI with a welcome page and tabs down the side, one of which includes a quiz. Would it be a better idea to create the quiz in Flash or something and then embed it into my Java application? Or just do the whole thing in Java? I'm really new to java so I'm not at all sure what to do, any help would be greatly appreciated!
Thanks
It would be best to use just Java. Consider using CardLayout with your GUI to allow swapping questions, or else you can create and modify key components on the fly such as the text displayed by JLabels and JRadioButtons.
Key though before considering any GUI structures is to first create solid OOPS based non GUI classes to handle your questions. For instance, you may want classes for:
Question class that holds a question String, a List of possible answer Strings, a correct answer String. This class can randomly order the incorrect and correct answers, can have a method for checking if the answer selected is correct.
A Test class that holds a collection of questions, that can present questions in random order, that can hold the score obtained.
A QuestionReaderWriter class that can read and write questions to a text file (you definitely do not want to hard-code the question text).
For this type of app it would be best to use the language you are more familiar with.
Since this is just a simple display this then do that there really is nothing very difficult about it.
Personal, I would lean towards Flash as the flash IDE is drag and drop and an experienced flash guru could make this in a few hours. Flash IDE is geared towards this.
I will explain my question clearly.
I need to zoom in/zoom out the world map.
When I click on the particular country in map, control should redirected to new page with respective the country.
I dont have any idea about this in java. Please explain the steps to acheive the above task.
As the question is quite general, here is a general answer: Zooming often means, that you want to display a certain percentage of somethin, and not the whole, where your size of the displayed will not change.
But in your case it seems more like a "find a mouse click in a polygon" thing. So you have to add a selection/click listener to whatever widgets you use (Swt? swing? ....?) where you change what your program renders.
It sounds like you may be trying to reinvent the wheel. Google etc have already solved this problem rather well. It might be better to incorporate an existing solution into your application. Have a look at GoogleEarth inside Java Swing.