Questions tagged [android-2.1-eclair]

For issues relating to developing with the Android SDK, version 2.1.

Android is Google's software stack for mobile devices. Please use the Android-specific tags such as [android-intent], not [intent]. For non-developer questions, see https://android.stackexchange.com.

96 questions
23
votes
2 answers

how can I pass a variable into a new Runnable declaration?

I have the following : Runnable done = new Runnable() { public void run() { System.out.println("Hello"); } }; And then in my Android activity I'll call something like : runOnUIThread(done); Which I then…
Jimmy
  • 15,225
  • 38
  • 120
  • 211
12
votes
1 answer

getExternalFilesDir alternative in android 2.1

I built an android app on android 2.2, for saving files into the SD card I use the following: context.getExternalFilesDir(null).getAbsolutePath(); returning a string like: /mnt/sdcard/Android/data/com.hello.example1/files Now I need to make my…
Ahmad Kayyali
  • 8,236
  • 13
  • 47
  • 83
11
votes
4 answers

Android start activity on Menu Item selection

I have 2 classes. One will be a basic instructions screen and on that screen it will have a menu that will let you go to the other class. The other class is a MapActivity. I believe the problem is that its not finding the other class. I've tried…
11
votes
1 answer

Understanding XML attributes for custom packages

I'm trying to use the drag/drop functionality from this fine project: https://github.com/bauerca/drag-sort-listview/ First, I've added the library using the instructions on GitHub. Second, I'm trying to use the XML declaration. This is my…
user5243421
  • 9,066
  • 22
  • 65
  • 102
11
votes
1 answer

Is there a way to add reminders to a new calendar event using Intents?

I need to support Android 2.1 and up. I know that CalendarContract isn't available in Android 2.1, so I've done the following workaround. Intent intent = new Intent(Intent.ACTION_EDIT) …
user5243421
  • 9,066
  • 22
  • 65
  • 102
10
votes
1 answer

Android:Translation and Rotation Animation simultaneously

I want to show two animation simultaneously programatically not in XML file.It should ROTATE and TRANSLATE how can I do that? Please suggest me some way?????? Here is ma code:> ImageView snowImg1 = (ImageView) findViewById(R.id.snowimg1); …
8
votes
1 answer

ConnectivityManager getActiveNetworkInfo() is always null even with data traffic active

i'm working on a android project and i had the need to check for internet connection. i searched the web and i found a solution here on stackoverflow. However, i'm having problems on checking the internet state. I already searched everywhere but i…
8
votes
1 answer

How to add structured data to a new contact Intent

I need to support Android 2.1 and up. Google posted an example of how to use the ContactsContract, but some of it used things that are available starting with API level 11, so I need to improvise, but I'm stuck. So, far I have this: …
user5243421
  • 9,066
  • 22
  • 65
  • 102
7
votes
3 answers

How can I force a GridView to use the whole screen (regardless of display size)?

I've got the following layout file, which has a GridView and an ImageView behind that as the background.
Jimmy
  • 15,225
  • 38
  • 120
  • 211
7
votes
3 answers

URI validation in JavaScript

What is a robust way (doesn't have to be regex, does it?) to validate that a URI works on Android by only using JavaScript? That is, the check is not done in Java on the Android SDK side; it's done in a webpage using JavaScript. EDIT: By "works on…
le noob
  • 93
  • 1
  • 4
5
votes
2 answers

Is there a flip animation available to use when transitioning between activities?

When transitioning between activities, such as calling startActivity(); or when using the back button, the screen slides in from the sides. Is there any way to alter this? I have a flash-card like application, so when I move from activity A to…
Jimmy
  • 15,225
  • 38
  • 120
  • 211
5
votes
3 answers

Why does my application appear 4 times on my device?

When I install my application onto a device or emulator it appears multiple times in the apps menu, in my case I get 4 icons showing my application name. It seems that each icon is representing an activity, and since my application contains 3…
Jimmy
  • 15,225
  • 38
  • 120
  • 211
4
votes
1 answer

Fail to sign Android APK from Jenkins, but works from command line

I've got the following build environment : Ubuntu Java 1.6.0_24 Apache ant 1.8.2 Jenkins 1.427 Jetty 6.1.26 I can create a release APK (zipaligned and signed) from the command line (in the jenkins workspace area), by running ant release and then…
Jimmy
  • 15,225
  • 38
  • 120
  • 211
4
votes
1 answer

Analogue of android:filterTouchesWhenObscured for API level below 9

Starting with API level 9, there's android:filterTouchesWhenObscured attribute and corresponding setFilterTouchesWhenObscured method on ViewGroup. For example, when a view has onClickListener set and another view obscures that view (e.g. an overlay…
Aleks G
  • 52,841
  • 25
  • 149
  • 233
3
votes
1 answer

App Crash in Crop Activity in 2.1,2.2 etc but works in 1.6

Hi Friends, I want to use the Crop Activity but it will Crash as to activity {com.CropActivity/com.CropActivity.CropActivity}: android.content.ActivityNotFoundException: Its Code is Properly Working in Andorid 1.6 but its Crash in 2.1 or 2.2.…
1
2 3 4 5 6 7