I have a BroadcastReceiver that works fine, i.e. executing this code from an Activity, the receiver receives the intent:
Intent toggleIntent = new Intent(this, ToggleServicesReceiver.class);
this.sendBroadcast(toggleIntent);
But I am trying to do the same from a button in a Widget:
public void onUpdate(Context context, AppWidgetManag...
Hie friends,
I have an doubt, how to set the hint text as italic in android. Please help?
Thanks and Regards
Niladri
...
I am using an ArrayAdapter<CharSequence> to populate the items to list in a android.widget.Spinner. That works all fine.
But now I want to keep the list of items dynamic, i.e. I want to be able to add/remove items from the selection list at runtime. However, when I call adapter.add(item) or adapter.remove(item) I always get a Unsupporte...
I'm creating a custom widget by extending LinearLayout:
public class MyWidget extends LinearLayout {
private static Paint PAINT = new Paint(Paint.ANTI_ALIAS_FLAG);
static {
PAINT.setColor(Color.RED);
}
public MyWidget(Context context) {
this(context, null);
}
public MyWidget(Context context, Att...
Hello
i am adding a footer having 2 imageviews to my app using include tag.
I am able to view the footer and access the image view ids in source code but am not able to setOnclicklistener to these imageviews.
In main.xml i have
include layout="@layout/common_footer"
In common_footer.xml
?xml version="1.0" encoding="UTF-8"?
LinearLay...
Hello,friends:
I'm doing a simple program using "MultiAutoCompleteTextView" to prompt the common words when I
inputing several letters.
code:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(
this,
android.R.layout.simple_dropdown_item_1line,
ary);
MultiAutoCompleteTextView textVi...
When this displays the first two rows of the listview appear under the tabs, the Mercury, and Venus planets. How do I get the tabs to occupy the top and the listview rows to start after the tabs?
tablistmenu.xml:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="...
Hi guys
I am using a custom ArrayAdapter in order to populate a ListView in my page. This is the initation code of that adapter:
public IngredientListAdapter(Context context, int layout_resourceid, ArrayList<RecipeItem> items) {
super(context, layout_resourceid);
this.items = items ;
ctx = context;
}
To this array adapter...
I am building an Android App.
It has a login screen which when a user logs in, it crashes when the google maps MapView is in the layout/map.xml
What am I doing wrong?
...
Hi,
I have 2 EditText widgets ,one takes username and other takes password.When the user enters username in First EditText ,the text should be validated (It should accept only characters no digits) when the focus is on the first EditText. How to achieve this.
It needs to display error message using setError() method in EditText when the ...
Hi,
I have a widget that appears to drain the battery on some of my users phones but it works fine on my Nexus One (Froyo). Phones that has reported battery drain are HTC Legend, SE X10 and SE X10 mini. Anyone know if there is any known issues or something?
// Johan
...
After recently having to implement a scroll-table in JavaScript (i.e. a table that scrolls but leaves the headers visible so that one can easier visually associate cells with the correct columns) I now seem to bump into this very same problem on Android!
I have a longish TableLayout which I therefore need to put into a ScrollView. I wou...
Totally at my wits end.
Created a widget intent/pendingintent.
I am trying to set a variable to the value of the current ringer mode:
AudioManager mAudioManager = (AudioManager) getSystemService(Service.AUDIO_SERVICE);
int ringerMode = mAudioManager.getRingerMode();
Log.d(TAG, "ringerMode value=" + ringerMode)...
Hello,
While developing a Launcher (Homescreen) application for Android, I've come into a security exception I don't understand.
When calling the
[bindAppWidgetId()][1] method from
within my Launcher Activity, I get
this security exception :
08-19 11:30:11.689: ERROR/AndroidRuntime(6032): java.lang.SecurityException: bindGagetId ap...
Hi,
I want to display some copy right agreement in pdf format in EditText or TextView. How to do that in Android ? Are there any APIs or any sample codes ? I will be waiting for valuable reply.
Thanks,
...
I have a widget that displays a set of information. What I would like to do is to give the user the opportunity to choose the background color/image. I would like to have a popup when the user is selecting the widget to choose the background.
So how would I make the popup?
And how would I apply the background dynamically?
Thank you fo...
hi,
How to html table with rows and columns in webview in Android. Can I have one sample Example
Thank you
...
Situation:
I have two ScrollView inside of each of two HorizontalScrollView of a TableRow.
Goal:
When I touch drag one of ScrollView, another ScrollView must scroll as much. For instance, if I have a list of name on left ScrollView and corresponding phone numbers in right ScrollView, scrolling one ScrollView should not destroy the origi...
I am trying to use MediaController.MediaPlayerControl in order to display a MediaController at the bottom of my Custom View but I can't get it to work. It's crashing at the ctrl.show(); with the following Exception whenever I try to load this view:
E/AndroidRuntime( 3007): Caused by: android.view.WindowManager$BadTokenException: Unable ...
I have written a home screen widget as an ImageView, ie. the code generates the whole widget and writes it to RemoteViews as a bitmap. On slower devices with low memory, such as my G1, it can take a couple of seconds to generate the bitmap, and to avoid the dreaded force-close, I moved all the graphics code into an AsyncTask. So far so g...