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...
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. ?
...
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...
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...
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">
...
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...
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...
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...
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...
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....
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="...
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...
What is the easiest way to change the appearance of standard widgets like Button, Spinners, ListView, etc?
...
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
...
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.
...
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...
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 ...
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 ?
...
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
...
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.
...