android

Is programming for Android completely different fron programming for iPhone?

I have made apps for the iPhone, but want to also code for the Android but want to know if it is first worth my time, second worth my having to learn another language, and third worth the effort in the sense that am I going to make a profit from this. Also if in any way Android code is similar, then will it be hard to bring the iPhone (X...

Can't get height of Widgets

Hi guys. I am facing a problem when gets height/width of TextView. My code : @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv1 = (TextView)findViewById(R.id.textview1); int h1 = tv1.getHeight(); TextView tv2 = (TextView)findViewByI...

Android Programming - locking application

Hi all u geeks out there... i'm a novice in Android programming though had tried my hand on blackberry... currently i was asked 4 the possibility of making an application which can control access to other applications on Android... I mean something like asking password everytime some selected apps are opened... My question is.. "is it ...

How to test the performance of an Android application?

How can I test an application for performance in Android? What is the support provided in Android and how do I use it? ...

Connection between View in the xml file and extened View class

hi guys. Is there a way to link inherit class to xml file. I am trying to connect extended class to widget in the xml file. Is it possible ? Thanks in advance. ...

How to get the ListView with carousel scrolling on Android?

Hi, I would like to have a ListView that scrolls in a carousel way, so when you scroll to the bottom and continue scolling, it should get back to the top element. I do not want to use ViewSwitcher, nor ViewFlipper. How can I achieve that? BR blacharnia ...

Centre a button in a Linear layout

I am using a linear layout to display a pretty light initial screen. It has 1 button that is supposed to centre in the screen both horizontally and vertically. However no matter what I try to do the button will top align centre. I have included the XML below, can some one point me in the right direction? Thanks <?xml version="1.0" e...

Is there any widget for password entry?

I was tryin to find any class to define a password field? How can we do that? Do we have a class for that or some method to edittext? ...

Which package do we use to make HTTP connections?

I am trying to make HTTP get & post connections. Which package is recommended for that? Is it java.net or org.apache.http? Does java.net comes included in the sdk? Any reference/code to connection makin would be appreciable as well. ...

Settings screen layout style

I am creating a new settings screen for my app and want to keep the look and feel similar to that of the standard applications. I have seen many 3rd party apps also follow this style (Twidroid for example) and would like to know how best to go about creating this look? Is there a "template" or Activity I can use or is it a case of cons...

android: simple LinearLayout and fill_parent question

I'm sure I am missing something simple... Background: I am new to android and UI design, and I just wanted to play around with layouts. Right now I want to stack a checkbox on top of text label. I am using the following xml layout which works fine: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.andr...

android - list items open context menus

Hi, I'm new to Android. I have a list of items and trying to associate single context menus to each list item. Have set setListAdapter and onListItemClick but when i click on any list item i get always the same context menu. Ideally, list item A should trigger menu A when cliccked and list item B should get menu B. Can't figure out how t...

How can I unlock the screen programmatically in Android?

I am working on a remote automated test framework for Android based on JUnit (tests run outside android, interacting with code inside it). It's all working fairly well, but one issue I have is that when I automatically start a fresh emulator, the screen starts out locked. This appears to affect my tests being able to run, plus, I want to...

android: how to create different "screens" and nav between them using touch-and-drag?

Can i create the same kind of navigation that I have on the main screens? That is, I want different screens that I can navigate between using the touch-and-drag? I haven't seen anything about it, so it was time to ask :) Oh, Im talking about apps for android :) ...

How do I detect user's location from a webpage opened in the Android browser?

Visiting www.google.com on the Android browser (or even with an android spoofed user-agent), presents the option to "Share Location". When clicked, it uses the GPS/Cell phone towers to figure out the location. I tried the google.loader.clientLocation but that only works using the IP address. Is there a method to tap into the Android OS...

Is there any way to make ADT project directory layout more flexible?

I asked this question on the android-developers group but didn't get any response, so I thought I'd try here. The ADT eclipse plugin seems to have a pretty rigid idea of how an Android project should be structured - per http://developer.android.com/guide/developing/eclipse-adt.html, it needs to have the AndroidManifest.xml file at the r...

Which class should we use for sending sms/text messages?

Hi, What class can we use to send a text message? I tried this on the emulator, 2.0: import android.telephony.SmsManager; SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(...); and that works ok. On my G1 running 1.5, I get a verify error, guessing because SmsManager is not available in 1.5. Maybe for 1.5 we need to use ...

Turn off autosuggest for EditText?

Is there a way to programmatically turn off that autosuggest list which pops up as you type in EditText? ...

HttpGet in android, UnresolvedHostException

Hello, I'm quite new to android and try to implement http client to communicate to a REST server. I'm starting with the Get method but I have some problems using android 2.0 on the emulator. String url = "http://www.google.fr/search?q=android" HttpClient client = new DefaultHttpClient(new BasicHttpParams()); HttpGet getMethod = new Htt...

intent-filter with android:priority setting

Dear all, I test the intent-filter android:priority="0 and intent-filter android:priority="20" by android.intent.category.HOME. I list the information below, <activity android:name=".TestHomeActivity" android:label="@string/app_name"> <intent-filter android:priority="0"> <action android:name="android.intent.actio...