android

How can I reference a file in my drawable folder to put in WebView in android?

For example, I want to make an image appear in webview to utilize the zoom functions. I would use this line of code: this.myWebView.loadUrl("file://"); I just need to know what to put after file to reference the image. ...

Progress Dialog in Android doesn't Show?

Okay.. I am doing something similar to the below: private void onCreate() { final ProgressDialog dialog = ProgressDialog.show(this, "Please wait..", "Doing stuff..", true); Thread t = new Thread() { public void run() { //do some serious stuff... dialog.dismiss(); } }; t.start(); t.join(); stepTwo(...

Where can I find third-party components?

Where can I find third-party components for the Android? Components such as dials, meters, graphics of volume controls LED's, etc? ...

Rotate controls in Java

Hi, how to rotate same control in java? For example I want to rotate radiobutton for 90 or 180 degrees How to do this on on JAVA SDK for android developing? ...

How do I make ADB work on x64?

I tried installing the Android USB driver on my x64 machine and it fails. Does Android development not support 64 bit Windows, or am I possibly doing something wrong? ...

Buttons with equal heights.

Linear layout below. This layout is aligned parent bottom in a Relative Layout. Problem is I want all buttons to have the same height. I have tried layout_gravity="fill" but that doesn't seem to work. <LinearLayout android:id="@+id/button_layout" android:layout_height="wrap_content" android:layout_width="fill_parent"...

How can I get the photo saved in Android cell phone in my application

I want display the images saved in the cell phone in my own application. now I am using MediaStore.Images.Media to do this. I can get the name, size and other information of the images. but i don't know how to get the bitmap? can u help me. thx. There is a method getBitmap(ContentResolver cr, Uri url), but i don't know how to get the Ur...

Dialog, LinearLayout, ScrollView size issues

I'm building a dialog class which inherits from Dialog, and all internal UI is programmatic. It's structured in the following way: Dialog +LinearLayout ++TextView ++ScrollView +++LinearLayout ++++ListView Unfortunately, when I show() the Dialog, it's too short. I'd like it to maximize and cover as much of the screen as possible, but ...

How to Compile Sample Code

I'm breaking into GUI programming with android, trying to compile and analyze Lunar Lander sample program. The instructions for using Eclipse say to select "Create project from existing source" but that option doesn't exist. If I select File->New->Project I can select "Java project from Existing Ant Buildfile". Using that I've tried s...

Please explain me Context class in Android

I'm new to Android. Can someone explain me the concept of Context class/Object. What it is? What it will be used for? Why Context class? ...

How can I indent a selected block of text in Eclipse 3.5.2?

I use TAB and Shift-Tab in Visual Studio to indent an entire selection. This does nothing in Eclipse, and I can't seem to find another way to do it. Update: I wasn't really paying all that much attention to this initially and did not ask the question correctly. I now realized that it is in XML files where TAB still does not indent a sel...

Android XML Layout Guide

The XML documentation for layouts isn't very good. There are a large number of related variables and it isn't clear at all how they interact or differ. Is there any guide - maybe a book, or blog post ect that would help me understand this? Related Is there any Android XML documentation? ...

Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

Hi, I cannot figure out the origin of the ConcurrentModificationException. In my activity I'm calling updateMapOverlay(). I'm also calling updateMapOverlay() inside another Thread (a TimerTask) that is invoked on regular intervals. I'm taking the appropriate locks when invoking updateMapOverlay() from both the threads. Is this proble...

How to open a nested child PreferenceScreen in Android.

Hello, I have a PreferenceScreen that is defined in XML that serves all the preferences for my application. This PreferenceScreen also has a child PreferenceScreen nested within it. My implementing class is called PreferencesActivity. I know I can open the main Preferences window via startActivity(new Intent(this, PreferencesActivity.cl...

Calling different layers from the same class

Hi, I am here to seek some help with my code which i am facing a dead end road with. I'm trying to pass values from screen1.java using Intent to screen2.java. Passing the values is fine and I managed to get through it; however, when I check using if statement the program crash down. Here are my files, plzzzzzzzzzzz help screen1.java p...

How handle page not found error in android?

I am calling one android application from java script using following code: window.location.href="android3://com.android.application3"; In androidManifest file of Application I use intent filter as follow <data android:scheme="android3" android:host="com.android.application3"/> If the application is already installed then ...

Adding pictures to the Gallery - Android

Hello, I have an activity that takes a photo with the camera, and then adds it to its proper folder (in this case /DCIM/Camera). But then when you exit the app and load up the Android gallery...it's not there. I was doing some playing around and noticed it only appears there when after restarting the phone. I'm not sure the reason behin...

[Android] XML Parser

I'm trying to extract n0Y7ezLlIYA8R0K54rEmHaTOraBQVSPDjQaGlQxlGso4jdVN1kRxtcfskEs= using w3c dom <html> <div id='token' style='display:none;'> n0Y7ezLlIYA8R0K54rEmHaTOraBQVSPDjQaGlQxlGso4jdVN1kRxtcfskEs= </div> </html> but I seem to be stuck DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document...

ListView With checkbox and images in android

hi.. please someone help me about this. i need to implement a list view with checkbox and each item should be assosiated with images. ex: [image1] list_item_1 [checkbox] [image2] list_item_2 [checkbox] ' . . please help me ...

Why isn't my assets folder being installed on emulator?

Where are my assets being installed to? I utilize an assets folder in my new app. I have two files in the folder. When I install my app on the emulator, I cannot access my assets, and furthermore I cannot see them on the emulator filesystem. Extracted my apk and confirmed the assets folder exists: $ ls -ltr assets/ total 16 -rw-rw-r-...