Search Results

Search found 25798 results on 1032 pages for 'android xml'.

Page 80/1032 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Ksoap2 Error after Updating Android SDK and ADT

    - by user1291644
    I have a problem. When I updated Android SDK tool to version 17 and the ADT to 17 I can't use ksoap2 any more. I start the app and get this error: 03-25 20:13:49.995: E/AndroidRuntime(555): FATAL EXCEPTION: main 03-25 20:13:49.995: E/AndroidRuntime(555): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.pridobiDanasnjo(SplashScreen.java:124) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.onCreate(SplashScreen.java:73) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Handler.dispatchMessage(Handler.java:99) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Looper.loop(Looper.java:123) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.main(ActivityThread.java:4627) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invokeNative(Native Method) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invoke(Method.java:521) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 03-25 20:13:49.995: E/AndroidRuntime(555): at dalvik.system.NativeStart.main(Native Method) I should get String with some numbers but instead I get this error. I was using ksoap2-2.5.4.jar and tried the new ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar. I'm using Eclipse indigo, Ubuntu 11.04. The code looks like this: SoapObject Request =new SoapObject(NAMESPACE,METHOD_NAME); // Here I get the error SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet=false; String tmp=odstejDatum(datum); Request.addProperty("datumod",tmp); Request.addProperty("datumdo",datum); Request.addProperty("tip_lme",1); @SuppressWarnings("deprecation") HttpTransportSE aht=new HttpTransportSE(URL,5000); soapEnvelope.setOutputSoapObject(Request); // aht.call(SOAP_ACTION_DANASNJI,soapEnvelope); Object response= soapEnvelope.getResponse(); Thanks for the help.

    Read the article

  • Restricting Android camera

    - by Johnson Tey
    Hello! Avoiding having to create a whole camera app myself, I am calling up: Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); this.startActivityForResult(camera, PICTURE_RESULT); However, the camera is very advanced and beautiful :) but not for my purposes. :( Is there a way to restrict the camera to control size, resolution, disable setup button, flash, face recognition, etc...?

    Read the article

  • How to get "all" (or the MAIN/LAUNCHER) android intent

    - by Christoph Jerolimov
    Hey, i want receive all start app intents (i think MAIN/LAUNCHER, see below) to log how often i used the application. So i do not want create an activity... I tried several receiver blocks, but for now nothing works: with, without priority, only the action, both, only the category and so on.. <receiver android:name=".Receiver" android:enabled="true" android:process=".e"> <intent-filter priority="100000" android:priority="100000"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </receiver> Have anyone an idea? Thanks

    Read the article

  • Android TextView formating.

    - by Tarmon
    Hey Everyone, I am trying to implement a TextView that is serving as a header for a ListView. I want to format it so that I have basically a title centered on the first line and then additional information on the lines following. How can I format the text/string to create this kind of formatting? Thanks, Rob

    Read the article

  • LazyTable Listview in Android?

    - by Praveen Chandrasekaran
    how to achieve the lazy table concepts which is in iphone. that is the listview with the custom adapter that contains imageview as icon and textview as three rows. when scroll the listview it stacked up to scroll. i want to make it easy. the image content should load only the visible part of the list view. how to do that? Any Idea?

    Read the article

  • No space left on Android Emulator

    - by Tom
    I have been developing my app for around two months, in the last week i have started getting the following error when trying to compile and run the app from Eclipse: java.io.IOException: Unable to upload file: No space left on device The APK comes out at 3.6Mb and the emulator is a recently created fresh one with 512Mb SD card and other specs identical to the G1. Can anyone suggest a reason this might be happening?

    Read the article

  • glow when touch the screen in android?

    - by androidbase Praveen
    when i touch whereever in the screen that point will be glow(nothing but like a flash or glittering) for some time. how to do that? any example or idea?? i have to implement to put buttons on it. exactly when i touch the screen it will glow some time and then the button will appear on the point where i touched.

    Read the article

  • Are primitive types garbage collected in Android?

    - by snctln
    I know this may be a dumb question, but my background is more in c++ and managing my own memory. I am currently cutting down every single allocation that I can from one of my games to try and reduce the frequency of garbage collection and perceived "lag", so for every variable that I create that is an Object (String and Rect for example) I am making sure that I create it before hand in my constructor and not create temporary variables in simple 10 line functions... (I hope that makes sense) Anyways I was working though it some more tonight and I realized that I may be completely wrong about my assumption on garbage collection and primitive types (int, boolean, float) are these primitive type variables that I create in a 10 line function that gets called 20 times a second adding to my problem of garbage collection? So a year ago every few seconds I would see a message in logcat like GC freed 4010 objects / 484064 bytes in 101ms Now I see that message every 15-90 seconds or so... So to rephrase my question: Are primitive types (int, float, boolean, etc) included when seeing this message?

    Read the article

  • Changing the application icon text dynamically in Android

    - by Achal
    Hi Friends, I am developing a calendar app, wherein i will using a service to display date in the application icon text itself. For Eg: If date is: 26 Apr 2010, then my application name in the phone menu will also show the same. So I am not understanding how to change the application's icon text dynamically through program.

    Read the article

  • Android Certificate Changed?

    - by rgrandy
    I recently formatted my computer and updated to Windows 7. I backed up my keystore and tried to sign my apk with it but it gave me an error that said my certificate expires in 22yrs. which is just shy of what the market requires to upload the apk. So now I am stuck not being able to update my app... How did this happen? Is there a way to extend the lifetime of certificates so that I can update my app? Is there a way to verify this certificate against an old apk that has been uploaded to the market so that I can be sure I am trying to sign with the same certificate and I didn't have a mix up? Error Pic

    Read the article

  • How to read utf-8 xml from vbs and get correct character code

    - by vkjr
    I'm trying to read xml file from vbs script. Xml is encoded in utf-8 and has appropriate header From vbs script I use microsoft xmldom parser to read xml: Dim objXMLDoc Set objXMLDoc = CreateObject( "Microsoft.XMLDOM" ) objXMLDoc.load("vbs_strings.xml") Inside xml I'm trying to write character by code using &#nnn; notation. Then I read this character from vbscript and try to get it's code using Asc() function. For some characters it works fine and read code is equal to one written. But for some characters Asc() always returns code 63. What could it be? Examples: If xml contains <section>&#195;<section> and in script I have Section variable for representing this xml node then code: Asc(Section.Text) will return value 195 and it's ok. If xml contains <section>&#110;<section> then code: Asc(Section.Text) will return value 110 and it's ok. But if xml contains <section>&#130;<section> or <section>&#156;<section> or <section>&#140;<section> Asc(Section.Text) will return value 63 and it's definitely not good. Do you know why?

    Read the article

  • Android View.onDraw() always has a clean Canvas

    - by CaseyB
    I am trying to draw an animation. To do so I have extended View and overridden the onDraw() method. What I would expect is that each time onDraw() is called the canvas would be in teh state that I left it in and I could choose to clear it or just draw over parts of it (This is how it worked when I used a SurfaceView) but each time the canvas comes back already cleared. Is there a way that I can not have it cleared? Or maybe save the previous state into a Bitmap so I can just draw that Bitmap and then draw over top of it?

    Read the article

  • Nexus One Android Debugging in Ubuntu 9.10

    - by Doughy
    I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10 Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10?

    Read the article

  • How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing

    - by Oppositional
    Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML? Note: The solution needs to handle XML data sources that use character encodings other than UTF-8, e.g. by specifying the character encoding at the XML document declaration. Not mangling the character encoding of the source while stripping invalid hexadecimal characters has been a major sticking point. The removal of invalid hexadecimal characters should only remove hexadecimal encoded values, as you can often find href values in data that happens to contains a string that would be a string match for a hexadecimal character. Background: I need to consume an XML-based data source that conforms to a specific format (think Atom or RSS feeds), but want to be able to consume data sources that have been published which contain invalid hexadecimal characters per the XML specification. In .NET if you have a Stream that represents the XML data source, and then attempt to parse it using an XmlReader and/or XPathDocument, an exception is raised due to the inclusion of invalid hexadecimal characters in the XML data. My current attempt to resolve this issue is to parse the Stream as a string and use a regular expression to remove and/or replace the invalid hexadecimal characters, but I am looking for a more performant solution.

    Read the article

  • how to use intent from receiver android

    - by ng93
    hi ive got a working sms receiver but when i try to load another class using: Intent intent = new Intent(SMSReceiver.this, SMSNotifier.class); startActivityForResult(intent, 0); i get the error: The constructor Intent(SMSReceiver, Class<SMSNotifier>) is undefined for the first line and: The method startActivityForResult(Intent, int) is undefined for the type SMSReceiver for the second line id really appreciate some advice as to whats going wrong thanks, ng93

    Read the article

  • Send a public broadcast from an AppWidget in Android

    - by greve
    I have a widget for a music player and want to be able to send broadcasts when pushing the different buttons. What I want to do is when a button is pushed, the widget sends a public broadcast to another BroadcastReceiver so it can handle the different actions. In my activity class with the BroadcastReceiver: private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Constants.ACTION_NEXT)) { Log.d("RECEIVER", "ACTION_NEXT"); } } }; @Override protected void onStart() { super.onStart(); IntentFilter filter = new IntentFilter(); //Widget actions filter.addAction(Constants.ACTION_NEXT); registerReceiver(broadcastReceiver, new IntentFilter(filter)); } In my Widget: public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, new Intent(Constants.ACTION_NEXT), 0); views.setOnClickPendingIntent(R.id.WidgetNextButton, pendingIntent); appWidgetManager.updateAppWidget(appWidgetId, views); } Any help or other solutions are very much appreciated!

    Read the article

  • Android horizontal scrolling showing Cursor data

    - by androidharry
    I have some text data in database which I have retrieved in a Cursor, and I am displaying it in a ListView. What I want to do now is that when you select click a particular row in the list its text content should be displayed in full screen and the user should be able to scroll horizontally (like scrolling between iPhone home screens) to view the contents of the Cursor.

    Read the article

  • ArrayAdapter need to be clear even i am creating a new one

    - by Roi
    Hello I'm having problems understanding how the ArrayAdapter works. My code is working but I dont know how.(http://amy-mac.com/images/2013/code_meme.jpg) I have my activity, inside it i have 2 private classes.: public class MainActivity extends Activity { ... private void SomePrivateMethod(){ autoCompleteTextView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, new ArrayList<String>(Arrays.asList("")))); autoCompleteTextView.addTextChangedListener(new MyTextWatcher()); } ... private class MyTextWatcher implements TextWatcher { ... } private class SearchAddressTask extends AsyncTask<String, Void, String[]> { ... } } Now inside my textwatcher class i call the search address task: @Override public void afterTextChanged(Editable s) { new SearchAddressTask().execute(s.toString()); } So far so good. In my SearchAddressTask I do some stuff on doInBackground() that returns the right array. On the onPostExecute() method i try to just modify the AutoCompleteTextView adapter to add the values from the array obtained in doInBackground() but the adapter cannot be modified: NOT WORKING CODE: protected void onPostExecute(String[] addressArray) { ArrayAdapter<String> adapter = (ArrayAdapter<String>) autoCompleteDestination.getAdapter(); adapter.clear(); adapter.addAll(new ArrayList<String>(Arrays.asList(addressArray))); adapter.notifyDataSetChanged(); Log.d("SearchAddressTask", "adapter isEmpty : " + adapter.isEmpty()); // Returns true!!??! } I dont get why this is not working. Even if i run it on UI Thread... I kept investigating, if i recreate the arrayAdapter, is working in the UI (Showing the suggestions), but i still need to clear the old adapter: WORKING CODE: protected void onPostExecute(String[] addressArray) { ArrayAdapter<String> adapter = (ArrayAdapter<String>) autoCompleteDestination.getAdapter(); adapter.clear(); autoCompleteDestination.setAdapter(new ArrayAdapter<String>(NewDestinationActivity.this,android.R.layout.simple_spinner_dropdown_item, new ArrayList<String>(Arrays.asList(addressArray)))); //adapter.notifyDataSetChanged(); // no needed Log.d("SearchAddressTask", "adapter isEmpty : " + adapter.isEmpty()); // keeps returning true!!??! } So my question is, what is really happening with this ArrayAdapter? why I cannot modify it in my onPostExecute()? Why is working in the UI if i am recreating the adapter? and why i need to clear the old adapter then? I dont know there are so many questions that I need some help in here!! Thanks!!

    Read the article

  • xml declaration not being omitted from page

    - by Mark Schultheiss
    I have an XSLT transform I am using to process an XML file, inserting it into the body of my aspx page. Reference the following for background information: background on xml/xslt I have the following in my xml file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:myCustomStrings="urn:customStrings"> <xsl:output method="xml" version="2.0" media-type="text/html" omit-xml-declaration="yes" indent="yes" />...unrelated stuff left out here Here is the output that is relevent: <div id="example" /> <?xml version="1.0" encoding="utf-8"?><div xmlns:myCustomStrings="urn:customStrings"><div id="imFormBody" class="imFormBody"> My question relates to the output, specifically to the <?xml version="1.0" encoding="utf-8"?> which is getting included in the output anyway. Is the issue related to the custom method I have used? If so, I don't really see the need to include the xml part as the namespace is in the div tag. Is there a way to ensure that this extra stuff gets left out as I asked it to?

    Read the article

  • Android - store .txt filenames in array

    - by JustMe
    Hello! I would like to store only .txt filenames from a specific dir (let's say: /sdcard/docs/) into an String array. Example: In /sdcard/docs/ there are 5 files: 'foo.txt', 'bar.jpg', 'foofoo.txt', 'loool.png' and 'foobar.txt'. I would like to get array with contents: "foo.txt", "foofoo.txt", "foobar.txt" How could I do it? Thanks =)

    Read the article

  • Android - Clicking on notification in status bar binds the intent with the target activity

    - by araja
    I have created an activity which sends a number of notifications to status bar. Each notification contains an intent with a bundle. Here is the code: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, "Test Notification", when); Context context = getApplicationContext(); Bundle bundle = new Bundle(); bundle.putString("action", "view"); Intent notificationIntent = new Intent(this, MainActivity.class); notificationIntent.putExtras(bundle); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(1, notification); When user clicks this notifications, I read the bundle string "action" and performs that action. Here is the code: Bundle bundle = this.getIntent().getExtras(); if(bundle != null) { String action = bundle.getString("action"); performAction(action) } Everything works as expected. But, when I minimize the app using "arrow" button on device and then press and hold home button and clicks on my app icon the application starts and performs the same last action which have been performed by clicking the last notification. I figured out that when we click the app icon the application starts with last intent triggered by the notification. Can anyone help in this?

    Read the article

  • Android AlertDialog wait for result in calling activity

    - by insanesam
    I am trying to use an AlertDialog in my app to select the quantity of an item. The problem is that the activity that calls the AlertDialog doesn't wait for it to update the item before it adds it to the SQLite Database and change intents. At the moment, the QuantitySelector (AlertDialog) appears, then disappears straight away and changes the MealActivity class (which is just a ListView that reads from the database) through the intent change with an update to the database with quantity 0. I need the Activity to wait for the AlertDialog to close before it updates the database. What would be the correct way of implementing this? Here is some code for you: QuantitySelector (which runs the alertdialog): public class QuantitySelector{ protected static final int RESULT_OK = 0; private Context _context; private DatabaseHandler db; private HashMap<String, Double> measures; private Item item; private View v; private EditText quan; private NumberPicker pick; private int value; private Quantity quantity; /** * Function calls the quantity selector AlertDialog * @param _c: The application context * @param item: The item to be added to consumption * @return The quantity that is consumed */ public void select(Context _c, Item item, Quantity quantity){ this._context = _c; this.item = item; this.quantity = quantity; db = new DatabaseHandler(_context); //Get the measures to display createData(); //Set up the custom view LayoutInflater inflater = LayoutInflater.from(_context); v = inflater.inflate(R.layout.quantity_selector, null); //Set up the input fields quan = (EditText) v.findViewById(R.id.quantityNumber); pick = (NumberPicker) v.findViewById(R.id.numberPicker1); //Set up the custom measures into pick pick.setMaxValue(measures.size()-1); pick.setDisplayedValues(measures.keySet().toArray(new String[0])); //Start the alert dialog runDialog(); } public void createData(){ measures = new HashMap<String, Double>(); //Get the measurements from the database if(item!=null){ measures.putAll(db.getMeasures(item)); } //Add grams as the default measurement if(!measures.keySet().contains("grams")){ //Add grams as a standard measure measures.put("grams", 1.0); } } public void runDialog(){ AlertDialog dialog = new AlertDialog.Builder(_context).setTitle("Select Quantity") .setView(v) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { //Change the consumption to the new quantity if(!quan.getText().toString().matches("")){ value = Integer.parseInt(quan.getText().toString()); //Check if conversion from other units is needed String s[] = pick.getDisplayedValues(); String a = s[pick.getValue()]; //Convert the chosen measure back to grams if(!a.equals("grams")){ for(String m : measures.keySet()){ if(m==a){ value = (int) (value * measures.get(m)); } } } } quantity.setQuantity(value); dialog.dismiss(); } }) .setNegativeButton("Cancel", null).create(); dialog.show(); } } The method from favouritesAdapter (which calls the alertdialog): add.setOnClickListener(new OnClickListener(){ public void onClick(View arg0) { QuantitySelector q = new QuantitySelector(); Quantity quan = new Quantity(); q.select(_context, db.getItem(p.getID()), quan); db.addConsumption(p.getID(), p.getFavouriteShortName(), quan.getQuantity(), "FAVOURITE"); Intent intent = new Intent(_context,MealActivity.class); _context.startActivity(intent); } }); All help is appreciated :)

    Read the article

  • Android multiple screen sizes with same density

    - by droidy
    I'm confused regarding the densities. I see that with medium density, the screen resolution could be either 320x480, 480x800, or 480x854. So if I have an image thats 300px wide in the mdpi folder, how is it going to look the same size on all 3 different screen sizes (mainly 320x480 vs the other 2)? And by look the same size, I mean scale to be bigger or smaller depending upon the screen size. Thanks.

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >