android-widget

Handling click events on a drawable within an EditText

I have added an image right of the text in an EditText widget, using the following XML: <EditText android:id="@+id/txtsearch" ... android:layout_gravity="center_vertical" android:background="@layout/shape" android:hint="Enter place,city,state" android:drawableRight="@drawable/cross" /> But I want to clear the EditText when...

android UI external libraries ?

Hello guys, I'm starting with android, and the app I'm developing is gonna need custom widgets look (glossy buttons, animated backgrounds etc.), I've googled for any external libraries to achieve this and did not find anything. let me guess, the only way to this is by painly extending base view classes and overriding onDraw etc. ? ...

how to run Sample camera program in Android , to take pictures.

Hi, I want to write a Android Program for Camera that captures pictures. I written code in such a way when I click a button, it should be captured, but noting is happeneing. Button click happens , but control doesnot come to "onPictureTaken". I am pasting my code here: Activity package com.andr.sai.camerademo; import java.io.IOExcepti...

Static access to an Android app's resources?

I have a problem re. an Android application's resources: My application has misc. modes (edit/plan/exec), which I would like to describe using an enumeration type. I would, however, like to populate the enumeration-values with strings that stem from the resource string.xml file, i.e. instead of enum Mode { EDIT ("edit"), PLAN...

Unable to inflate custom button through PreferenceCategory xml file

Hello all, I am trying to build a custom check box, I have an issue creating it. let me first show you files so that you can get better picture of what I am talking about. 1) preference.xml is <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt; ...

Android SlidingDrawer default state?

I'm currently having trouble with a SlidingDrawer. I want it to be closed when the application starts so it doesn't get in the way. However, it is determined that it will be open, despite putting slide.close() in the onCreate() of my activity. It seems to be closed if i use slide.animateClose() instead, but this slows my application down...

How to properly license a Widget as opposed to an application?

Hello, I've been reading through the Android documentation for implementing application licensing. Seems somewhat straight forward but it looks as though the example code is tailored for a full fledged android application and not a widget. Is there an alternate way to implement application licensing for a widget app? Thanks. Brian www...

Android App should NOT launch on receiving Intent.

Hi, I have written an Android Application and the generated .APK file I uploaded in Android Market. So, a User can download that apk and install in his device.How can I restrict my apk to launch , if he calls from other application through Intent. That means my application should not respond to any intents from other outside Applicatio...

Title of Android AppWidget below widget-icon

Hello, I am working on a small application which should be represented by an AppWidget. The AppWidget should look like many other widgets on my HTC Desire. Most of them consist of an icon and a title below the icon. The title always looks identical, it is white text on a black rounded banner. I have not found a way to get this layout w...

com.motorola.blur.home.ACTION_WIDGET_ADDED causes my AppWidgetProvider to stop responding?

I've created a home screen widget by extending the AppWidgetProvider. It works fine on all phones tested so far except Motorola's Droid 2 from Verizon. It's running Android 2.2. What I noticed is when my widget is first place onto a homescreen it works for about +/- 15 seconds. Then I see the widget receives the action com.motorola.blur....

How can I set the maximum height on a ListView?

I would like to create a UI where half of the screen is a ListView and the bottom half is another view. Not sure how to specify the maximum height for the ListView. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="...

Background process wont clear memory. Is it a good idea to kill my own process on Android?

Hi all, I have an app that has a widget. In the main app, I have an ad framework (cannot be edited due to licence) that is accumulatively leaking approx 1MB every time I exit the app. It appears one of its threads are running in the background (unnecessarily) that will keep its process and these threads will be created again when I laun...

Change appearance of standard widgets.

What is the easiest way to change the appearance of standard widgets like Button, Spinners, ListView, etc? ...

Different widgets one configuration activity android

Hi all, Some apps clog up the select widget activity by adding different configuration activities. like the screenshot here: Multi Configuration activities Is there a way to have one icon in the select widget (like Mini Info) and one configuration activity and set different layouts for widgets there? Thank you ...

How to Retrieve Text from Textbox in Android

I'm at the very early stage of learning Android. Can anyone tell me how I can use the text written in a Text box by user? I'm trying to use getText() method but finding it confusing. Thanks in advance. ...

in clicking image id in gallery pass into ui handler running gallery how can possible

hi i am implementing gallery application implementing two activites one is clicking activity long k=((Gallery) findViewById(R.id.gallery)).getItemIdAtPosition(position); ((ImageView)findViewById(R.id.ImageViewlarge)).setImageResource( imagesList.get((int)k).imgId); second one is endless gallery rotating every 5 sec ((Gallery...

EditText hint doesn't show

My EditText configured as follows won't show the hint: <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" android:hint="The hint..." android:scrollHorizontally="true" android:singleLine="true" /> It works if I set android:gravity="left" or if I remove ...

How to copy text to clipboard using an intent on Android ?

I have a widget with a button and a text field. when the user clicks on the button I'd like to copy the text from the textfield to the cliboard. As this is a widget I have to used remoteviews and pending intent. Does anybody has a simple way to do it ? ...

Where should I store my widget's preferences on the Configuration page on Android?

Hi all, ^Question^ I think that it would be too complex to open a database. Does using shared preferences make my app's data size become big. Is there a temporary storage place for my data or should I delete the data in the shared preferences for that widget. Short code samples are very appreciated :) Thank you ...

ViewText in Android

Do I need to create a new activity to view text written in a text box? For example, I want to see - "Hello"+ text written in a text box. Thanks. ...