android-widget

Displaying popup images on button click

Hi experts, Please refer the image given in the url http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185M2RneG5nYmNm&hl=en My query is, How can I display the messages corresponding to the rounded buttons and the table row , when I click on the rounded button with question mark. I know, I have to use listener for the ? button ...

How to manage a MotionEvent going from one View to another?

I have a SurfaceView that takes up part of the screen, and some buttons along the bottom. When a button is pressed and the user drags, I want to be able to drag a picture (based on the button) onto the SurfaceView and have it drawn there. I want to be able to use clickListeners and the like, and not just have a giant SurfaceView with m...

autoLink for map not working

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...

Does Android XML Layout's 'include' Tag Really Work?

I am unable to override attributes when using <include> in my Android layout files. When I searched for bugs, I found Declined Issue 2863: "include tag is broken (overriding layout params never works)" Since Romain indicates this works in the test suites and his examples, I must be doing something wrong. My project is organized like t...

Displaying a bitmap of arbitrary size without running out of memory.

How do I display an image of arbitrary size without OOMing or downscaling the image. I dont want to downscale due to zooming and dragging of the picture? If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the image to display, without causing a OOM? ...

Stop Progressbar manual scrolling in Android

I have already posted my query here, but unfortunately, not getting the required support for this simple query. I am using a progressbar widget in my application to show the download progress. In the current state, I am able to manually move the slider back and forth while download is progressing. How can I prevent the manual moving of...

Incorrect Coordinates From getLocationOnScreen/getLocationInWindow

A call to getLocationOnScreen() or getLocationInWindow() both give me a top/Y coordinate that is about ~30px (status/notifications bar's height) too far down. The left/X coordinate is dead on. As I hinted above, I believe the difference is because of the status/notification bar... I could be wrong. I think I can solve this if I can...

How can I get the correct DisplayMetrics from an AppWidget in Android?

I need to determine the screen density at runtime in an Android AppWidget. I've set up an HDPI emulator device (avd). If set up a regular executable project, and insert this code into the onCreate method: DisplayMetrics dm = getResources().getDisplayMetrics(); Log.d("MyTag", "screen density " + dm.densityDpi); This outputs "screen d...

Hide tab in Tabactivity

Now I have created three tabs in tabactivity onCreate. But how can I hide one tab in runtime? Thanks advanced. ...

How to programmatically disable onClick handler on Android AppWidget Button

I have a Button on appwidget, that I need to 'enable'/'disable' programmatically from a Service. First idea was to call setBoolean(R.id.buttonid, "setClickable", false) to disable it, but apparently you can't call setClickable remotely. Another idea was was remove the text label from it with rv.setTextViewText(R.id.buttonid, "") and th...

Android Home Screen Widget (icon, label - style)

I'm trying to create an icon/widget (1 cell x 1 cell) that can be placed on the home screen of android. The widget will look and act exactly like the other standard shortcuts in android. It will have an icon and under that a label, it will be selectable with the trackball (highlight able) it will be highlighted when it is selected/clicke...

Can't type inside a Web View

I have a problem interacting with a Web View. I'm showing an html login form within a web view and I can't type inside of any of the input fields of the forms. I do can interact with the links, select boxes, buttons, etc. Here is an example of my code. Basically I'm retrieving the web view from the xml and setting it a WebViewClient and...

How to attach a scroll bar to a canvas in android ?

Hello, I am drawing up a grid on a canvas as below, I have not been able to get the scroll bar to appear, I looked around for examples, but none of them give details on drawing scroll bars for custom views. Your help is much appreciated. public class GridActivity extends Activity { @Override protected void onCreate(Bundle savedInsta...

How to disable items in a List View???

I have a list view which is populated via records from the database. Now i have to make some records visible but unavailable for selection, how can i achieve that? here's my code public class SomeClass extends ListActivity { private static List<String> products; private DataHelper dh; public void onCreate(...

How do I replicate the functionality of selecting contacts in messaging app?

Android's messaging app, located in projects/platform/packages/apps/Mms.git has a class called RecipientsEditor. I would like to be able to create MultiAutoCompleteTextView that will filter contacts the same way, to make contact selection easy in my app. using the mms app is cumbersome since it uses internal apis and has everything split...

Has anyone ever tried to use DialerFilter?

DialerFilter, located in Android.widget has almost zero documentation. Has anyone tried to use it / knows what it does? ...

Android widget design - default black background

In the new version(s) of Android such as version 2.1, default widget (music widget, news and weather widget, youtube widget) have been restyled to use a black background with a white radial gradient at the top in the middle. I've seen other widgets starting to use the exact same background. However, I can't find this background anywhere...

Problem while accessing website in web view in Android Application

I want to access "http://www.persistent.co.in website through Web View. I am using following APIs webView.getSettings().setJavaScriptEnabled(true) ; webView.getSettings().setLoadsImagesAutomatically(true); webView.loadUrl("http://www.somesite.co.in"); On this website there are some images,but I am not able to see that images. Can any...

Adding a imageview to child elements in a expandable list query

I am looking to find out how to assign an image to a imageview in each child of an expandable list. If anyone has any information or links to find out how to do this I would be most appreciative. expListAdapter = new SimpleExpandableListAdapter( main.this, createGroupList(), ...

Android - attach data to views

Hi! In my application I create dynamic rows in table much as in this tutorial: http://en.androidwiki.com/wiki/Dynamically_adding_rows_to_TableLayout for(int i = startDay; i < startDay + 7; i++){ /* Create a TextView to be the row-content. */ TextView day = new TextView(this); day.setText(Integer.toString(i)); ...