I have an activity, where the ListView holds customized linear layout elements for each row. One of the rows has a button defined as:
<Button
android:text="Pick a contact"
android:id="@+id/btnPickContact"
android:layout_width="wrap_content"
android:gravity="center_vertical"
an...
Why do I get this Exception?
05-18 20:29:38.044: ERROR/AndroidRuntime(5453): java.lang.IllegalArgumentException: The key must be an application-specific resource id.
05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at android.view.View.setTag(View.java:7704)
05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at com.mypkg.viewP.infla...
I have this code:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
intent.setData(ContactsContract.Contacts.CONTENT_URI);
intent.putExtra(EXTRA_ONLINE_ID, (String) v.getTag());
startActivityForResult(intent, PICK_CONTACT);
Then on response:
public void onActivityResult(int reqCode, i...
Hi there,
I started two days ago with android, gone through the hello android stuff and also started to read the Hello Android book, which is great.
PROBLEM:
I use in my app - VERY EASY APP- the XML output. So basically the main activity just tells the android to show the XML layout of main.
But what if I have in the activity - code ...
I have built a WiFi connectivity client that supports OPEN and PSK modes. Now I want to add EAP support. Does the Android API support this? I see WifiConfiguration.KeyMgmt.WPA_EAP, but no information about how to set the underlying authentication protocol. I'm looking to support EAP_TTLS.
...
I'm going crazy, I created a file object, so it can be read with ObjectInputStream, and I placed the assets folder.
The method works with a file smaller than 1M, and give error with larger files.
I read that is a limit of Android platform, but I also know that can be "easily" avoided.
Those who have downloaded the game Reging Thunder, fo...
I need to set a background image for an android button (text button), but I want to keep the gray button. When i use the setBackgroundResource() it has the image in place of the gray button. How can I keep the gray button?
I tried using setCompoundDrawablesWithIntrinsicBounds, but the image only takes up part of the button, even when ...
I have a field in an Android app that I would like to autocomplete from the user's contacts. I can get it to autocomplete based on partial entry of a particular name from the contacts, but I would like for it to autocomplete based on entering either the name or the email address of the contact. Here's the relevant code:
@Override
p...
Hello,
I'm looking for a way (or at least to be pointed in the right direction) to play two streams of audio on android simultaneously but each on a different channel (e.g one in the speaker and one through the headphones) I'm not even sure its possible hardware wise.
Any thoughts, clues ?
Y
...
Hi, i have 2 questions about widgets update
I have 2 buttons and i need to change one button text when i press the other one, how can i do this?
The first time i open the widget it calls the onUpdate method, but it never calls it again. I need to update the widget every 2 seconds and i have this line in the xml.
android:updatePeriodM...
Hi,
I've got a question about android and GPS coordinates.
I've got a script done in python, which opens a socket and sends a bunch of coordinates to an emulator. On the emulator I have an application running where I've registered an OnLocationListener.
The idea is to capture the coordinates and animate the map towards those positions....
Hello,
I have an android app where I am doing the following:
private void onCreate() {
final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true);
new Thread() {
public void run() {
//do some serious stuff...
dialog.dismiss();
}
}.start...
Hi,
I am exploring android and developement and I found one problem.
My app UI is defined in main.xml
I have 2 texts and 2 buttons defined - easy app.
I read that I may be able to change TEXT in the ACTIVITY using the setText() method.
And thats the problem - how do I POINT the setText() Method? How do I tell it to change a specifie...
Hi
What I need to do for making a customized rectangular bar having a logout/login button at the top of android screen ?
for eg : top navigation bar in iPhone.
Thanks
...
I am almost done with my project in android, now I want to make the executable version of the application.
I need to demonstrate it in .exe form as soft app as on emulator, not by built and debug process from eclipse.
need immediate idea
...
I am using a ListView with an ArrayAdapter that holds objects. When I select an item, I am capturing the position and index of the selected item. If I scroll down prior to selection, the position and index represent the location of the item in the list. Selecting that items takes me to another activity. When I use the back button to retu...
How can I integrate services like Google or Microsoft and use information from the user like Google Calendar information. For example, how would I sync the Microsoft Outlook notes with an app on Android?
...
who knows about the method "add" in menu interface? how to implement exactly? which is it's imlementation class? i couldn't find detail implementation in source code of sdk. i want to check how to implement in android source code for "add" method.
e.g.
public boolean onCreateOptionsMenu(Menu menu) {
menu.***add***(0, MENU_NEW_GAME,...
i want to hide the app title.
...
Hi,
In would like to write a simple Android application that takes a picture from the camera and uploads it to a webserver. Additionaly, I would like it to print in the screen the response from the server wich is a simple text string.
Do you know if there is any sample code that does something like that?
Thank you,
Michael
...