android-widget

Android NumberPicker not saving EditText changes

I have copied Android's NumberPicker widget to my own application, but I'm having one problem... When someone manually clicks the EditText and changes it via the keyboard, the selection is not saved. Is there some listener that I can implement to check and see if the user manually changes the EditText to set it as current? Or something?...

getting battery level at android widget

Hi, I wrote a widget for Android and I'm trying to get the battery level. I've tried using Intent batteryIntent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); but I get the error: "IntentReceiver components are not allowed to register to receive intents" Why? the ACTION_BATTERY_CHANGED is a sticky...

Android: How to change the textsize in an EditText field?

I want to display a table with some fields being editable - see this example: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:paddingLeft="1dip" android:paddi...

Need to implement customized screen

Hi , I wan to implemnet a screen which looks exactly like first Screen of android device(group of icons will be there and when u press on down part of the screen which contains two dots second screen has to appear) .Please Reply ASAP. ...

Android: How to place an animated image inside an EditText that we can show and hide.

Hello, I am trying to add an animated spinner inside a EditText view to the right. And programmatically show/hide it. I have created the animated spinner by introducing a linear interpolation rotation: *res/anim/rotate_forever.xml* <?xml version="1.0" encoding="UTF-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/an...

Android layout - making certain objects expandable

Given a horizontal LinearLayout in Android, I'd like to create: (1) a textbox which fills nearly the width of the screen, except leaving enough space for... (2) a button on the right So I create an EditText and a Button and they're both very small. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:...

Android Phone Accelerometer

I would like to write a graphical application for an Android phone that displays a level bar, which changes depending on the phone's accelerometer sensor. Where would be the best place to get started in learning about writing programs for the Android? Specifically, I would need to know: What programming language should I use? What gra...

How to open MSWord document in our Android App

Hi, I am working on an Android Application where I need to open an MS_Word foramt file.How can this be possible in android? The context is the file should be viewed in the same way as if we view msword document in desktop.can anyone help me in sorting out this issue? Thanks in Advance, ...

usage of Handlers in Android and sample program on Handlers.

hi, I am working on Android projects. I need to use a background thread that should use handlers. My doubt is when we are using a new thread , what is the need to have handler associated with it . I am very much confused of using Handlers in my program. I did n't find any good tutorials or sample programs that deal with Hanlders.Can any ...

Android HelloViews Spinner Tutorial R.id and R.array can not be resolved.

Hello. I am having trouble with the Android HelloViews Spinner Tutorial. The error in HelloSpinner.java states that "R.id cannot be resolved" and "R.array cannot be resolved". The error in AndroidManifest.xml states that there is "No resource found that matches the given name (at 'label' with value '@string/app_name')" and "No resource f...

Android Widget with Ticket Kind of behavior

Hi. I have an Android widget which is suppose to show news headline. My idea is this: I have a widget on home screen with a news scrolling. Every 30 seconds it calls it's Provider's onUpdate method which in turns invoke a service. The service updates the view with next news item. My problem is that until I have new news available; ...

How to show the recently added item in listview containing more than some 30 items without having to scroll down?

I am creating a chat application. In which I have used listview to contain the conversion between client and server. the problem is when more and more messages are added the listview gets bigger and the recently received as usual gets added to the bottom but the view always shows first ten msgs. i want the listview to show the the item m...

Style drawable src in widget

style="@android:style/Widget.Button.Inset" android:src="@android:drawable/star_big_on.png" in this coding how the star_big_on icon select. I found the source of that icon.I replaced some other icon which is in the same directory but it show error like error: Error: No resource found that matches the given name (at 'src' with...

Android mobile applications

Hi this is srinivas new to android mobile app development i want some coding regarding gridview how to get the image id from the grid view to pass it to another activity . ...

Error while playing video from server in Android

I am trying to play video file which is of .3gp format using VideoView of Android. When I try to play this video I am getting a pop up message saying that "sorry video cannot be played". I am using Android 2.2 Google APIS. I am getting the following errors in Logcat: 09-18 15:00:39.607: DEBUG/MediaPlayer(458): Couldn't open file...

How to calculate an appropriate field width?

In my app I am displaying a table where the individual cells are editable text fields (i.e. EditText objects). I am currently struggling calculating appropriate widths for these. If I set the width to be as many "Ems" as the displayed text has characters, my fields are much to wide by about a factor of 2 and the table looks ugly and wa...

How to implement wheel widget like in iPhone?

I would like to implement a time settings wheel widget like the one iPhone has (http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/art/ui_datetimepicker.jpg). Should I use GlSurfaceView or just extend View? Should I make it as a compound View (it would consist of several Views) or draw everything ...

scaling view dynamically

Hi i want to display 4 frames in layout which contains customized views.when ever i clicked on one frame it has to occupy total screen. please let me know how to do . ...

Use AppWidgetConfigure to Reconfigure

I have created an AppWidget that displays total number of days elapsed since the startDate they entered upon creation. The widget has a button to open into full app that displays more data, a breakdown of days, hours, and minutes. I then created menuOptions and want the user to be able to reconfigure the AppWidget to a different start...

PIN entry widget for android

What is the best way of configuring a widget in android for entering a 4 digit PIN? Currently I have: <EditTextPreference android:title="PIN" android:summary="Your PIN number" android:key="password" android:numeric="integer" android:maxLength="4" android:password="true" /> This works quite well, but there is no way of c...