Calendar in Android with everyday choice button - java

I'm a begginer in Android development (Java language) and would gladly appreciate any advice on how to create my project. In this part, I would like to add buttons assessing user's mood (good, average, bad) so that everyday he can make such a choice. The choice would be saved in the calendar and seen as a appropriate background colour of a particular date.
For example, like here:
I would like to mark that way all days, colour depending on the choice made.
I tried implementing Caldroid, but apparently I do something wrong because it can't be read - tried to fix it numerous ways. So maybe some other solution?

Related

How to hide android keyboard's input field

Hi I am currently developing a game for android on unity. (2d game)
I've been looking for answers everywhere since a week but still no answer ... So I decided to ask here.
Actually my problem might be very simple but I am new to Android development and I had no idea of how it was walking.
1 - I want the input field right at the top of the keyboard to be hidden, to put a custom input field made with unity UI system.
2 - Adjust keyboard's position (Only for like 50px from the bottom of the screen) so that i can put my stuffs in there.
I get that keyboard appears automatically when an InputField is focused or selected. But it dosen't make disappear the input field from the native keyboard.
From what I learned serching , I get wether I need to make plugin for unity or export my unity project to eclipse to do so.
But unfortunetly I have no base on java or xml.
I should really learn at least basic skills on these stuffs but for now I can't afford to spend time to learn from base.
What would be the most easy way ?
Hope someone can help me out.
Thank you !
Maybe you can change the input field to just text,
And when you click on the text, show your own keyboard ui.
This is an alternative solution I think.

Date Time Picker like in Windows

I am looking for a component for Swing that would do the same thing that Windows 7 date and time pickers do (or be even better). They look so:
And have following features I need:
you cannot enter an invalid value (value is ignored as you type and not when you leave the field)
it allows continuous updating of the field until the first change made by user (take a look on the time setting in Windows 7)
you can select and change at once only one position - not the whole text at once (so colons and points cannot be removed)
up and down buttons
calendar button (but it's rather optional for me)
I have tried JSpinner with a DateEditor but it doesn't have this features. JXDatePicker only adds the calendar button.
Generally I am looking for a nice way to let user enter date and time in a powerful and simple way. Windows 7 solution seems to be quite good.
Thank you!
best and free DatePickers around are JXDatePicker and JCalendar, in both cases are there focus about correct implementations of Date and Focus workaround, and excelent Renderer and Editor for JTree / JTreeTable / JTable
to your needs ---> all these funcionalities are implemented by default, not clear from your questions exactly whats wrong, I'm Win7 and JXDatePicker and JCalendar but I never saw these issues,
in both cases you have to implementing own workaround for SpecialDays as hollydays (and etc),

How to Create a Java Quiz GUI?

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.

Working in java image

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.

Overriding AnalogClock in Android

I want to create an AnalogClock that can display a preset time, given as a parameter.
And I want to draw between the background and the hands. I want to paint the area between the minute-hand and location of the hour-hand at a preset future time. This is to let the user see how much time remains for the current activity.
I thought that I could take the AnalogClock object and extend that. However, when I create a new function that is essentially a copy of one of the old ones, I get errors on the com.android.internal.R.styleable.AnalogClock* objects: "com.android.internal.R cannot be resolved"
How can I import these objects? I've read something about declare-styleable, but I cannot figure out how to apply that to my situation. (Sorry, I'm really a Java n00b)
For instance, the internal objects refer to several graphical things, such as dials, hour_hand and minute_hands.
Here's my code: http://pastie.org/713276
Any help is very much appreciated, I am stuck after hours of Google.
Here is an tutorial for creating a custom Analog Clock. Shows some sample code, hope this is at least a start in the right direction.
Set time with custom android AnalogClock from its original class Please have a look at my solution. You can use it to display a custom analog clock in a application and set time that you want in it.

Categories

Resources