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'm creating an app, which can show the times of different cities. I have an api which takes coordinates and gives me something like - America/Chicago. But I want to show this on a Digital Clock. Can someone please tell me how to change the timezone of a DigitalClock, or make a custom one. I have no clue! Thanks for the help!
Android: DigitalClock remove seconds
customized digital clock in android
I assume you can then work out how much time to add/subtract from the system's time to show the destination's time.
Do you mean by like a digital clock as in a widget? You're going to need to give more information about it.
You can try doing a textview in an activity and set it to change every minute or hour by getting the time from this class
from Android API.
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 2 years ago.
Improve this question
I have a fast food app the one has to be disabled from 10.pm to 9.am, what I really need is to disable a button using UI local time format during that time and show an alert dialog base on the same principle I been searching for and nothing... please help and thanks.
You can get hour of the day using this:
int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
HOUR_OF_DAY will give you 24-hour time. Then just check something like this:
if (hour >= 22 && hour <= 9) button.setEnabled(false);
Now there are few options to disable the button. You can use:
setClickable(false)
setEnabled(false)
setOnClickListener(null)
Notice that if you setOnClickListener(null) then you need to set your listener again if the time is correct.
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 2 years ago.
Improve this question
I have 1000 images, each of them signifies a state at the time step. I would like to create an application that allows us to use a slider move through time steps, eventually being able also to see some information about what is going on in the image (like region size ect). I created the algorithm which creates generates and analyzes images in Python and I guess I will try to create UI in Java. Any recommendations on how to approach it? ( I am not very proficient in Java but I understand the basics). I attached the general view of what I want it to be below:
Try Tkinter, it is a very easy to use UI creator in python.
https://docs.python.org/3/library/tkinter.html
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 2 years ago.
Improve this question
I'm a little new to Android and want to build a note taking app.
I'm figuring out all the tiny little things, but can't seem to figure out this,how can I show my data in this manner. Please view image below.
Should I use Recycler view,card view for this? I mean what's the proper views I should be using ?
I need a bit of proper direction.
Any help is really appreciated.
Thank You.
Image
You need to add GridlayoutManager:
// this in Activity, getContext() in Fragment
recyclerView.setLayoutManager(new GridlayoutManager(this, 2));
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 8 years ago.
Improve this question
Basically what I am asking is how do games check what the user inputs all the time, not just when the user is asked to input an integer or a word but I am ALL the time.
Example: Runescape, Minecraft, WoW, any game developed that uses text based communication always has that function that if you type in the pretty box it spits out what you said in a world chat box, how do I do that as such (Not a world chat box) but simply a put out.
Simply put, by polling. Games use loops which run 20+ times a second and check for whether the user is causing input via keyboard/mouse.
There are hundreds of great tutorials
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 9 years ago.
Improve this question
I have near about 1 million entries in my database table and
I need to use some logic by which I can search within minimum time,
is there any algorithms or logic by which i can get result within less time.
I tried sorting table alphabetically but till it is taking much more time.
If you have any algorithm or logic then please suggest code in Java.
Looks like you need to ad in index to your database table.
If you tell what database you are using, people can give more specific help.
It dosent matter how much records you have as long as your databse is properly normalised and is having proper index. Having said that, the only difference that will make is how you are using indexes. You cannot do much in java, but your db and its design will play a significant role.