android

Customized Rating bar ..

The inbuilt rating bar is too big for my application . How can i reduce its height & width? Also the color of the stars should be orange & not green . How can i achieve it ? Also can i have the rating bar in vertical next to a image on my screen ? if yes how ? ...

Launch Browser Intent with Custom Class - cannot find Activity

I want to specifically run the default Android browser for a given URL. I'm using this code: Intent i = new Intent(); i.setAction("android.intent.action.VIEW"); i.addCategory("android.intent.category.BROWSABLE"); i.setClassName("com.google.android.browser", "com.android.browser.BrowserActivity"); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TAS...

How to override button class?

I have to create custom button that contains few elements. Elements have different sizes (Big A, two smaller labels and color indicator). Behavior of button is just the same like a standard button. It can't be just a picture backgraund. Is there any other way to do this? http://developer.android.com/guide/topics/ui/custom-components....

android disable screen rotating

When I press a button, I would like to disable screen rotation on all my activities. How can I do that? BTW, phone can be located in landscape|portrait position when user click the button. ... ...

Android - How to prevent a user interacting with Gallery.

OK, I know this questions sounds weird at first, as GALLERY is designed to be user interactive, but, I like the Gallery functionality, as it suits a lot of my needs. i.e. I can give it a number of pictures, move the whole of them from right to left, or left to right and get them an animate (in my case, zoom) when one of them is selected....

Text Size of a Spinner.

How can I decrease the font size of my spinner? I have reduced the spinner size to 35 pix because of which my text gets cut in half. How do i do that? Also I dont want anything to be selected beforehand. Default text should be "select some value". ...

Android, how to not destroy the activity when I rotate the device?

I have an app that works only in portrait mode, and I have made the changes in my manifest file for every activity the orientation to be portrait. But when I rotate the device, the activity recreates again. How to not destroy the activity? ...

switch soundtracks of an mp4 file with android mediaplayer

Hey, I have written a little videoplayer for android and now I'm looking for a solution to switch between two or more soundtracks which are in the video container. Is this even possible with the standard mediaplayer class? ...

Dynamic addition of a View [Android] from background thread

I am creating an animated drawable and then adding it to a FrameLayout. The variable is created as a class field and then, each new AnimatedDrawable is created and added to the frame, like that : for (int i = 0; i < 10; i++) { sampleView = new SampleView(Drink.this); frame.addView(sampleView); } But when I do that from the backgroun...

[Android] Question on Application Lifecycle and onSaveInstanceState

My application interacts with the Browser in a couple of use cases: First Case: Start MyApplication ActivityA from launcher. Start MyApplication ActivityB using startActivityForResult (ActivityA's onSaveInstanceState is called). Start Browser using startActivity (ActivityB's onSaveInstanceState is called). Close browser or press B...

dynamically lunching activity in android

Hi, i am developing an application where one of my Activity contains a button as "Set as Home Page" . So my problem is that when i will click this button the status will be saved in the shared preference and next time when this application will be opened i want to start this Activity(the Activity which has been set as home page) inst...

Is there an API for Android to delete the web browser's saved passwords?

Is there an API for Android to delete the web browser's saved passwords? ...

Android SQLite database being deleted on "SQLiteDatabase.openDatabase"

I copy over a valid Android SQLite database from the apk to the databases folder on my AVD. I verify with the DDMS FileExplorer that it is there and the size is correct. When I call the following function to open it, mDb = SQLiteDatabase.openDatabase(mDatabase_path, null, SQLiteDatabase.OPEN_READONLY); The SQLite DB file is deleted ...

Android WebView Long Press NOT on link i.e in White Space

I can detect a long click on my WebView using the following code: webView.setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { Log.d("Debug","On Long Press Web View"); return false; } }); This works fine when i long press on a link, but do...

Testing FPS using Android plugin for Eclipse?

Hi Ive no doubt this question may have been addressed before but how can I turn on a framerate monitor to use when I run my programs using the android emulator so I can see exactly what my android game is achieving at a given time? thanks ...

Android SQLite Insert working, Query not working

Hello, this is my first time posting to this site so hopefully it will be a positive experience. I have an Android SQLite/ContentProvider problem that I have been beating my head against the wall for over the past 3 hours. Below is the ContentProvider code: public class IncidentProvider extends ContentProvider { private static final ...

[Eclipse] Application does not specify API level

I am just beginning to use Eclipse for Android applications. I have installed Eclipse 3.5.2 and Java 5 AVD is Android 2.1 API 7 My initial Hello Android program ran fine but will not run again. getting the following error: [2010-07-25 09:47:31 - HelloAndroid] WARNING: Application does not specify an API level requirement! [2010-0...

Can I customize the Android searchable.xml layout?

I was the Android Developer article on Search: http://developer.android.com/guide/topics/search/index.html and was wondering if I could add other UI Elements to the searchable.xml file? Here is what I want to do: <?xml version="1.0" encoding="utf-8"?> <searchable xmlns:android="http://schemas.android.com/apk/res/android" android:lab...

Help a newbie learn Eclipse/Android debugging best practices

Hello all, I am a newbie to Android and the Eclipse development environment and would like some advice on best practices for debugging my apps when they throw a Force Close. I have researched ADB, however, I can not get this to interact with my phone even though I have explicitly turned debug mode to true on my test handset. Obviously ...

Updating views of sub Activities of TabActivity from background process.

I am using a TabActivity (Main) with 3 TabSpecs I am using Intents for the content of the 3 Tabs TabA, TabB, TabC for example. All these tab activities use common data that is stored in SharedPreferences In the Main TabActivity I have an options menu which has a refresh option. @Override public boolean onCreateOptionsMenu(Menu menu) {...