Hi,
I followed the tutorial "Tab Layout" and i created my TabActivity with some tab, in particular i have a tab called "newTab" with a button and i want to add a new tab when i press it.
If i implement the OnClickListener in the newTab Activity i don't know how to call the tabHost.addTab() method because it is a TabActivity method, and ...
Is there a way to find out if an activity is bound to a service? Something like boolean isBoundToService(ServiceConnection sc)?
Sometimes when I play around with my app I get an exception when it tries to unbind a service which is not bound.
...
I'm compiling using android tools without eclipse.
I compile launching "ant debug" from command line.
I have found many many instructions around the web about how to remove with annoying warning, but I haven't been able to make any of them work.
I've tried -D option, I've tried randomly tweaking build.* files, I've tried exporting an ...
Hi there,
Bear with me as i'm just learning about Android.
What i'm trying to do is to open an Activity when i click on a button.
This is my code in my main activity
public class MainPage extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(sa...
I'm just starting with android programming. I have a canvas which I've drawn on, and now I'd like it to appear inside a container in a layout. How do I do that? I've tried making a class that extends a View object and I can get it to draw on the entire screen, but I don't know how to get it to draw just inside the ImageView container in ...
In the Google Maps application, when you open the menu and click on "Directions", it pops up a dialog that is unique to Google Maps. It keeps the MapView in the background, but displays the search dialog from the top (or bottom, if you're on an old version of Android).
I was curious if anyone knew how they achieved this effect. I'm wi...
I am completely new to the NDK.
I have done a couple of the tutorials including the hello from jni one
and another one that calculates the sum of two numbers.
They involved using cygwin and the ndk to create the library so file
and I have a bit of a grasp on how to insert my own libraries into the
libraries layer of Android.
I have no...
I'm currently developing a Field-Service application that stores data in the local sqlite database on an android device. At some point, usually after completing the data collection rounds, the local sqlite db is to be synchronized to a remote sybase db on the server.
Any suggestions as to how this could be achieved or engineered as a so...
I can't found any solution to my problem:
I've a camera preview with some width and height (example: 720x480), then I overlay an image on the camera preview, when I take a shoot I add this image to the camera photo but the picture size (2048x1536) aren't the same width and height of camera preview, then X and Y of this image overlayed ...
Sorry for the ambiguous title but I'm doing the following to write a simple string to a file:
try {
File root = Environment.getExternalStorageDirectory();
if (root.canWrite()){
System.out.println("Can write.");
File def_file = new File(root, "default.txt");
FileWriter fw = new FileWrit...
I'm currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android. I'm curious as to what the best way to do this is. I certainly have a couple of ideas for how to do this, but they are not optimal.
I need to be able to apply a new mask to the image every so often (the b...
I'm looking for the most suitable class to be a dispatcher for AsyncTasks invoked from my Activities.
I think it could be one of these:
subclass of Application;
subclass of Service;
my own static stuff.
As for me - it's simlier to implement the 3rd choice. But the question is will it be more "death-resistant" than Service or Ap...
I maintain and develop on the Windows Mobile platform.
I know the market is changing rapidly with iPhone and Android gaining market shares.
There are also app development platforms like rhomobile/titanium.
Are there any platform/non platform specific mobile conferences this year?
What would be some of the important/useful conference...
I have the following TextView in my XML layout file:-
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/autolink_test"
android:autoLink="all"
/>
The string autolink_test contains a phone number, an email address, a website address and a physical geograph...
Hi everyone,
I'm kinda stuck with something which must be appalingly simple. I'm trying to write a few variables to a file, each on it's own line so that I'll be able to use readLine in another method to read the variables back in.
Here's the code:
package com.example.files2;
import java.io.BufferedWriter;
import java.io.File;
import...
Hey guys,
Ive noticed that the time in my emulator for android projects is wrong. Its one hour behind.
How do I go about changing the time and can I do it in eclipse?
Thanks
...
I have a PreferenceActivity with a bunch of (Sub)PreferenceScreens. Each such (Sub)PreferenceScreen represents an account and has the account-username as its title.
PreferenceScreen root = mgr.createPreferenceScreen(this);
for (MyAccountClass account : myAccounts) {
final PreferenceScreen accScreen = mgr.createPreferenceScreen(this)...
I use example with zoom and scrool big image, which use GestureDetector
code here .
When I place button on it, I cannot handle any button events - both onClickListener, OnTouchListener doesn't fired.
public class ScrollableView extends AbsoluteLayout implements OnGestureListener, OnDoubleTapListener {
private GestureDetector mGestu...
Strangely I find no support for Midi in Android.
The only thing that comes close is the Jetplayer, but this only takes a existing .jet file.
I want to dynamically generate a midi file with some intervals and play it.
I even thought about just manually creating a .jet file with a tone and then transposing it with the jet player, but it ...
How do I check if a directory exist on the sdcard in android?
...