Questions tagged [android-sdk-2.1]

For issues relating to developing with the android SDK, version 2.1 API level 7

Android 2.1 is a minor platform release deployable to Android-powered handsets starting in January 2010. This release includes new API changes and bug fixes. For information on changes, see the Framework API section.

Read More : Android 2.1

178 questions
1
vote
1 answer

findviewbyid doesn't work in android

import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast; public class ViewId extends Activity { /** Called when the activity is first created. */ @Override public void…
Nirav
  • 5,700
  • 4
  • 34
  • 44
1
vote
1 answer

Android 2.1 standard recycle bin icon

I'd like to use in my own app the standard android icon, which is displayed when I delete widgets from my desktop (Android 2.1). But I can't find it in the SDK. Where do I find it?
netimen
  • 4,199
  • 6
  • 41
  • 65
1
vote
1 answer

Android: Camera Preview Orientation on HTC EVO (Android 2.1 or 2.2)

I am developing an Android application that relies on the camera API, using an HTC EVO as my testing device. No matter what I've tried so far, the only time the camera preview looks right is in landscape mode (90 degrees rotation, to be specific).…
mahdaeng
  • 791
  • 4
  • 15
  • 25
1
vote
0 answers

Newly added contacts not visible in Android Emulator contacts

I am adding new contacts as follows:- ContentValues values = new ContentValues(); String accountType = "test@gmail.com"; values.put(RawContacts.ACCOUNT_TYPE, accountType ); String accountName = "com.google"; …
cpp11dev
  • 417
  • 6
  • 13
1
vote
1 answer

Force close the web browser

I have a twitter application which uses Sign-in with twitter. It's 'Settings' screen opens an instance of web browser which goes to twitter, asks the user to authenticate my client application, and comes back to the 'Settings' page after redirection…
Aman Alam
  • 11,231
  • 7
  • 46
  • 81
1
vote
1 answer

What would be an effective way to put a marker drawable on the mapview everytime the user clicks the map

I am playing around with Android MapView and have come across a requirement, where i have to put a marker at the place where the user clicks. in my scenario, the user can pan a map , zoom in and out, and click wherever she likes. in this case, the…
Aman Alam
  • 11,231
  • 7
  • 46
  • 81
1
vote
3 answers

ListView shows no Feedback

I stumbled about a strange problem with ListViews. In the emulator the ListView shows no feedback, when an item is pressed for selection. I think I have seen that in the real thing, but I am not sure. I would expect that the list item gets selected…
Rene
  • 3,746
  • 9
  • 29
  • 33
1
vote
2 answers

Android: Move point on the google map when clicking somewhere on the map

I want to give my users oppertinty to choose destination. from the beginning it will already have a point on the map, and after that they can choose/change to another location if they want.. how is it possible to change the point on the map, by…
Troj
  • 11,781
  • 12
  • 40
  • 49
1
vote
1 answer

phone gap android environment setup

I am try to get the android environment setup for phone gap and I keep getting this error when I try and create the phonegap project. ruby bin/droidgap create MyTestApp c:/phonegap-android/lid/create.rb:24:in ``: no such file or dirctory -…
ianmac
  • 39
  • 5
1
vote
2 answers

Listview hide scrollbar when not scrolling

As the title says I want to hide a listview's scrollbar when the listview isn't scrolling and show it when scrolling. I know this can be done very easy by setting "android:fadeScrollbars" as an application style if the API is 5 or newer. But I want…
Gratzi
  • 4,633
  • 12
  • 42
  • 58
1
vote
1 answer

How to display images on demand inside a listview?

I am building a android aplication which will be consuming a json file from the internet. This json file contains a list of news from a particular website. Each json object contains information such like title, summary, descripition and web links…
Thiago
  • 5,152
  • 11
  • 35
  • 44
1
vote
1 answer

How to load activity before loading all images?

I have been struggling with this problem for many days. please help me.. In my android application i am trying to download images from remote server dynamically ( no of images dynamically come ). for downloading all images it is taking 30 to 40…
1
vote
4 answers

Android XML Layout

How do i define a following layout in my xml file: I hope you got it from image that i want to display TextView1 on 1st Row, and in 2nd Row, TextView2 on Left and TextView3 on Right side. How do i define this layout? i know the layout_gravity…
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
1
vote
1 answer

Getting really weird long Contact Group names

When looking at the Contact Groups on Google Contacts or in the People application of my HTC Legend phone, I get the groups names ok eg: Friends, Family, VIP, Favorite etc... But in my application I get really wrong names such as "Family" became…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
1
vote
1 answer

Why would JmDNS service discovery work on a Motorola Droid running Android 2.1-update1 and not on an HTC Incredible running the same Android version?

I have successfully gotten JmDNS working on Android 2.1 testing on a Motorola Droid by using MulticastLock, but recently got an HTC Incredible as second test device, and JmDNS discovery doesn't work at all. I should mention that broadcasting a…
Churlbong
  • 148
  • 6