Given the code bellow, is it possible to have images instead of text in the array planets?
Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter adapter = ArrayAdapter.createFromResource(
this, R.array.planets, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(and...
Hi all,
I have a custom ScrollView (extended android.widget.ScrollView) which I use in my layout. I want to measure the total height of the contents of this scrollview. getHeight() and getMeasuredHeight() don't give me correct values (too high numbers).
Background information: I want to determine how far the user has scrolled. I use on...
Hai Frnds,
I have EditText which displays address of the User. Suppose If the User clicks the address then onclick event has to be fired in that googlemap must be displayed with the address of the user.
For Instance:
If the User Address in the EditText is Delhi, Suppose if the User clicks that then google map mu...
How do I find the make and model of an Android device?
...
Is it reliable to save the connection state (i.e. save which connection is used and make connections and disconnections of sockets based on new states) ?
...
friend's,
I have set of images fetched from internet and set it on gridview,here i have option to click here to view more,below the grid view and it fetches images and set it on grid with prevoius set of images,when i exit the application and run it again,the previous set of images remain in cache and grid shows images from cache,here i...
I have a widget with a button and a text field. when the user clicks on the button I'd like to copy the text from the textfield to the cliboard.
As this is a widget I have to used remoteviews and pending intent. Does anybody has a simple way to do it ?
...
I'm new to android development... while making my application layout i want a button to remain at the very bottom of the screen while a scroll view is placed above it. I am unable to do this i was using the size of the scroll view as 430dp so that it works but when i change the orientation of the screen this does not work as 400dp is big...
Hi All,
I have a RelativeLayout whose layout_height is set to "wrap_content" and inside that I have a TextView whose text is set at runtime. I have set android:layout_height="wrap_content" to my TextView, but it doesn't seems to change the height of the Textview even if the content is larger than 1 line.
It only takes the height of sin...
Hi
I am using ContactsContract api intent for showing all contacts from an activity. This intent returns an id of the contact. I need to get the postal address of this contact.
Here is the code which i am using for showing contacts:
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(ContactsContract.Contacts.CONTENT_TYP...
I try to build a custom application for GUI Testing with Robotium. This test needs to turn ON/OFF Wifi simulating user input. The final application has a signature mismatch with system signature needed in order to use com.android.settings.
The error message is :
Error=Permission Denial: starting
instrumentation
ComponentInfo{com...
Hi all, in my android application i want to add the functionality the user to buy song from amazon. The easiest way to do is i think to use amazon mp3 application to communicate with amazon store. I found this piece of code from default music player
Intent i = new Intent();
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setAction(MediaSto...
Hello, in my android application,I want to save some photos uploaded from a server on my database and then reuse them later. I think I should save them in a binary format and save their links into the database. Is it the better solution? Can you give some code or an example? Thanks.
PS: now I only uploaded the image and display it di...
As you know android today is many versions many constructors, many screen sizes,...
it's quite difficult for developers today to write programs that targets a big part of devices.
What would be THE developer must-know practices for this ?
tips for fluid layouts.
"standards" for developing on any android version.
...
Any other idea...
I have an Android application which handles a particular type of file. It registers intent filters for both the MIME type and the filename pattern. This all works fine from file managers; I select a file, I get prompted with a list of actions applicable to the file, my application is on the list, I select it and it works.
However, this ...
Hi everyone.
I want to upload the same application twice to the Android Market. One version will have AdMob messages and the other version of the same app will cost a pair of bucks.
Should I make two applications with differents packages names in order to upload them or is there any trick to do it with the same project.
Thanks in adva...
Hi,
How could I kill all the Activiies of my application ?
I try using this.finish() but it just kill one activities.
In fact, I would like when the user touch the button BACk (in only one of the activities), the application do the same as he touch HOME Button
...
In Android, how to implement the following effect?
Install just one application, but in the launcher, there are two entries, and entering each will go to different ui.
Just like google map, you can see only one application, but there are map and navigation entries.
Thanks.
...
Sqlite on android lets you access the database from multiple procs for reads, but if you're currently writing from one process, reads and writes from other procs will throw an exception because the first write has a lock on the db.
By "procs" I mean other threads in the same app.
Is there a standard way to have the other threads simply...
I have a table in a database where the _id column is the primary key. If I try to do an insert into this table using an _id that already exists, my application crashes. How can I do this? Is there a specific kind of Exception I can eat? I've tried SQLiteException to no avail.
...