I don't know if this has been asked before. I am going to be building a calculator for my dad. He asked me if there is any way to have customization with the buttons.
I have not done any code yet. I plan on trying a few things. My research has come up with nothing.
This is what I am trying to accomplish, I have a feeling it breaks the android studio law of coding. This is the concept:
Imagine the calculator. You have 8 blank buttons above the numbers. Those buttons ordinarily have the functions such as percent and sqrt.,..etc.
I have been asked if it's possible can he just hold the button and change those functions at will.
So the question at hand is. Can I do if statements to change the symbol and the code for a particular button when long pressed?
The concept of the calculator would be in portrait mode he can customize the buttons to the functions he uses without having to turn the calculator in landscape mode?
So in theory you have a long press which would bring up a selector. He can select any math function and based on that function the symbol and code would change and the button will work properly to the new selection?
I was going to to build the calculator as a standard. But was also wondering myself if this is possible. I know the buttons serve as a one function but in coding anything is possible.
Any help or advice would be appreciated. If this can be done it opens new possibilities to app features to only show what you want and not a predefined controls.
*******once I try a few codes I will edit question to better see the issue and what I am trying to do.
OnLongPress show a dialog with the option you want and change the button text according to selected option.
On Onclick check the button text and call function according to the text
Related
Current GUI with the buttons in question
My problem is that I need to prevent the user from clicking the Next Button when specific conditions are not met, I thought the best way for this would be to overwrite the onClickEvent for this Button but it seems impossible to the required field access to these buttons.
I looked through the available methods in the documentation as well as the source code but I was not able to find anything which would help to achieve my goal.
I need to create simple GUI using Nuklear and Java. I just need a couple of buttons and radio buttons. When I click on them, on the screen should appear short text. Unfortunately I found nothing about that on the Web.
It wouldn't be anything hard to do if I could using Swing or something like that, but Nuklear is necessary :/
Could anybody help me with that and explain/show example of one button in window?
Regards :)
I want to make a program that recognize a button that is in the League of Legends client, and when the queue's button shows up the mouse instantly click on it.
Its a sort of a AutoAccept Client...
There is already a program that someone did, but it has so many unnecessary things and it does not work very well....
How do I do to recognize a element inside a program to make my mouse move there when it shows up?
I can try to code this in any language, just gimme a tip pls
You can create a program that takes a screenshot every 100ms, use a recognition algorithm of your choice and then (optionally) performs a mouse click. There are enough libraries that can screenshot for you, you should be able to recognise the button by colour and location and every language should have some method of controlling the mouse.
Sikulix (can be paired with python) is a perfect tool to use for this. It scans over your screen constantly, and if the image in question pops up (the accept button) you can click on it.
You will have to take a screenshot and likely store it as .png so the program knows what it is looking for.
Google Sikulix.
I keep seeing "focused" and hearing about "focusing" within the development of Android apps. My question is: What is focusing, and how is it applied within Android apps? Is it important? What can you do with it?
I'm sorry if this has been asked, I looked but didn't see anything that clearly explained it. I've looked the the Android development guide, but I couldn't find a decent explanation of what it is and how it works.
Focus is simply giving a specific view "focus", or attention.
One example of using focus is if you have an EditTextView and you want a user to be able to type into it as soon as it is displayed, you would give focus to that EditTextView and the keyboard would automatically be displayed in accordance to typing in that view.
If you've ever used a blackberry and browsed the web via that, you'll remember that whenever you scroll the wheel you sort of select random elements on the page until you find what you want, then click enter. You know what element you're selecting when the elements change colors, or become focused. That's essentially what's happening with 'focused' on ANdroid, except it's mostly used for when you're scrolling via some kind of buttons, or when you select a textbox or something and it's waiting for input.
It is just referring to the view that is active. For example, if you have a TextView and it is the active view then it would be in focus
Simply put, an object/item that has the user's attention for interaction is focused. It is a state an item can be in.
Android Dev UI Events
Android has many useful tools when coming to views and screens and layouts.
Description: While playing my game (running around as a zombie bear eating humans) I would like to allow the player to access an items menu via sliding a menu from the right side/edge of the screen. Or at the least be able to access a game options menu (not game settings which would be the menu button).
What would be the best fit for description?
P.S How would I make a question like this less like a discussion and more like a straight forward programming question when I don't really know what's available to do this.
Also, if this is the case, please point me to another location to ask a question that may require a discussion.
Thank You!
Try looking at the SlidingDrawer class.
PS I personally don't see a problem with how you have worded your question if you are looking for ideas of views/widgets you need to perform a specific function/effect.
My first thought, and for a simple approach (this wouldn't be animated or dragged really), would be using a RelativeLayout where the portion representing the menu was initially set so that it's visibility were GONE, except for a small tab or arrow or something. When that tab/arrow is touched, the visibility of the View for the menu could be toggled to VISIBLE.
With visibility set to GONE, a view is not drawn or considered in any part of the layout pass when the screen is drawn.
You could populate a listview with some icons and when an particular icon is selected, then figure out which one was selected and then execute some function and hide the sidebar using an animation. I've never developed a game, so I'm not too sure how far it deviates from the standard, but I wish you the best of luck :) ! If you post the source let me know would love to test your game and see how you work with the source!