I'm working on a game which integrates Facebook. In a certain scene, the user can choose an opponent from the list of Facebook friends who have installed the game.
I want to create this menu of friends, I know how to create the list, I know how to get the friends who have the app installed, and how to get their info. What I don't know, is how to create a sprite, which would have, for example, the user's profile image on the left, his name and score on the right, and to have this whole thing act as a sprite (or a SpriteButton)
Can anyone point me to the right direction?
Since I obtain the info from Facebook, I can't, obviously, have the Sprites pre-made.
Any help would be great!
You shouldn't use AndEngine entities for this, as there is nothing ready to suit your needs (You'll have to make this on your own).
Instead, use the regular android dialogs. You can use your own layout which consists the profile picture and any other text you want.
Related
I am new to programming and have only made a few small apps for fun. I am trying to find out how to make an overlay on top of EVERYTHING on my Samsung S8 device (API version 26+).
What I want is to create something like the "Blue light filter" that already exists, however I want to change that filter to make it whatever I want. I am pretty sure I would know how to customise it and stuff like that. Currently the filter is orangey, what if I wanted to make it purple or black?
So my main issue is: I have no idea how to make an image, or a piece of text or anything, always be on top of everything that I do. I want to open up the app, change the filter colour, and for that filter to always be on, on top of any other app. I want to be able to minimise that app and for that filter to always stay. Can I call it a System Overlay or something like that?
I am just learning AWT / Swift / JavaFx recently and I feel like I have learned a lot but have barely scratched the surface. There might be a much easier way to do this BUT, I am trying to make a GUI button in eclipse that calculates the distance between two objects that the user creates. Lets call them Robots for now. So, I have one button that allows the user to create the Robots and it stores them in a DefaultListModel (listModel) and displays them in a Jlist (list) below the buttons. When the user then clicks on a robot, another button becomes actice and allows them to calculate the distance between them (one of the parameters of the robots is their location on a grid). I have all that worked out but my problem is that I am trying to make it to where they have to select two different Robots. At first I thought I could let them select two Robots and then make the computeDistance button becomes active, but I am not really sure how to do that because the only way I can select more than one object in the JList is to cntrl click and I don't want the user to have to know that trick.
My next idea was to allow the user to have one Robot selected and then give them a popup window displaying the other Robots and have them select one. Via showOptionsDialog, I have discovered how to make a custom JOptionPane, so I thought, why not make them buttons (probably will look awful, but I don't know how to make anything other than JOptionPane.showXxx at this point (like I said, only skin deep so far). Have tried consulting the javadocs, but right now that is a LOTTT to take in and have read a decent amount, I thought.
Ok, sorry if this is long, but is there a way, using my DefaultListMethod to make custom buttons? I tried a bunch of ways by creating Object[] options = {list.elements()}; etc but that doesn't work. Any help would be much appreciated!
I'm currently building a small game for Android using LibGdx in Android Studio. In the game the player uses the on-screen keyboard to enter different letters one by one.
My problem is that the autocomplete is one (since I use it when I'm texting) and this forces the player to click the "suggestion box" after every typed letter to actually make sure that the keyboard press and character input is registered. Since the input in my game should be one letter at a time I don't want autocomplete to try to "guess"/create a word.
I'm using the InputProcessor class with the "keyTyped(char character)" function. If I turn of the auto complete in phone settings (manually before starting the game) the input is registered and the correct character is passed in.
So, my question is if there is any way to turn off/toggle autocomplete programmatically?
Thanks in advance!
I realise this is old but if you or anyone else is looking for a way to do this then I have a solution. I built a completely new method for Android soft keyboard input to tackle the issues involved with the current libgdx methods. I am surprised to read auto-complete was actually working for you, because on all my testing devices it does not, and this is one of the problems I have attempted to solve.
I have built a sample project for people to work with that allows for much more reliable input using the Android soft keyboard, this includes swype, auto-correct, dictionary, etc. What you may be interested in is I have also included some customisation for the keyboard, such as the ability to disable auto-complete and suggestions. You would simply customise your TextFieldStyle with;
textFieldStyle.androidKeyboardAutoCorrect = false;
textFieldStyle.androidKeyboardTextSuggestions = false;
As of posting, no one has used this sample project and I have only tested on a few devices, so it may be a little erroneous. I will carry on maintaining it when/if feedback is received.
You can find it on Github here (source and executable apk)
If you have any comments/feedback please refer to Github or the badlogic forum topic
Hope this helps!
pretty simple question here but I cant seem to find anything. Anyway, There is a game on android and with a keyboard you can enter a cheat id like to use(personal use not uploading to market) . Well I created a static button that remains on-top of all activities. Id like to just click my button and have it paste the word to the game so the cheat will be entered. Anyway to paste onclick? I cant see this being hard
You can't make other apps behave in a different way than they do as it violates the whole sandboxing idea of android (unless of course the app itself allows it in some way or another) .
What you can do is to copy the content to the clipboard , and allow the user to paste it anywhere he can .
More info about it here:
http://developer.android.com/guide/topics/text/copy-paste.html
There might be root solution , but like many root operations , i really lacks this knowledge of how to do it.
Is there any material/tutorials available that can shed some light on creating drap and drop widgets with Java 2D? I am not talking about drag and drop data transfer like here. What I want to do is have a visual pane in my application, where users can create widgets, connect them to each other etc. Something like a creating a graph, but with widgets that have properties.
Thanks.
This is generally works like this:
When a user presses the mouse button your application goes to a "drag" mode
When repaint() method is called while you're in drag mode you move your widget position to the coordinates of the cursor
When mouse button is released you fixate the ultimate position of the windget.
The simple illustration for this might be a program I was writing in my youth - interactive chess board. Here is relevant class that includes pieces dragging capabilities http://jinyan.svn.sourceforge.net/viewvc/jinyan/trunk/jinyan/client/src/net/sfficslecview/lvboard/EditableChessBoard.java?revision=77&view=markup
I have found the perfect solution. I can make use of the Netbeans Visual Library by extracting jar from the Netbeans Platform.