android

how to set image's margin top using coding not xml in android

Hi Friends, i am using android:layout_marginTop="100dip" in my imageview,i want to set margin top to each image depending its height using coding not using xml,how can i set image's margintop? ...

Google standard calendar on phone?

How to check if the standard Google calendar application is available on the phone? ...

Application for Child Monitoring

I am starting an application for child monitoring. This would involve mainly the logging of the SMS messages sent and received and logging other activities that may be of interest to the parents. It will also be nice to have something like access control lists for these, too. Now, as far as I know: It is not possible to make an app "n...

Android: InputConnection is missing a getSelection() method

Why do I have a setSelection in InputConnection, but not a getSelection()? Should I just do a getTextBeforeCursor(VERY_HIGH_NUMBER, 0) and calculate the .length() of that string? ...

Using ACTION_EDIT Intent to add calendar item on SE Xperia mini

Hello, I am adding calendar items from my source with this code: Intent oIntent = new Intent (Intent.ACTION_EDIT); oIntent.setType ("vnd.android.cursor.item/event"); oIntent.putExtra ("title", "test"); oIntent.putExtra ("description", "test2"); oIntent.putExtra ("eventLocation", "somewhere"); oIntent.putExtra ("beginTime", Syste...

how to stop scrollbars when certain condition met while onscrollListener event.

friend's how can i stop scrolling of listview when certain condition met,i got the logic to stop scrolling,but i don't know code snippet to stop scrolling of scrollbars to place under this condition,anybody provide me that code snippet. Thanks in advance. ...

What component to use to make a toolbar under android ?

I've been using the component Gallery has a toolbar, but I'm not so much satisfied because I didnt find how to set up her position on init. Does anybody know a component to use to have kind of 5 or more icons, kind of toolbar to use under android. Can you give a code example? ...

Can A Listener Trigger An InterruptedException?

Hi I was just wondering if I have a touchscreen device that has an onTouchListener, will current execution of a method switch immediately to that listener method when the screen is touched, and could this be used to trigger an interrupted exception of a try catch block. For example, if I have a method that does something and then reduc...

Creating a default viewer / receiver for Android email attachments

I'm trying to create a default handler for .p7s/.p7b files in Android. I figured the best start would be to create a BroadcastReceiver that will capture the intent from the Android email application (or K-9 if that's a need) for opening of certain attachments (filtered by mime type). Specifically I'm trying to handle s/mime email so loo...

how to set image view property in coding for android

<ImageView android:id="@+id/ImageView01" android:layout_gravity="center_horizontal" android:layout_marginTop="30dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitCenter" android:adjustViewBounds="true"> hi friends, i want to set this property in coding for image...

android ui thread

can someone explain to me what exactly the ui thread is ? on developer.android.com it saysabout the runOnUiThread function " public final void runOnUiThread (Runnable action) Since: API Level 1 Runs the specified action on the UI thread. If the current thread is the UI thread, then the action is executed immediately. If the current thre...

Android: EditText listener for cursor position change

I'm looking for a way to detect a cursor position changed in an EditText. I couldn't find anything in the documentation so far. Has anyone solved this already? ...

Android eclipse resource strings error

When I make a new android project and I go to res/values/string.xml I get a screen to add android resources instead of a XML document. I keeps getting the error about : java.lang.NullPointerException. Is there a way to just alter a XML file (like suggested in tutorials)? ...

Enhance webView performance (should be the same performance as native Web Browser)

My experience is that loading websites in a WebView is much slower than performing the same actions in the Android Web Browser. I can see that all files have been loaded in my Apache log, it will take a few seconds until the page is displayed in the WebView control, however. Opening the same page in the native Web browser will result in ...

android : Dynamic layout ?

Hi, Im trying to have a searchbox on the top of my list view. But I want this searchbox to disapear sometimes and the listview to resize to regain space. Is there a way I can do that without reloading another and different layout ??? is there a way to add and remove a component from the current view ?I have been playing with setvisibil...

android timer handler

i am using this code public class newtimer extends Activity { private Timer myTimer; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); myTimer = new Timer(); myTimer.schedule(new TimerTask() { @Override public void run() { TimerMethod...

Sounds cut off early on some phones

Hi, I'm the developer of a Soundboard app. A lot of users have reported me that in their phones some of the sounds cut off early. I have a Nexus One and a HTC Tattoo and everything works fine, I've never noticed the cut off in my phones. This is my code for the audio part: First, I have a MediaPlayer object in my main class: private ...

Android: serving two simultaneous InputConnections

I'm working on a personalized keyboard and I'm wondering if there is a way to add another EditText to a InputConnection. So that I can serve the EditText from the user's application, but also a second EditText, which I have on a special input screen of my keyboard. This screen gets opened when I hit a special button on the keyboard. The ...

Android activities question

I have three activities, A, B and C. User can start activity B from A, and then C from B. I would like to have following. In C the user fill some field and click "OK"-Button. After that both activities B and C should be finished. I don't like my idea, to finish A after starting B, then finish B after starting C, and then start A from ...

ANDROID: Possible to download imagview to phone or set an imagview as background?

I have an app that contains a picture gallery when one of the items in the gallery is pressed, the item clicked views as an imageview fullscreen. WHat I am then trying to do is allow the user to select whether to download the imageview to the phone or set it as a background...is this possible? How would I go about this? Thanks! ...