Ask user to input date in Eclipse - android

I am very new to Eclipse, and I am trying to make a basic diary as an android application project. I want to ask user to input the date using a date picker and save it in a variable(s). Please guide me how to achieve it? Thank you so much.
I tried in google but did not find precisely what I am looking for.

Assuming that you are using Eclipse to develop Java-Applications. (well you tagged android =) )
Check the DatePicker-class
http://developer.android.com/reference/android/widget/DatePicker.html
Here you got a small Example on How to use it:
http://www.tutorialspoint.com/android/android_datepicker_control.htm
I hope that i understood your question right and you´re helped for now ;)

Related

Android (Xamarin) calendar with highlighted days and click events

I'm trying to code a calendar page that highlights certain days with events on them. The calendar also needs to be able to disable certain dates from being clicked, such that the user is unable to select those dates. The designs of the calendar page are as follows:
I've looked for tutorials but was unable to find any that fits the requirements of my app, without using a library. Is there really no way to achieve this without the use of a library? And if I do have to use a library, how should I go about integrating it in this Xamarin application?
Any help or advice to point me in the right direction would be greatly appreciated. Thanks!
Your requirements can take time to implement, using a 3rd-party Library is what you might be looking for.
This library: XamForms.Controls.Calendar has some great controls as what I can see will suit your needs, over all it has a great documentation so give it a try!
Did you try the below link ?
https://github.com/rebeccaXam/XamForms.Controls.Calendar
There other UI library controls which you might be interested in
Xuni http://www.goxuni.com/672835-a-deep-look-at-the-new-xuni-calendar-control/
Syncfusion https://help.syncfusion.com/xamarin/sfcalendar/getting-started
Telerik http://www.telerik.com/xamarin-ui/calendar
I have created a custom calendar earlier which is very simple and show Month and Year view.You could give it a try.
You can check out the code from here:
https://github.com/bhavya27/BXCalendar
Blog: https://medium.com/#bhavyajoshi2793/custom-calendar-in-xamarin-for-android-ios-windows-578f1136daec

How do you make a pattern lockscreen in android studio?

I was just wondering if anyone could help me with this problem. I am trying to make a pattern lockscreen for my app in android studio, but I can't find the code anywhere and I can't find any video tutorials telling me how to make one. I am new to android studio and I am trying to make a simple app that just stores the user data and I am basically done with it, I just need a lockscreen. Thank you everyone for taking the time to read this, and also extra thanks for helping me out!
There is an implementation on GitHub. Or you can implement your own customview based on the code.

Replicating the iOS time picker in Android

I'm trying to write an app that would use the timepicker in Android, but I really would like to implement the one from iOS.
I've had a couple of leads, but haven't struck anything that has worked for me.
My problem is that the time picker is for time but I want to use mine for three different number values that can be chosen (no am/pm) so it seems like Pickers are the way to go, except that they were introduced in API 11.
I've found this blog that seems to give you some code for it, but I wasn't able to get it to work.
I also found android-wheel, but I don't know how to get the source for it. Can anyone steer me in the right direction for it?
The iOS timepicker looks like this:
Android wheel looks like this:
But, I haven't been able to figure out how to get the code for it.
The code is in the google code project - https://code.google.com/p/android-wheel/source/browse/
Download the source code from below link for various wheel example:
http://android-wheel.googlecode.com/svn/trunk/
Make sure that you have the svn plugins for download.
Thanks.

Android equivalent to Java's Swing JSpinner

I want to use a control similar to Swing JSpinner in an Android application. I know that Android has a widget called Spinner, but it's more like a combo box than a JSpinner. I've noticed that DatePicker and TimePicker widgets are using components that are just like JSpinner. The only problem is that I don't really want Date or Time. I just want to get some integer, say from 1 to 50, that user chooses. Is this possible? I've searched Android API reference in and out, but I couldn't find any clue on how to do this. Any help or hint would be much appreciated.
Thanks,
Tomislav
Well, the functionality for the TimePicker is provided by a hidden internal class named NumberPicker, which would probably be exactly what you wanted if only the folks at Google had made it available.
You might want to go to the android source code and lookup the source to android.widget.NumberPicker in the frameworks/base repository. (The repository treats it as if it were a publicly available class, though I see no sign of it in the released dev jars.)
I stole the spinner from Astrid, which stole it from Android's source.
Take a gander here:
http://github.com/ralphleon/TeaTimer/tree/master/src/goo/TeaTimer/widget/
Though my app is GPL, the number picker code is under the permissive Apache license!

calendar code required

Where can I get code to generate a calendar which displays dates in a proper grid?
Or can I get code for a calendar app so that I can make a few changes to it? It will help ma save a lot of time.
See my question (Link below). If you plan to use the existing code and slap some stuff on it then you are in for disappointment. Nevertheless, it's a great experience looking at these codes. Try it out.
How can I check out Android source code in Windows OS?

Categories

Resources