I have a Cursor that returns rows I use with a SimpleCursorAdapter to populate a ListView. I would like to filter some of the rows so they don't get displayed in my ListView. I use the data from the rows elsewhere in my Activity so I don't want to change my SQL to filter them with a WHERE clause.
What is the best way to keep a row fro...
Hi everyone,
Recently myself and a small group of friends became interested in developing a game for a mobile platform. Originally we considered the iPhone but none of us use macs, so we decided Android would be a more realistic platform to use. Before we get started, I was hoping that I might find some answers to a couple questions so ...
I want to set property "Layout to right of" of control at runtime in android. Actually I want to adjust controls when screen changes orientation.
...
I am trying to write a simple application that gets updated. For this I need a simple function that can download a file and show the current progress in a ProgressDialog. I know how to do the ProgressDialog, but I'm not sure how to display the current progress and how to download the file in the first place.
...
I have made a Custom Component in XML, consisting of a button with an imageview stacked on top of it:
<myapp.widget.ClearableCaptionedButton
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/ccbutton_button"
android:layout...
I am developing a few mobile apps for different platforms including Blackberry, Windows Mobile, Android and Symbian S60.
I want my mobile apps to have the capability of checking for updates before starting and in case a new version is available, prompt the user to upgrade. Moreover in certain cases (like security patches), the user must...
Hi.
I've found some wierd behaviour related to scrolling and rendering and javascript.
How to make it happen:
On any webpage that is long enough to scroll on. Start to scroll pretty fast (fling the page). then release the touch.
Now while the page is still scrolling because of the momentum. Tap the screen to stop the scroll.
This ma...
I want to prevent my application from restarting when orientation of device changes. I have lock the app orientation as per below code but it doesn't help for the same.
<activity android:name=".CheckMemory"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:theme="@style/customTheme"
...
Hello Guys,
I want to know if we can display multiple activities in a single activity using ActivityGroup.
Can anyone please help me out with this ?
Thanks in advance.
Regards,
Serenity.
...
I am trying to play a video in android emulator
I have the video in my assets folder as well as the raw folder
But after doing some research still i cant play video in my emulator
i am working on android 2.1
My video format is mp4 so i don't think that should be a problem
Could anyone just give me an example code so that i can understa...
I want to disable the third button that creates a rectangle to zoom in other than +/- buttons in my WebView which uses builtin zoom controls. How can I do that ? I am able to do this for WebView without using built-in zoom controls by
myWebview.getZoomControls().getTouchables().get(2).setVisibility(View.INVISIBLE);
But how to do the ...
As part of my widget, I use an instance of the Camera object.
This is what I want to do. The user will click on my widget, I get an instance of the Camera(if it's not already stored), use it, then store it. If they click the widget again, I want to use that same instance that I used previously.
Is this possible?
EDITED: I can't re...
i tried the following on the emulator but the as the app starts it gives a runtime error . could someone please help me on this . Heres' the code i tried
package com.example.TextSpeaker;
import java.util.Locale;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.speech.tts.TextToSpeech...
If i try nltxt = nllen.toString(); with nllen being int nllen = nl.getLength(); i get the error Cannot invoke toString() on the primitive type int.
I want to convert the int to string so i can display the number of entries with Log...
Why doesnt it work?
...
In Virgil Dobjanschi's talk, "Developing Android REST client applications" (link here), he said a few things that took me by surprise. Including:
Don't run http queries in threads spawned by your activities. Instead, communicate with a service to do them, and store the information in a ContentProvider. Use a ContentObserver to be not...
I'd like to my Android tabs to look flat and simple like the ones in the official TWitter app. How can I override the default (light) theme and change the background images for the tabs using style/theme definitions?
...
I have the below code to read from a URL object:
URL url= new URL("http://datasource.com");
BufferedReader reader = new BufferedReader(
new InputStreamReader(url.openStream()));
After I am done getting the data, is this sufficient to close and release all the resrouces:
reader.close();
I did not...
hello.
Is there a way, to make view's background animated? Android cant handle animated GIFs in 1.5 afaik, and I can't set video for BG resource.
...
Hi,
I am want to pass data back from a Thread to Activity (which created the thread).
So I am doing like described on Android documentation:
public class MyActivity extends Activity {
[ . . . ]
// Need handler for callbacks to the UI thread
final Handler mHandler = new Handler();
// Create runnable for posting
f...
Hi!
I have an activity with ListView and buttons below:
<?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">
<ListView android:id="@+id/lvLamps" android:layou...