How to display a simple monthly calendar - java

I am building an Android app and I need to show a very simple monthly calendar (with next and previous month links). And, if possible, display events on some days.
I have search, high and low, for a solution but found nothing.
IsnĀ“t there a very simple way of doing this? All the widgets I find got too much features.

Check out this library:
https://github.com/derekbrameyer/android-betterpickers
I currently use it to show a monthly calendar. it looks good, clean and is extremely easy to implement in an application.

I am not sure if this helps but maybe consider using a DatePickerDialog and put it into a DialogFragment, while making sure to use the CalendarView... all of which is native to the Android SDK so it's a piece of cake to implement.
Also I have heard of a GitHub Library available called DateTimePicker, you can find more information here https://github.com/tarruda/bootstrap-datetimepicker ... it might be a little harder to configure for your exact needs but it's probably worth a look.

Related

How to add a calender view to android app and populate it with events?

I am new to android and trying to make a android to learn different features and functions. I wanted to make a app which has a CalendarView and a list view which allows users to add their events and it'll show up on the calendar in the ListView. I do not where and or how to begin, I tried searching for tutorials on the youtube but could not find anything relevant, maybe I am searching for the wrong things. Could someone please guide me as to where I can look and whether they know tutorials I can look at, all I need for know is something pretty simple (well, I say simple.. but it seems very complicated!), a app which has a calendar and a ListView, when user adds events they show up on both.
I hope I am making sense of myself as I am pretty lost and that someone could point me to the right directions (hopefully a tutorial or something). The thought of it seemed easier but when I sat down to do it, I literally don't know where to begin.
Here is a Link to a stackoverflow question about costum calender views Custom Android calendarView
You can use some project from github for example this one https://github.com/SundeepK/CompactCalendarView by this project you can populate calendar with events

Optimal camera focus mode android java

I have android application that use the phone camera.
First the camera opened, I want to try to use "Autofocus" mode and "Macro" mode and choose by code the best focus that I get.
I would like to ask 2 things:
Is there an internal parameter that give the focus score?
Is there a known algorithm that gives the focus score(the algorithm should not be complex, because I do it in real time on 1080p video).
I know a bunch of links is not usually helpful, but I don't have time to go through all the pages. I figure something is better than nothing :)
This is the link for the android.hardware.camera2.params package summary. I wasn't able to find anything like what you are looking for, but that's a good place to start.
Another person had a similar question on the Android Enthusiasts SE site: Can I manually focus the camera on my Android phone?
And last, but not least: There seems to be quite a bit of relevant info at the XDA Developers forum.
Good Luck! I'm a photographer myself, so this seems like an interesting project.

How to detect volume buttons when screen is off in energy-saving way

I would make an application that handle the volume buttons when screen is off. The goal would be to turn on or off the front LED.
I know that there many topics here that talk about it, but the recommended solutions (like PARTIAL_WAKE_LOCK) seem to be energy intensive and drain the battery very quickly!
What I want is a solution that is as energy efficient as possible. Is this possible? Maybe some kind of hooking?
Please note that the solutions based on scheduled tasks can not be envisaged for this project because I want detect keys in real time (or close to it)!
Take a look at this question.. if you already haven't ..
Just to make one thing clear. If something is not documented in API docs of android then any hack or workaround you find won't be reliable as Google may decide to change things in future releases, for example there is nothing documented about creating shortcuts after the app is installed ! But Since Android source code is available, developers took that piece of code as how was playstore creating shortcuts.. but its not documented so Google may change it in future !

Implement iOS like time picker in Android

I'm looking to implement a time picker like below in Android.
I've already looked at http://tolkianaa.blogspot.mx/2012/04/how-to-use-android-wheel-part-ii.html but he has multiple xml files and multiple classes seemingly so I can't see how thats going to work. (Am I missing something?)
I have android-wheel installed so this question is useless Replicating the iOS time picker in Android
The demos from android wheel don't seem to really accommodate it.
Anyway, does anyone have a better way of implementing this is android?
You should have a look at the AOSP source code, a clock app is included I think it is the default one that is shipped with ICS & JB (but I have not compiled it to verify).
Also, the official website always have some useful info, you should try to start with this widget. The illustration seems to indicate that it uses buttons instead of swiping, which is strange but even if it is the case it will be a good start to implement a swiping version of this widget.
#Lokesh's link also seems to also fit your needs.

I have got my HelloListView app working from android.com what is the best way to add information

I wanted to make an app that you can select a country and it comes up with information about the country. I don't know that much about Java i'm hoping that this will help me learn more about java.
I would like this to be an android app
please help me
thanks
CS
edit: I am new to java so can you help me out and give me pointers on how to do this please.
Example: Lets say we have a listview that has the United States, Germany, and the UK
I already have the list view set up. How would i go about making a second view that would let me select the us and give basic information about it?
Unfortunately I am still a little unclear as to what you are asking but as far as I am aware the list view you create should be able handle clicks on it, so if you check out the ListView class in the android SDK there you will need to look for the onClick event you are after. Overload it and put in the code to create (I think you are asking for this) a second activity, to then show your selection. However that might be a bit complex so try and handle the click event first by perhaps a toast message. Then work your way up.
The second activity you could use to show information, or just create a dialog, or another full screen view to show the info.
I commend you for getting ListView to work without knowing Java. I would suggest you learn the language first before jumping into Android apps because the development resources assume that you have a good knowledge of the Java. There are lots of resources on the web for learning Java and you can do it all in the Eclipse environment if you wish.
Good luck!

Categories