[Q] Autocomplete list - Java for Android App Development

I need to make an autocomplete list of Chemicals and when you choose a chemical from the list it will put the chemical name into the autocompletetextview and put the corresponding weight of that chemical in an edittext. I'm unsure what is the best way of doing this is. I've tried using a customadapter but I don't think it will work. How can I have so choosing the chemical name from the autocomplete list will also choose the weight of that corresponding chemical. Any ideas would be great.

Related

Need help creating an excel mobile worksheet with a formula...

Hi all, I am becoming more 21C with my training (weights) and am looking to use my hd2 as a workout diary... I have tried mysport training and its ok, but as I have to enter all the info in (even the exercises in many cases) I figure excel will do the job and I can custom it to exactly my needs... however I have a small problem... I can make a formula in excel on the laptop and then clicking on the corner and dragging the cursor down I can apply that formula to all the cells that are highlighted... but I cant seem to do it on the hd2... can anyone help me out... the formula I am using multiplies two cells together (=b2*c2) and then when I highlight the other cells in the column it will multiply the relevant cells (b3*c3, b4*c4 etc) and show the totals... how do I do this on the hd2? would it be easier just doing it on the laptop and then transferring the worksheet to the hd2?
Anyone out there with knowledge of excel? Or do I have to just do it for every cell I want a total in... cheers
I could only do this in swype, but I suspect if you can figure out how to select multiple cells then it will work.
go to the cell you want to fill down, jump to the arrows page of swype, click the select text button(there is a make selection option in the excel menu but I couldn't make it work) with the text selection button pressed use the arrows to select the cell range to fill, chose menu edit fill.
Wouldn't copy and paste be able to do this?
Copy original cell with formula.
Paste to destination cell where you want new formula to appear.
It should reference to the appropriate cells as you desire.
Well, at least it's as easy as this on a PC.
warnold007 said:
Copy original cell with formula.
Paste to destination cell where you want new formula to appear.
Click to expand...
Click to collapse
except this would be one cell at a time,a real pain with 10+ cell....
I must say creating it on the pc sounds like the option id go for!
Thanks Samsamuel I dont have swype but will try it out a couple more times... everytime I select the column to paste the formula in it just comes up with NAME and some symbols in the top cell... will probably do it on the laptop then transfer...
*edit* ok... found out how to do what I wanted and how easy was it... sigh... I selected the cell with the formula, then copied and when it was stripey telling me it was copied I highlighted the column by clicking the D (in this case) and then paste from the menu and voila... it worked... thanks again Samsamuel for pointing the way...
*edit 2* ok... found that if you hold your finger down on the cell you first get a black square with a T in the middle then the menu will pop up a second later... I think the T is the thing Sam was talking about... it turns out that if you hold your finger on the screen till the T appears and then swipe the screen in which ever direction you want then it selects/highlights those cells... then you can paste the formula in them lickety split...
ahhh yes, move the finger when the the T is showing to select the cells. I was going past that to the menu. well spotted.

How to create main menu layout like Robo Defense?

First of all, I'm sorry if this is in the wrong section. I posted this to androidforums too but it seems the topic was complicated so people didn't even bother to answer my thread.
Hi, I'm new to android. I am used to code in C#, and I'm also developing an application for Windows Phone 7. I found out that creating a simple layout in android took a lot more of effort comparing to Windows Phone 7.
I'm going to create this main menu layout that looks similar to Robo Defense's main menu (the menu where you choose to start game, view achievement, etc).
note: I already added the landscape screen orientation and the fullscreen mode to the AndroidManifest. xml.
If you have already played robodefense, you can understand what menu that I'm talking about.
It was easy to create that kind of main menu in Windows Phone 7, but I had difficulties in Android when trying to design it from the main xml file.
I was thinking of using a LinearLayout, and then put a TextView inside the LinearLayout. And after that, I put a TableLayout for the buttons under the TextView. What bugs me is that the table didn't show up, only the text view was displayed.
Then I changed to using LinearLayout again but then put a TableLayout, then put the TextView inside the TableLayout (into a TableRow), hoping that it would be centered inside the table above the buttons. The result is still bad.
The "Title Bar" isn't centered inside the table, and the table layout creates a tablerow with two elements, one of which is empty, and the rows below it change their widths to fit the rows above them.
So that's it, i'm stuck here. What should I do? Any help is appreciated, thank you

[Q] Keypad entry for numeric field.

Hy,
As for my first app, I am trying to make a simple converter like app. The app isn't sophisticated, just need to enter a quantity in mass, a density and compute the resulting quantity in volume.
The main issue is to get a confortable UI, for touchscreen and soft keyboard devices.
As the entry only require numeric, I'd rather have a numeric keypad poping up rather than the complete alaphnumerical keyboard.
As for an example, I use 'currency converter' witch pop up exactly the good keypad for it's amount to convert.
So far I haven't found any documentation how to manage this behaviour.
I'd really appreciate any advise, link to a doc page or solution.
One thing to look at is:
http://developer.android.com/reference/android/text/InputType.html
In Eclipse:
-Open your layout xml file.
-Click on your EditText field and then go to properties.
-In the properties there is an 'Inputtype' field. If you click on the '...' button it will show you many options. This is where you define the field as 'number' or 'phone' and it will show the number keypad by default when you click on your field when using the app.
Let me know how it goes and if you have any other questions.
corruptor64 said:
One thing to look at is:
http://developer.android.com/reference/android/text/InputType.html
Click to expand...
Click to collapse
Thanks a lot.

[Q] Android Design Principles

Been looking over Android design principles, especially how you shouldn't have to do anything from a Context menu but its just a nice feature.
In other words, this says to me, everything is a child and if you drop down far enough, you should be able to delete the item.
Ok...
Then I got a problem.
I got a situation like:
Grandparent > Parent > Child
Each one is essentially in a list view, but in my situation, you cannot add the child until the parent is saved (Row Ids in a database and all that) and we really don't want to do any editing of the parent. But we have several actions we might like to accomplish - hold/freeze/extend... that kind of stuff.
Given that context menus aren't desirable, would we perhaps just put all the actions on the "Parent" activity with a link to the Child form?
I hope that makes sense?

[Q] list selector menu

I have designed a new menu for my app, that i think is more appealing than the regular android "six pack" menu and as such uses none of the menu xml attributes and is purely designed in the java and layout file.
However one of the options requires a list, and instead of bringing up an entire new activity, i would still like to use the sub menu list type, is it possible to do this from a onClick case? if not can anyone suggest an alternative way to get a similar result?
all help is much appreciated thanks

Categories

Resources