I have an EditText that has a onKeyListener. Whenever a key is pressed, the EditText string is compared with a set of words in a String array, to display a list of matches that begin with the string in EditText01. But the app always force closes. The log says java.lang.NullPointerException.
This is my code:
public class listupdate exte...
hi all, How to set font to textview, which is created at runtime,?
i created tectview
Textview tv = new TextView(this);
tv.setTextSize(20);
like Size
i want to set font style to "Verdana".
How to do this??
regards
shishir
...
Hi, i am an android application developer. I am developing an application which requires of me to use Sqlite database. I have implemented fetching the data, but i am facing problems when i try to insert data into the Sqlite database. The problem that i am having is that the new data i enter is not fetched, i.e nothing is new is being ent...
android emulator doesn't start when i check the scale display to real size checkbox.any idea why would this happen ?
This only happens when i try to lunch it from eclipse but when i open it with cmd with the scale switch it works just fine.
...
With this sample code, the activity is told to finish, but continues execution afterwards and displays the message. I'm trying to understand why this happens. The only fix I can think of is to place 'return' after finish.
public void someMethod() {
if( valueIsTrue) {
startActivity(new Intent(this, NewActivity.class));
...
Can Android application request to download on SD card in android 2.1 and lower.
Also I want to know if the application can request some folders that contain videos to download on the sd card ? and how to do that ?
Thanks in advance.
...
I would like my app to do something when another application is opened.
The current approach I have taken is to create a broadcast receiver that monitors all
android.intent.action.MAIN
events, but either I am not doing it correctly or the way I am going about it is incorrect. The section of the manifest looks like this:
<receiver an...
It would be nice if StackOverflow had a section where we could post tutorials like mine so that I can answer literally hundreds of questions that have been asked here with a single blow. See... every day I read questions about how to pass complex objects between activities, how to save state so that your app can resume after orientation ...
We are converting out suite of iPhone apps written in .NEt MonoTouch to Android.
How do we catch, then publish exceptions so that they are reported via the Android Market?
...
I have a View comprised of two TextView if first is too wide can I get the second to display on the next line?
Is there a solution?
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="If this text is too wide"
android:textSize="20px"
android:te...
We're building a mobile web for Android devices. But we met some compatibility issue of Android browsers in different OS versions.
We wanted to known some detailed information of the HTML/JS/CSS compatibility of Android Browser between version. Is there any official document for this? We searched around and found few about it.
Thanks i...
Hello all,
I just tried the current Google sample for ExpandableListiew:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html
This sample seem very simple and easy to use.
But what I would like to do is to say that one of the category has no child.
I just removed all the child...
I need to display results from a SQL join in a ListView/ListActivity.
I've created a cursor:
Cursor cursor = db.rawQuery(LIST_JOIN_SQL, null);
and if I iterate through the cursor, the results are exactly what I expect. However when I try and use a SimpleCursorAdapter to display these results in a ListView I get a runtime exception b...
Hi Folks,
I have read that recent version of Android(2.2) supports Adobe flash(10.1) files(.swf), bascially i want to open swf file in android emulator using through eclipse for development purpose. I have seen some coding on internet to open swg file(like shown below) but unable to open so.
ComponentName toLaunch =
new ComponentName(...
I am working on an android app that uses google maps. now I would like to know whether there is a possibility to color a google map e.g. have a different color for roads and other shapes.
E.g have something like this http://odopod.com/contact/
...
Hi, I'm writing a horizontal tv-view, similar to the ones you know form tivo systems and similar. For each channel there is a row with the programmes for the next 6 hours or so, with a width proportional with their play time.
My Idea is to write a custom widget for each row, and stack these on top of each other. This should allow me to ...
In my app I need to download a lot of images for data in a ListView. I do lazy loading and it works rather fast, but still there is a 1-3 secs delay before the first image shows up. My research in the delay shows that the data transfer takes 50% of the time.
Now, I believe that If I could do incremental loading of the images, I would be...
This is my list view item:
I want to put an OnClickListener on the Checkbox. But I need to get the list item that the CheckBox is in, via row id. How can I do that in the onClick method.
...
Is there a tool/library/class/function for formatting XML when displaying it in a TextView in Android? I need to present some XML snippets to users and was looking for a convenient way to achieve this, rather than having to parse and format it manually...
Thanks
...
I have a ContentProvider which is declared in the Manifest, when is it really created ? When the application is launched but before launching the first activity ? When the first query/update/insert is done ? When ?
...