Search Results

Search found 18860 results on 755 pages for 'android context'.

Page 49/755 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Is it possible to open a context menu from a map overlay item in android?

    - by John Nicholson
    This below code works fine opening an alert dialog. I was wondering if it's possible to open a context menu from within a map overlay class? @Override protected boolean onTap(int index) { OverlayItem item = mOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show(); return true; }

    Read the article

  • How to show empty view when ListView is empty?

    - by Sheehan Alam
    Here is my layout. For some reason the empty view (TextView in this case) always appears, even when the List is not empty. I thought the ListView would automatically detect when to show the empty view. How can I hook up the empty view properly? <RelativeLayout android:id="@+id/LinearLayoutAR" android:layout_height="fill_parent" android:layout_width="fill_parent"> <ListView android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ARListView"></ListView> <ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/arProgressBar" android:layout_centerHorizontal="true" android:layout_centerVertical="true"></ProgressBar> <!-- Here is the view to show if the list is emtpy --> <TextView android:id="@id/android:empty" android:layout_width="match_parent" android:layout_height="match_parent" android:text="No Results" /> </RelativeLayout>

    Read the article

  • Is content from AJAX call added to Django context variable

    - by John
    Hi, I am using the JQuery load function to load part of my page. Can I access the variables from that page in the page that loads it. e.g. Page A uses JQuery load function to load B Page B loads and sets a variable in context called pageB_var which holds a django object Page A can then access this variable by doing {{pageB_var}} since it was added to the context If not what is the best way of doing this? Thanks

    Read the article

  • Android - what's the difference between the various methods to get a Context?

    - by Alnitak
    In various bits of Android code I've seen: public class MyActivity extends Activity { public void method() { mContext = this; // since Activity extends Context mContext = getApplicationContext(); mContext = getBaseContext(); } } However I can't find any decent explanation of which is preferable, and under what circumstances which should be used. Pointers to documentation on this, and guidance about what might break if the wrong one is chosen, would be much appreciated.

    Read the article

  • Android MediaPlayer ignores it's internal volume when the system volume changes

    - by Daniel Flower
    Hi, here is my situation: I have a media player playing music in an Android application. I've found that with certain headphones, the volume is much too loud even when the volume is set to it's lowest setting. As a result, I want to change the volume of the music for all volume levels to be 10% of what it normally is (actually, this value is user-defined of course). The following works perfectly: mediaPlayer.setVolume(0.1f, 0.1f); The volume of the music is now at a good level for listening. However, if the user now changes the volume using the volume rocker (thus changing the music stream volume), the media player changes the volume as expected, but it also seems to reset the 'setVolume' parameters to 1.0, causing a massive volume change. Setting the volume back to 0.1 sets the volume to how it should be (which is 10% of the current music stream volume). To quote the Android docs for the MediaPlayer.setVolume method: This API is recommended for balancing the output of audio streams within an application How can you do this if it gets reset to 1.0 each time the system volume changes? Any help muchly appreciated. Thanks.

    Read the article

  • Android Get Image Uri from Camera

    - by josnidhin
    Hi I have an application that calls the android phone's default camera to take photo the following is my code. Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, TAKE_PICTURE); and in the onActivityResult method I am doing the following if ((requestCode == TAKE_PICTURE) && (resultCode == Activity.RESULT_OK)) { Uri photoPath = intent.getData(); // do something with the uri here } The above code works fine on htc Tatto and Sony ericsson's x10 running 1.6 but in on htc G1 running 1.6 the above code causes the following exception 03-08 18:54:25.906: ERROR/AndroidRuntime(4344): Uncaught handler: thread main exiting due to uncaught exception 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity removed java.lang.NullPointerException 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.deliverResults(ActivityThread.java:3224) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3266) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.access$2600(ActivityThread.java:116) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1823) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.os.Handler.dispatchMessage(Handler.java:99) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.os.Looper.loop(Looper.java:123) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.main(ActivityThread.java:4203) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at java.lang.reflect.Method.invokeNative(Native Method) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at java.lang.reflect.Method.invoke(Method.java:521) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at dalvik.system.NativeStart.main(Native Method) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): Caused by: java.lang.NullPointerException 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at removed 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.Activity.dispatchActivityResult(Activity.java:3624) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.deliverResults(ActivityThread.java:3220) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): ... 11 more Any insights into how to solve this problem. Thank you.

    Read the article

  • Changing the Android emulator locale automatically

    - by Christopher
    For automated testing (using Hudson) I have a script that generates a bunch of emulators for many combinations of Android OS version, screen resolution, screen density and language. This works fine, except for the language part. I need to find a way to change the Android system locale automatically. Here's some approaches I can think of, in order of preference: Extracting/editing/repacking a QEMU image directly before starting the emulator Running some sort of system-locale-changing APK on the emulator after startup Changing the locale settings on the emulator filesystem after startup Changing the locale settings in some SQLite DB on the emulator after startup Running a key sequence (via the emulator's telnet interface) that would open the settings app and change the locale Manually starting the emulator for each platform version, changing the locale by hand in the settings, saving it and archiving the images for later deployment Any ideas whether this can be done, either via the above methods or otherwise? Do you know where locale settings are persisted to/read from by the system? Solution: Thanks to dtmilano's info about the relevant properties, and some further investigation on my part, I came up with a solution even better and simpler simpler than all the ideas above! I have updated the answer below with the details.

    Read the article

  • Android NDK jni problem

    - by Donal Rafferty
    I have started teaching myself about the Android NDK and I have followed this example here - http://marakana.com/forums/android/android_examples/49.html I have followed the steps perfectly but when I run the application I get the following error: Trying to load lib /data/data/com.cnetworks.ndk/lib/libndk_demo.so 0x435c2d20 Added shared lib /data/data/com.cnetworks.ndk/lib/libndk_demo.so 0x435c2d20 No JNI_OnLoad found in /data/data/com.cnetworks.ndk/lib/libndk_demo.so 0x435c2d20 +++ not scanning '/system/lib/libwebcore.so' for 'hello' (wrong CL) +++ not scanning '/system/lib/libmedia_jni.so' for 'hello' (wrong CL) WARN/dalvikvm(5191): No implementation found for native Lcom/cnetworks/ndk/NativeLib;.hello ()Ljava/lang/String; Here is the java code, nativeLib.hello() is causing the problem. public class NDKdemo2 extends Activity { NativeLib nativeLib; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); nativeLib = new NativeLib(); String helloText = nativeLib.hello(); // Update the UI TextView outText = (TextView) findViewById(R.id.textOut); outText.setText(helloText); } } Has anyone had the same problem before and able to tell me whats wrong?

    Read the article

  • Remove appearance of TextField in droidText : Android

    - by AnujAroshA
    I am trying to create a PDF using droidText library. There I want to place some text content in the middle of the page but align to left. I was unable to do with Paragraph class and setAlignment() method. So I have decided to use TextField class. Below is the code I have used, Document document = new Document(PageSize.A4); try { PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + "TextFields.pdf")); document.open(); TextField tf = new TextField(writer, new Rectangle(100, 300, 200, 350), "Content"); tf.setText("This is the content of text field"); tf.setAlignment(Element.ALIGN_CENTER); tf.setOptions(TextField.MULTILINE | TextField.REQUIRED); PdfFormField field = tf.getTextField(); writer.addAnnotation(field); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } document.close(); Code works perfect, but the out put PDF file that I am getting has this TextField which can be editable and also change the font appearance when I am click on the TextField. I don't want that in to my final PDF. How can I remove that attribute? If it is not possible, is there any other way I can position some text in a PDF file using droidText library in Android?

    Read the article

  • Android Scan for Wifi networks

    - by Nils
    Hello, I'm trying to scan for wireless networks and found this helpful source on the net. Unfortunately it's not working and I have no idea why. My problem is that I can't wait 10 minutes for the result - I need them within a few seconds and thought about setting the boolean variable waiting on false as soon as I get a result.... well, it runs forever ... looks like nothing is received. Any idea ? Thanks. // -- Sample WiFi implementation - http://groups.google.com/group/android-developers/browse_thread/thread/f722d5f90cfae69 IntentFilter i = new IntentFilter(); i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Context c, Intent i){ // Code to execute when SCAN_RESULTS_AVAILABLE_ACTION event occurs mWifiManager = (WifiManager) c.getSystemService(Context.WIFI_SERVICE); wireless = mWifiManager.getScanResults(); // Returns a <list> of scanResults waiting = false; } } ,i); // -- End Wifi Sample mWifiManager.startScan(); while (waiting) { try { Thread.sleep(200); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } Log.d("PROJECT1","Wifi WAITING"); }

    Read the article

  • AndEngine VS Android's Canvas VS OpenGLES - For rendering a 2D indoor vector map

    - by Orchestrator
    This is a big issue for me I'm trying to figure out for a long time already. I'm working on an application that should include a 2D vector indoor map in it. The map will be drawn out from an .svg file that will specify all the data of the lines, curved lines (path) and rectangles that should be drawn. My main requirement from the map are Support touch events to detect where exactly the finger is touching. Great image quality especially when considering the drawings of curved and diagonal lines (anti-aliasing) Optional but very nice to have - Built in ability to zoom, pan and rotate. So far I tried AndEngine and Android's canvas. With AndEngine I had troubles with implementing anti-aliasing for rendering smooth diagonal lines or drawing curved lines, and as far as I understand, this is not an easy thing to implement in AndEngine. Though I have to mention that AndEngine's ability to zoom in and pan with the camera instead of modifying the objects on the screen was really nice to have. I also had some little experience with the built in Android's Canvas, mainly with viewing simple bitmaps, but I'm not sure if it supports all of these things, and especially if it would provide smooth results. Last but no least, there's the option of just plain OpenGLES 1 or 2, that as far as I understand, with enough work should be able to support all the features I require. However it seems like something that would be hard to implement. And I've never programmed in OpenGL or anything like it, but I'm willing very much to learn. To sum it all up, I need a platform that would provide me with the ability to do the 3 things I mentioned before, but also very important - To allow me to implement this feature as fast as possible. Any kind of answer or suggestion would be very much welcomed as I'm very eager to solve this problem! Thanks!

    Read the article

  • Android application transparency and window sizing at root level

    - by ajoburg
    Is it possible to create an application with a transparent background on the root task such that you can see the task running beneath it when it is part of a separate stack? Alternatively, is it possible to run an application so the window of the root task is only a portion of the screen instead of the whole screen? I understand how the transparency and window sizing is done with activities that are not the root task and this works fine. However, the root task of an activity seems to always fill the whole screen and be black even when a transparent theme is applied to the application object in the manifest file. ApplicationManifest.xml: <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" android:theme="@style/Theme.Transparent"> Styles.xml <resources> <style name="Theme.Transparent"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">@drawable/ transparent_background</item> <item name="android:windowAnimationStyle">@android:style/ Animation.Translucent</item> <item name="android:colorForeground">#fff</item> <item name="android:windowIsFloating">true</item> <item name="android:gravity">bottom</item> </style> </resources> Colors.xml <resources> <drawable name="transparent_background">#00000000</drawable> </resources>

    Read the article

  • Problem building STLport NDK r5/ Android

    - by user558299
    Hi all, I'm trying to build STLport for Android. I got the following steps, but they are not working: 1 - Clone STLport repository using: git clone git://stlport.git.sourceforge.net/gitroot/stlport/stlport 2 - Configure environment using : ./configure --target=arm-eabi --with-extra-cxxflags="-fshort-enums" --with-extra-cflags="-fshort-enums" 3 - From src directory build it using make SYSROOT"{MY NDK path}/platforms/android-5/arch-arm/" release-static But I got the following errors: In file included from ../stlport/stl/_alloc.h:45, from ../stlport/memory:29, from dll_main.cpp:41: ../stlport/stl/_new.h:45:24: error: new: No such file or directory In file included from ../stlport/stl/_limits.h:36, from ../stlport/limits:29, from dll_main.cpp:48: ../stlport/stl/_cwchar.h:26:30: error: cstddef: No such file or directory In file included from ../stlport/stl/_utility.h:35, from ../stlport/utility:35, from dll_main.cpp:40: ../stlport/type_traits:889: error: 'declval' was not declared in this scope ../stlport/type_traits:889: error: expected primary-expression before '>' token ../stlport/type_traits:889: error: expected primary-expression before ')' token ../stlport/type_traits:889: error: 'declval' was not declared in this scope ../stlport/type_traits:889: error: expected primary-expression before '>' token ../stlport/type_traits:889: error: expected primary-expression before ')' token ../stlport/type_traits:889: error: ISO C++ forbids declaration of 'decltype' with no type ../stlport/type_traits:889: error: ISO C++ forbids in-class initialization of non-const static member 'decltype' ../stlport/type_traits:889: error: template declaration of 'int std::tr1::detail::decltype' ../stlport/type_traits:942: error: ISO C++ forbids declaration of 'decltype' with no type ../stlport/type_traits:942: error: ISO C++ forbids in-class initialization of non-const static member 'decltype' ../stlport/type_traits:942: error: template declaration of 'int std::tr1::detail::decltype' make: *** [obj/arm-eabi-gcc/so/dll_main.o] Error 1 Is there any include dir or configuration I´m missing? Thanks, Sergio

    Read the article

  • Help regarding Android NDK

    - by Siva Kumar
    I am a beginner in using Android NDK. I am using Eclipse and I installed cygwin to build the c file to generate the .so file But while building the c file in cygwin I am always getting the error make: ***No rule to make target 'file.c' ... .Stop I tried building different C codes but for every file it says the same error .. Here is the source code: public class ndktest extends Activity { static { System.loadLibrary("ndkt"); } private native void helloLog(String logThis); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); helloLog("this is to test log file"); } } file.c void Java_com_ndktest_helloLog(JNIEnv * env, jobject this, jstring logThis) { jboolean isCopy; const char * szLogThis = (*env)->GetStringUTFChars(env, logThis, &isCopy); (*env)->ReleaseStringUTFChars(env, logThis, szLogThis); } And here is my Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_LDLIBS := -llog LOCAL_MODULE := ndkt LOCAL_SRC_FILES := file.c include $(BUILD_SHARED_LIBRARY) I searched for the solution for the cause of error ... but nothing works for me. Can anyone tell me where I am making the mistake ? Thanks, Siva Kumar

    Read the article

  • Does android maps support ground overlay?

    - by wmh1108
    I have a weather image I would like to use as an overlay in the google maps android api. I would like to achieve the same result that I get from using GroundOverlay in KML files, such as <GroundOverlay> <name>myimage</name> <Icon> <href>myimage.png</href> <viewBoundScale>0.75</viewBoundScale> </Icon> <LatLonBox> <north>75.6088</north> <south>5.0121</south> <east>182.2805</east> <west>120.6795</west> </LatLonBox> </GroundOverlay> The above will ensure that the 4 corners of my image stay anchored to the 4 lat/long points listed, regardless of scrolling, zooming etc.. Is there a way to accomplish this using the google api/maps provided for android?

    Read the article

  • Android, how to use DexClassLoader to dynamically replace an Activity or Service

    - by RickNotFred
    I am trying to do something similar to this stackoverflow posting. What I want to do is to read the definition of an activity or service from the SD card. To avoid manifest permission issues, I create a shell version of this activity in the .apk, but try to replace it with an activity of the same name residing on the SD card at run time. Unfortunately, I am able to load the activity class definition from the SD card using DexClassLoader, but the original class definition is the one that is executed. Is there a way to specify that the new class definition replaces the old one, or any suggestions on avoiding the manifest permission issues without actually providing the needed activity in the package? The code sample: ClassLoader cl = new DexClassLoader("/sdcard/mypath/My.apk", getFilesDir().getAbsolutePath(), null, MainActivity.class.getClassLoader()); try { Class<?> c = cl.loadClass("com.android.my.path.to.a.loaded.activity"); Intent i = new Intent(getBaseContext(), c); startActivity(i); } catch (Exception e) { Intead of launching the com.android.my.path.to.a.loaded.activity specified in /sdcard/mypath/My.apk, it launches the activity statically loaded into the project.

    Read the article

  • Android Plugin in Eclipse 3.5 on Ubuntu 64bit got problems with properties

    - by Zordid
    Hi there! I got a huge problem with the Android Development Tools ADT running in Eclipse Galileo (3.5.1) on Ubuntu 9.10, 64bit. On this platform, I do not manage to see any property edit dialogs for layout properties. E.g. the one where you can select a string resource ID for text fields, or a drawable ID for image fields or backgrounds. Whenever I click on the ... button next to the property value - nothing happens, except this button disappears. Properties with a list of possible values, e.g. "wrap_content" or "fill_parent" are displayed in a dropdown box directly in the properties field. On a different system I work in a Windows environment with Eclipse 3.4 and the same ADT: no problems whatsoever, everything works fine, the dialogs come perfectly. Does anyone know what to do here? Where's the problem? Why does Eclipse not tell me that something goes wrong? Thanks! NEW DISCOVERIES: I found out that it might not even be an Android problem, but a general Eclipse problem that I can see with all version (Ganymede, Galileo, Helios) on my Linux (Ubuntu) system. It must be a simple UI problem: the button with ... next to the values does not receive the mouse click!! I managed to see the appropriate dialogs to edit the property values by doubleclicking the button - crazy, strange, ugly behavior! But why on earth does nobody else know about this problem - I cannot find anything else on the net about it! Could it be related to this strange "GDK native window problem" on Gnome? HELP!

    Read the article

  • Android map overly transparency has unwanted gradient

    - by DavidP2190
    I'm a making my first android app and for part of it I need some shaded areas over a mapview. I've got this working so far but the when I set the alpha of the fill colour, it goes strange. I'm not allowed to post images yet, but you can see what happens here: http://i.imgur.com/leXmc.png I'm not sure what causes it, but here is some code from where it gets drawn. public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { Paint paint = new Paint(); paint.setStrokeWidth(2); paint.setColor(android.graphics.Color.GREEN); paint.setStyle(Paint.Style.FILL_AND_STROKE); paint.setAlpha(25); screenPoints = new Point[10]; Path path = new Path(); for (int x = 0; x<greenZone.length; x++){ screenPoints[x] = new Point(); mapView.getProjection().toPixels(greenZone[x], screenPoints[x]); } path.moveTo(screenPoints[0].x, screenPoints[0].y); for (int x = 1; x < screenPoints.length-1; x++){ paint.setAlpha(25); if (x<9){ path.lineTo(screenPoints[x].x, screenPoints[x].y); canvas.drawPath(path, paint); } else{ path.moveTo(screenPoints[screenPoints.length-1].x, screenPoints[screenPoints.length-1].y); path.lineTo(screenPoints[0].x, screenPoints[0].y); canvas.drawPath(path, paint); } } return true; } Thanks.

    Read the article

  • java.lang.OutOfMemoryError: bitmap size exceeds VM budget

    - by Angel
    Hi, I am trying to change the layout of my application from portrait to landscape and vice-versa. But if i do it frequently or more than once then at times my application crashes.. Below is the error log. Please suggest what can be done? < 01-06 09:52:27.787: ERROR/dalvikvm-heap(17473): 1550532-byte external allocation too large for this process. 01-06 09:52:27.787: ERROR/dalvikvm(17473): Out of memory: Heap Size=6471KB, Allocated=4075KB, Bitmap Size=9564KB 01-06 09:52:27.787: ERROR/(17473): VM won't let us allocate 1550532 bytes 01-06 09:52:27.798: DEBUG/skia(17473): --- decoder-decode returned false 01-06 09:52:27.798: DEBUG/AndroidRuntime(17473): Shutting down VM 01-06 09:52:27.798: WARN/dalvikvm(17473): threadid=3: thread exiting with uncaught exception (group=0x4001e390) 01-06 09:52:27.807: ERROR/AndroidRuntime(17473): Uncaught handler: thread main exiting due to uncaught exception 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #2: Error inflating class 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3812) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.access$2300(ActivityThread.java:126) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1936) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.os.Handler.dispatchMessage(Handler.java:99) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.os.Looper.loop(Looper.java:123) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.main(ActivityThread.java:4595) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at java.lang.reflect.Method.invokeNative(Native Method) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at java.lang.reflect.Method.invoke(Method.java:521) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at dalvik.system.NativeStart.main(Native Method) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.createView(LayoutInflater.java:513) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.inflate(LayoutInflater.java:385) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.Activity.setContentView(Activity.java:1629) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at onCreate(Game.java:98) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): ... 12 more 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): Caused by: java.lang.reflect.InvocationTargetException 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.widget.LinearLayout.(LinearLayout.java:92) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at java.lang.reflect.Constructor.constructNative(Native Method) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at java.lang.reflect.Constructor.newInstance(Constructor.java:446) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.LayoutInflater.createView(LayoutInflater.java:500) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): ... 22 more 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.content.res.Resources.loadDrawable(Resources.java:1705) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.content.res.TypedArray.getDrawable(TypedArray.java:548) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.View.(View.java:1850) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.View.(View.java:1799) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): at android.view.ViewGroup.(ViewGroup.java:296) 01-06 09:52:27.857: ERROR/AndroidRuntime(17473): ... 26 more

    Read the article

  • jQuery add() function and the context of jQuery objects

    - by patrick
    Given the following HTML example... <div id='div1'>div one</div> <div id='div2'>div two</div> ...I found that the following jQuery code... $('#div1').click(function() { var $d = $(this); // Using 'this' instead of '#div1' $d.add('#div2').remove(); }); ...would not add #div2 to the set referenced by $d, but this code... $('#div1').click(function() { var $d = $('#div1'); // Using '#div1' instead of 'this' $d.add('#div2').remove(); }); ...successfully added #div2. Upon consulting firebug, I found that using $(this) gave the jQuery object a context of #div1, but doing $('#div1') gave the object a context of document. Given this information I tried... var $d = $(this, document); ...and the add() function worked as expected. So here's the question. Could someone please explain to my why a different context is assigned when using $(this) vs $('#div1')? Thanks much!

    Read the article

  • Android - Emulator internet access

    - by teepusink
    Hi, I've been using this method to gain access to internet from my Android emulator emulator -http-proxy < -avd < It works but is that the best way to do it? It just doesn't feel right that I need to open the emulator from command line and can't just do it from Eclipse or something. Can't seem to find an internet option on the "AVD Manager" either. Thanks, Tee

    Read the article

  • Android HorizontalScrollView scroll by page

    - by Ionic Walrus
    Hi all, I have implemented a slideshow in my Android app using . This works well except that I want to scroll to next image on a scroll gesture (now it just scrolls past few images before decelerating). I have couldn't find a appropriate way to do this, should I be using a FrameLayout instead ? How do I scroll to the next (or previous) image on scroll gesture ? Any help is appreciated, thanks.

    Read the article

  • Android : Sample KML/GPX compatable with DDMS

    - by Drahcir
    I am testing out an Android application I wrote with google maps. The DDMS is not loading the KML/GPX files I found on the internet. What I assume is that the files are relatively old in format (Maximum 2007) and the DDMS cannot read them. I was wondering if there is somewhere I can download a sample KML or GPX file that I can use to test out my application.

    Read the article

  • How to parse the AndroidManifest.xml file inside an .apk package

    - by jnorris
    This file appears to be in a binary XML format. What is this format and how can it be parsed programmatically (as opposed to using the aapt dump tool in the SDK)? This binary format is not discussed in the in the documentation here: http://developer.android.com/guide/topics/manifest/manifest-intro.html Note: I want to access this information from outside the Android environment, preferably from Java.

    Read the article

  • Making the Android emulator run faster

    - by hgpc
    The Android emulator is a bit sluggish. For some devices, like the Motorola Droid and the Nexus One, the app runs faster in the actual device than the emulator. This is a problem when testing games and visual effects. How do you make the emulator run as fast as possible? I've been toying with its parameters but haven't found a configuration that shows a noticeable improvement yet.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >