android

custom view with layout

ok, what i am trying to do is to embed a custom view in the default layout main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.lam.customv...

Is there any way to see the diff on a file between two different Android releases?

It would be really nice if there is some easy way to see what have changed in a certain class (or other file) between two releases (1.6 & 2.1 for example). Does anyone know how to do this? A way to do it online would be great but downloading the code and checking offline would be ok as well. ...

Sending data between activities within my app?

Hi, I have a TabActivity, and the tabs point to sub activities. Is there a way I can send a 'message' to those child activities? I just want to pass a string across, not sure if this is possible. I have some data being fetched by the parent TabActivity, and the child tabs can't do anything useful until the parent is done fetching. Whe...

Bitmap byte-size after decoding?

Hi! How can I determine/calculate the byte size of a bitmap (after decoding with BitmapFactory)? I need to know how much memory space it occupies, because I'm doing memory caching/management in my app. (file size is not enough, since these are jpg/png files) Thanks for any solutions! Update: getRowBytes * getHeight might do the trick....

Android Convert Central Time to Local Time

I have a MySql database that stores a timestamp for each record I insert. I pull that timestamp into my Android application as a string. My database is located on a server that has a TimeZone of CST. I want to convert that CST timestamp to the Android device's local time. Can someone help with this? ...

Monitoring of Activities visibility

Is it possible to determine the moment of switching of certain Activity from foreground to background and vice versa? This activity should run in the separate process. I need to write the application that collects some statistics from using of big set of applications (app names read from configuration file). My application works as Ser...

Dynamically adjust the column and row of a Table Layout based on orientation

Hi, Is it possible for my android application to dynamically adjust the no of column and no of row of my TableLayout based on orientation? For example, when in landscape mode, the TableLayout is 3x2 and when in portrait mode, the TableLayout is 2x3? Thank you. ...

Show extra info for Preference screens when CheckboxPreference summary field is not enough long?

I have a screen where you can enable/disable modules for my Android application. For this I use a CheckboxPreference screen. This is all good, but the summary field gets cut off if longer descriptions are added than 2 lines. Suppose I have 4-5 lines of description available for each module, I would like to display this in a helper wind...

UI Design tool for android

Can anyone please suggest any good GUI Design Tool apart from Droiddraw? ...

[Android] Latency when getting sensor data from gPhone?

Hey, guys! I am working on a project using HTC magic which requires the data from the electronic compass, including both the accelerometer and magnetic sensor. But I find that there is a significant latency between the move of the phone and the trigger of the sensorChanged event. In other word, the acceleration and magnetic data obtained...

Android: How to Create a Modal Progress "Wheel" Overlay?

Hi, i would like to show a modal progress "wheel" overlay on my view. The ProgressDialog comes closs, but i do not want the dialog background or border. i tried setting the background drawable of the dialog window: this.progressDialog = new ProgressDialog(Main.this); this.progressDialog.getWindow().setBackgroundDrawable(new ColorDra...

Deactivate toast for an android application

My question is quite simple. Is it possible to inactivate all toasts of an application by setting a preference of something like that. Is there for example a method which does that in the SDK? ...

Android: Programatically changing phone settings and getting lost calls

Hi everyone, anybody knows if it's possible in Android to programatically change the phone internet settings (proxies also), email settings and other similar? Is there some kind of registry? and what about getting the lost/received/etc calls? is it possible to get that info? thanks a lot! ...

Android Pre-Populated Database

I am working on an Android application that will need several entries (a single table, with 1000-10000 rows) populated in that app's database before the user can use that app. I've looked around some tutorials and I am unsure of the best way to do this. Should I just check if the database exists each time the app is started and, if it ...

setting picture captured by built-in camera into an ImageView

in my app i m calling built in camera for capturing picture but i want to set that picture into an image view following is the code . so what code should i add to it to set the picture into imageview. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Intent i...

Background in tab widget ignore scaling

Hey, I tried to use a background (480x320) for my tab content. Using a xml as drawable, I should be able to scale the image. This works fine outside the tabhost/tabactivity. If I try to use it inside the tabcontent, the scaleType doesn't work. He ignores every scaleType I tried. tabcontent: <?xml version="1.0" encoding="utf-8"?> <Rela...

How to update ImageButton BackgroundColor in RemoteViews

I have an appwidget which has got a ImageButton.I can update ImageButton image but i can't update backgroundcolor with using setInt() method;because imagebutton setBackgroundColor is not annoated with RemotableViewMethod.class.What can i do else? ...

What do I have to add to the manifest to debug an Android application on an actual Device?

What kind of permission/Flag do I have to add to the manifest to debug my application on an actual Android device? ...

Copy android contacts' birthday to calendar

I'm an htc tattoo owner, and i'm watching for a way to copy contacts' birthday (retrieved from facebook) to the built-in calendar. I'm not afraid to develop a custom app but i'll be more happy if there's one built-in or already existing... Thinking over this thing, i realized there's more fun creating a custom app... :P Do you k...

small size picture problem

I've got a problem in saving a picture in a full size after capturing it using ACTION_IMAGE_CAPTURE intent the picture become very small , its resolution is 27X44 I'm using 1.5 android emulator, this is the code and I will appreciate any help: myImageButton02.setOnClickListener ( new OnClickListener() { @Override ...