Hi,
I made a custom list adapter extending the Base adapter. Each item in the list has an imagebutton, 2 textviews and a button. I tried to add the context menu to the list so as to display some options for an item in the list.
registerForContextMenu(getListView());
I used a MenuInflater object to inflate the context menu xml file. ...
Can I set an ImageButton's image from an http URL?
Thanks
Chris
...
Hi
I have a multiplechoice dialog on my activity. I have a boolean array to keep track of which items are selected from the dialog. So I want each time an item is clicked to make the corresponding place on my array true. The array is being created in the onCreateDialog before the return.
public Dialog onCreateDialog(int id) {
userlist...
Hello,
I am working on an Android app that uses the gdata-java-client to download documents for display only. So far I have an application that authenticates with the services and displays a list of user documents. When the user selects a document another query is made for the documents itself. A request for txt, html, rtf and doc file...
I want to have a button on my main screen (button1).
When button1 is pressed, it takes me to a 2nd screen with multiple
buttons. (this part is done).
When a user presses a button on that screen, it goes back to the main
screen and changes that button to the same image as the button they
pressed.
Example
MAIN
-speed_ability_button (set ...
Hi,
I have created a main android project using "android" utility. e.g.
android create project --target 1 --name MyApp --path C:\testandroid\myui --activity LaunchActivity --package com.myui.activity
build.xml got generated fine (has ant targets like debug, release etc)
I generated a test android project (which depends on main projec...
Hi,
For various reasons, i'm trying to write my own input keyboard. So far all is going well except that of creating the suggestions.
I've found the latinIME algorithm, which is all good.
However i'm having major difficulty working out how to load the dictionary in the first place.
I've had a good look round the net, and found variou...
Has anyone figured out how to scroll the contents of the Layout Editor when those contents overflow one "screen"? I'm talking about at design-time while using the ADT Layout Editor, not scrolling at run-time on a physical device (that works fine).
...
Hi,
I'm writing an application that will ship in two versions: Android and PC version.
Is there a simple way to access files from the shared code?
Using java.io is simple, but I don't know how to access android resources or assets using it. And I can't write methods that operate on FileInputStreams instead, because some files contain r...
I am using the below code to write a backup copy to SDCard and I get
java.io.IOException: Parent directory of file is not writable: /sdcard/mydbfile.db
private class ExportDatabaseFileTask extends AsyncTask<String, Void, Boolean> {
private final ProgressDialog dialog = new ProgressDialog(ctx);
// can use UI thread here...
HI,
Can you please tell me how can I create 3 equally wide TextView which fill parent across the screen? I tried doing this, but the width of the TextView are different: it is 149, 89, 89.
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"...
How to mount Android Phone's sdcard to be both visible on PC and Phone?
...
I have a custom View class in my app that I'm using in xml layouts. Wherever I'm using this view in my xml, I don't want it to stretch it's container, but I want it to fill out whatever space is available. Here's an example to make it a little clearer. I have a LinearLayout set to horizontal orientation with my custom view followed by...
This is my code:
public class MainActivity extends Activity {
private ComponentName mService;
private Servicio serviceBinder;
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
serviceBinder = ((Servicio.MyBinde...
I have an activity (called Sender) with the most basic UI, only a button that sends a message when clicked. In the onClickListener I only call this method:
private void sendSMS(String msg)
{
PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(this, Sender.class), 0);
PendingIntent pi = PendingIntent.get...
Hello everyone,
I've spent hours reading through the SDK reference, googling and reading tutorials - but I still can't figure it out.
I would like to know how to create a custom list item in the ListActivity widget on Android. Something similar to a Twitter client interface. Each list item has different types of text, possibly an ico...
When I debug my application I get frequently Launch error: Failed to connect to remote VM
even If I try again it doesn't help, I need to restart Eclipse.
Edit
Not sure yet fully if the symptoms have to do with the fact that I get this error only when I launch Debug without a code modification. Whenever I do a modification to the source ...
I recently started messing with Android Apps, but I have had nothing but problems trying to get them into the Virtual Device for testing. For some reason, they never seem to show up in the AVD. It has worked one time, but that's it out of hours spent just trying to test one or two very simple apps.
I've redone the AVD setup many, many...
Hi,
I've set of n points and I want to draw a n-sided polygon using these points.
I tried using android.graphics.path (please see below).
Path path = new Path();
Vertex currVtx;
for (int j = 0; j < vertices.size(); j++) {
currVtx = vertices.get(j);
if (!currVtx.hasLatLong())
continue;
Point currentScreenPoint = getScreenPoi...
I have a free app published in Android market. I have lost the certificate used to sign the current version but I want to publish an updated version. Android market refuses to accept my upgrade because it is signed by a new certificate. I realize the users will have to uninstall the current version to get the upgrade but it's not clear ...