Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android]

Android is Google's mobile operating system, used for programming or developing digital devices (Smartphones, Tablets, Automobiles, TVs, Wear, Glass, IoT). For topics related to Android, use Android-specific tags such as android-intent, android-activity, android-adapter, etc. For questions other than development or programming but related to the Android framework, use this link: https://android.stackexchange.com.

6393 votes
34 answers
1.5m views

What is the difference between px, dip, dp, and sp?

What is the difference between the units of measure px, dip, dp, and sp?
capecrawler's user avatar
4354 votes
130 answers
1.9m views

How can I close/hide the Android soft keyboard programmatically?

I have an EditText and a Button in my layout. After writing in the edit field and clicking on the Button, I want to hide the virtual keyboard when touching outside the keyboard. Can someone provide a ...
4031 votes
12 answers
369k views

Proper use cases for Android UserManager.isUserAGoat()?

I was looking at the new APIs introduced in Android 4.2. While looking at the UserManager class I came across the following method: public boolean isUserAGoat() Used to determine whether the ...
Ovidiu Latcu's user avatar
  • 72.2k
3554 votes
78 answers
1.1m views

Why is the Android emulator so slow? How can we speed up the Android emulator?

I have got a 2.67  GHz Celeron processor, and 1.21  GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android Emulator should start fairly quickly on such a machine, but ...
3172 votes
54 answers
831k views

How to stop EditText from gaining focus when an activity starts in Android?

I have an Activity in Android, with two elements: EditText ListView When my Activity starts, the EditText immediately has the input focus (flashing cursor). I don't want any control to have input ...
Mark's user avatar
  • 39.8k
3095 votes
54 answers
1.3m views

Is there a unique Android device ID?

Do Android devices have a unique ID, and if so, what is a simple way to access it using Java?
Tyler's user avatar
  • 31.5k
2871 votes
35 answers
910k views

How can I save an activity state using the save instance state?

I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package com.android.hello; ...
Bernard's user avatar
  • 45.5k
2735 votes
65 answers
1.5m views

How can I fix 'android.os.NetworkOnMainThreadException'?

I got an error while running my Android project for RssReader. Code: URL url = new URL(urlToRssFeed); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory....
bejoy george's user avatar
  • 29.7k
2328 votes
75 answers
1.5m views

How do I center text horizontally and vertically in a TextView?

How do I center the text horizontally and vertically in a TextView, so that it appears exactly in the middle of the TextView in Android?
Pablo Fernandez's user avatar
2259 votes
32 answers
821k views

What is 'Context' on Android?

In Android programming, what exactly is a Context class and what is it used for? I read about it on the developer site, but I am unable to understand it clearly.
Brigadier's user avatar
  • 23.4k
2084 votes
41 answers
579k views

How to lazy load images in ListView in Android

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI ...
lostInTransit's user avatar
2084 votes
23 answers
768k views

Is there a way to run Python on Android?

We are working on an S60 version and this platform has a nice Python API.. However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the ...
Bite code's user avatar
  • 591k
1992 votes
18 answers
284k views

"Debug certificate expired" error in Eclipse Android plugins

I am using Eclipse Android plugins to build a project, but I am getting this error in the console window: [2010-02-03 10:31:14 - androidVNC]Error generating final archive: Debug certificate expired ...
hap497's user avatar
  • 160k
1968 votes
44 answers
1.2m views

How to get screen dimensions as pixels in Android

I created some custom elements, and I want to programmatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge). Therefore I need to get the screen ...
Niko Gamulin's user avatar
  • 66.4k
1729 votes
39 answers
1.6m views

Android 8: Cleartext HTTP traffic not permitted

I had reports from users with Android 8 that my app (that uses back-end feed) does not show content. After investigation I found following Exception happening on Android 8: 08-29 12:03:11.246 11285-...
david.s's user avatar
  • 17.5k

15 30 50 per page
1
2 3 4 5
94631