android-widget

How to Create a Home screen widget and on click show my application.

Hi All, Me new to android ,actually i have a application and now my concern is 1) How do i create a home screen widget 2) And when the widget on the home screen is clicked how do i show up my application would be looking forward for your help Thank you ...

Control screen brightness in android using " Background Service".

Problem:- I want to control the brightness of screen using a background service in android. Existing Solutions:- There are similar question posted in the form in below link:- http://stackoverflow.com/questions/1791340/adding-screen-brightness-controls-to-android-application Why existing solution will not work? All the solution prov...

How can I write my own context menu for copy & paste?

I'm writing an application with EditText driven widget. and I'd like to create my own copy & paste menu. To replace android default menu on EditText, what should I do? Just overriding long click? or is there another way to implement? Thanks in advance. ...

Disable scroll view action

In my application i've a line for increasing the width of a widget(by dragging the line to right/left) and i've the scroll view enabled in the same activity. I need to disable the scroll view action when the user touches the line and when user releases, it should be enabled. The scroll view should be in visible state but the action of th...

Programatically scrolling an EditText

I'm writing a simple caesar-encryption-activity. Two EditTexts on screen, one clear-text, one crypted. Here's an example for the crypted EditText - the cleartext one is similar. <EditText android:layout_below="@id/Caesar_Label_CryptText" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id...

tab content handling.... how in android???

hi all, i have a tabactivity with two tabs. in this tabactivity i have edittext and button to search the local database. i have a listactivity class as a tabcontent. it shows by the framelayout. i want to refresh that listactivity based on the text entered in edittext which is in the tabactivity. how to do that? i created a method ...

Android CheckBox with right-aligned checking button/box

Hi all, I am fairly new to Android (find it most fun, btw) and I was wondering... How can I create an Android CheckBox with the label to the left and the checking button/box aligned to the right (pretty much a switch of the way this widget is drawn by default)? Like the way a checkbox preference normally looks like... I am looking for...

How to match android application with droid mobile?

Hi, i have developed the android application screen resolution is 320x480 Px but i want to run same application without any code modification with Droid Mobile(480x854 px). i have installed android application with droid mobile but it's displaying only half of the page in droid mobile( i am using the android 2.0 SDK device). is there ...

what is the size of High Density WVGA854 launcher icon?

Hi, i have created the launcher icon(48x48 px) for 320x480 screen resolution and it's working fine. but while using same icon in WVGA854(480x854 px) it's displaying small compare to other default launcher icon. i want to know, what is the size of High Density WVGA854 launcher icon? Regards, Jeyavel N ...

Handling that annoying "java.lang.IndexOutOfBoundsException: getChars (5 ... 0) has end before start" bug

I get about 50 of these coming from my users each day. I realise that this is a Motorola Droid bug - http://code.google.com/p/android/issues/detail?id=5164 Is there anyway I can catch this error in my code? ...

how to set the simplecursoradapter to a listview in android?

hi all, i have to set the simpleCursorAdapter into a listView. how can i achieve that? thanks. ...

Videoplayer in Android?

give me some simple example for streaming video player. i got a error in api demo. Error is: Command PLAYER_INIT completed with an error or info PVMFErrCorrupt android thanks... ...

Android: Forcing a WebView to a certain height (or triggering scrolling for a div)

Hi, I am building an app which contains an input form and a WebView. The project is available at http://code.google.com/p/android-sap-note-viewer/ The WebView will render a website based on the input and this page has a DIV with the main contents (could be hundreds of lines). I have no control of the contents on the website. Android W...

cant debug android widget in eclipse

Hi All, My eclipse (on a mac) is setup with the android ADT plugin, im setting breakpoints and hit debug button, the emulator is running i can see the widget but no debugging is being ongoing. any insights ?? ...

Set Android Gallery widget to show specific starting image

I have a task where the user can select an image from a GridView representing a photo album, and from this I start a new activity which displays a Gallery widget to show the images of the photo album. However, I can't seem to get the Gallery widget to show the contents of the photo album with a given image as the starting point. Ideally ...

Android HorizontalScrollView scroll by page

I have implemented a slideshow in my Android app using . This works well except that I want to scroll to next image on a scroll gesture (now it just scrolls past few images before decelerating). I have couldn't find a appropriate way to do this, should I be using a FrameLayout instead ? How do I scroll to the next (or previous) image on ...

play youtube video in WebView

Hi all, In my android app I have a WebView to display html data from our website. Sometimes the page will have youtube embed objects. This doesn't show up properly in the app. Is there any way to show/play youtube videos in WebView ? Thanks. ...

Issue with displaying TabHost Layout in new Intent

Dear Android folks, I am having an issue with using TabHost in a new Intent of type TabActivity which I hope you can point me in the right direction. Funnily it works fine when I try to view it in the original Intent : setContentView(R.layout.main) I get a "forced closed" and within logcat, I get the following error even though my Ta...

Android: a vertical gallery?

I'm looking for a widget that behaves similar to the gallery widget but scrolls vertically instead of horizontally. I googled all around and apparently the answer is no such pre-made widget exists. So I said myself, oh well, I'll look at the gallery class in the android source and modify that to scroll vertically instead. Not so easy. T...

What's the better way to pass resources?

Hi, Need some advice from you experts out there. I've just started with Android programming and while I finally got what I want my "Hello World" to do, I feel as if I'm bludgening my way through rather than grasping concepts. I created three EditText boxes. Below those I created three Spinners. Pick a number in the Spinner and it wi...