[Q] Spinner help, Eclipses throwing errors! - Android Software Development

I'm having trouble populating my Spinner, so I'm using the tutorial on Google website,
http://developer.android.com/resources/tutorials/views/hello-spinner.html
When I get to part 4, and I put the code in the the java folder, a bunch of red X's pop up, giving me errors.
My questions is do I delete everything in the oncreate () .jave file and insert the code from Googles site? When I do it give me errors, this is what happens,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm know my coding is wrong, can anybody point me in the right direction?

Hold your mouse over that first "Spinner" that is underlined....I bet you get a hint

You're missing a closing '}' tag at the end, it looks like your missing a spinner called "spinner" in your main.xml and it looks like you've not imported 'Spinner' or 'ArrayAdapter'.

I do have a Spinner in my main.xl, I don't have an arrayadapter though

Ok, I fixed 2 parts of the Spinner issue in the first error line,
I imported a Spinner like Root said, than the second error was it was looking for:
findViewById(R.id.spinner);
Than I realize my spinner is not called 'spinner', it was 'spinner1", so I put the 1 on and the error when away.
Now my next issue is the arrary adapter. I know I don't have one in my main.xml, but based on how far im in the tutorial I havent gotten to the part yet which is #5.
EDIT: It's telling me to "Now create a nested class that implements AdapterView.OnItemSelectedListener. This will provide a callback method that will notify your application when an item has been selected from the Spinner."
Where do I implement that?

Bump, please!

Related

(missed) screenshots from Microsoft

I found some original screenshots on Microsoft page:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
WHAT'S UP!? what's it?
Windows Mobile notification inside my device looks different?
why?
did I missed something? or someone....
That looks nice. What's the link?
V
linked directly
I linked pictures directly, see pictures properties
@JGUI: He was probably asking for the link to the HTML page which originally embeds those images.
http://www.microsoft.com/windowsmobile/press/imagegallery/default.mspx
http://www.microsoft.com/windowsmobile/press/imagegallery/customization.mspx
Saw that when I tried finding the Windows Mobile boot splash that had the progress bar on it a while ago. Ended up not finding that one, btw... if anybody knows where that went..
Why did you actually attach the same screenshot twice?
fixed, thanks for announce
I must say it looks very appealling to me. I wonder why they're there.. Should I try to create a today theme based on it?
i think, that it is just a fake of WM5 theme.
Look at the fonts and stuff.. positions of the soft buttons text..
hmm.. i don't know.
buzz
yih.. one of those "you *could* do this with customizations... (smallprint: if you want to spend a lot of time and money fighting our API and whatnot)
Notification bubbles are just HTML, so they could be real, but it would require access to the source code, so I imagine that bit is a Microsoft only level customisation. I've not investigated but I haven't seen any way of applying a user defiend template to notifications - but as each app is responsible for the look of its own notification, I'm doubtful.
That's not to say it's not possible to hack the system to intercept notifications and re-write them.
V

[Q] [BUG] honeysmartdroid window

Hello,
I found a bug in the (honeysmartdroid rom) and since I can't post it in the development thread (because of less than 10 posts) I'm posting it here hoping someone can help me.
The problem is this, when I want to use my banks app I have to fill in my card number by spinning wheels, but the window is to small in the rom so can't enter the last number.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This also occurs with the date of birth, there also the last number is missing (you only see 199 and 198 etc.) but there I can spin it and guess wich 199 year i'm at.
So my question is:
Does someone know an easy way to fix this?
and if this isn't in the right place how do I get it there?
First of all, if you posted anywhere else but here or even better, Q&A, the thread would be closed.
As for your problem, to me it looks like a resize problem. Best thing you can do is message memnoc, attach those images and wait.
And yes, there is an easy fix for that. Flash another ROM.
EDIT: And frankly it isn't that hard to guess which year it is. If the last one 198 and the one above is 199, it's only reasonable to conclude that its 1989 and 1990. So from there I think it should be more then easy.
thanks, I wil send a message to memnoc. And like I said the problem was with entering bij bank card number (ends with 3 numbers and I can only enter 2), not with the year. That was just extra as an example.

Help plz

I have an android app.I have a preference in my app which allows a user to enter his desired storage location for video recording it can be internal or external now the question is how can i determine if the user has entered the correct storage location path if he didnt enter the right path then how to show a toast and reset the path.
This is the preference
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the editext
Now if the user enters wrong path for example there are spaces in the path or the path is incorrect for video recording how can i check that
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
zalez said:
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
Click to expand...
Click to collapse
Yep, and when is it the "right" path?
The right oath is where a video recording file can be created it can be internal or external
If you've got a file object, you could check these:
Code:
boolean isFile = myFile.isFile();
boolean isDirectory = myFile.isDirectory();
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
zalez said:
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
Click to expand...
Click to collapse
Oh, you're right. Much more fool proof. :good:

Navigation Drawer Icon is missing in older Android Versions

Hi XDA,
long time since my last posting here. I am trying to teach myself Android developing and recently i published my first android app (it connects to my forum and reads certain data from which are displayed on a map and in lists). My App is based on the Android Studio Navigation Drawer template, which i extended with fragments for the views.
So everything seems fine, but users with old android devices told me, that the burger icon in the left top corner, which triggers the navigation drawer, is missing.
I can reproduce this with my old Huwai MediaPad (CM 11, Android 4.4) but not with my newer devices (Android 5/6). I am getting no errors in the debug view and so i realy have no glue where to start. May this is a typical error? Googling it has no success, but i am also not sure, which code i can give you, to help me.
I have created a new Project, based on the same template. Here the drawer icon is shown also with Android 4.4, so it must be some stupid mistake by me.
Any help or hints would be very helpful, because i do not want to use the "sledgehammer" methode and creating a new projekt and copy line by line into it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Best regards,
Jacob
In case you haven't solved the problem yet, you should provide more info and piece of code about how you set your navigation drawer icon and whether you are using appcompat or not. check this code and let me know:
Under extends Fragment object
Code:
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Sync the toggle state after onRestoreInstanceState has occurred.
mDrawerToggle.syncState();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mDrawerToggle.onConfigurationChanged(newConfig);
}

Roboto font 'fi' ligature removal

Hey,
Apologies if I make you unable to unsee what I am about to show you:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When I noticed this, it really bugged me: specifically how the dot of the 'i' is joined to the top of the 'f'. What was more annoying is that if the text was bold, ligature was removed.
I set out to root my phone and change the system font to something better. However, do not be fooled like me! Changing the system font is not an easy decision and even if you do change it, for some reason the lockscreen's time colon gets replaced by a square character. Link to lockscreen colon character issue screenshot
In the end, I edited the roboto-regular font using FontForge for mac and removed the 'fi' ligature. Then using a rooted file explorer, I just replaced the originally with the updated one.
It initially crashes the phone, but upon restart: you can now rejoice in writing all those 'fi' words.
Please see my github for a README and the modified roboto-regular.ttf.
Cheers!
edited:
I had also removed 'fl', 'ffi', 'ffl' glyph's too.
Actually, that's a ffi ligature, not a fi one.
nowster said:
Actually, that's a ffi ligature, not a fi one.
Click to expand...
Click to collapse
Ah! So true! I totally forgot I removed the similar ones too. Thanks. I have edited the post above and github to reflect the other glyphs removed. ('fi', 'fl', 'ffi', 'ffl')

Categories

Resources