Search Results

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

Page 107/1032 | < Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >

  • Change Preference Item Summary Text Color in Android 4

    - by AntounG
    I have the below sample of preference items <CheckBoxPreference android:key="chkSound" android:summary="Sound is Off" android:title="Sound" /> I use a theme in the res/values to change the Summary text color <style name="ThemeDarkText"> <item name="android:textColor">#000000</item> </style> And in the code I write this line setTheme(R.style.ThemeDarkText); Its working fine in Android 2.1 but when I tried to run it on a different os (ex Android 4.0) It didn't change the summary text color just the title color only..!! Any help?

    Read the article

  • Getting started with Android code samples - permissions error

    - by StevenX
    New to android. Running Eclipse on Ubuntu 9.10 with Android SDK plugin installed and working. Trying to get some code samples from http://developer.android.com/resources/samples/get.html , and following its procedure to load said samples in Eclipse yields: Parent of resource: /home/user/android-sdk/platforms/android-4/samples/Notepad/.project is marked as read-only. chmod is not recursive, so I entered ~/android-sdk/platforms and "chmod 777 *" ie. all folders in /platforms. Still doesnt work. Appears to be be a bug in Eclipse that wants to create the project in the SDK folder rather than under ~/workspace.

    Read the article

  • Replacing characters in a non well-formed XML body

    - by ryanprayogo
    In a (Java) code that I'm working on, I sometimes deal with a non well-formed XML (represented as a Java String), such as: <root> <foo> bar & baz < quux </foo> </root> Since this XML will eventually need to be unmarshalled (using JAXB), obviously this XML as is will throw exception upon unmarshalling. What's the best way to replace the & and the < to its character entities? For &, it's as easy as: xml.replaceAll("&", "&amp;") However, for the < symbol, it's a bit tricky since obviously I don't want to replace the < that's used for the XML tag opening 'bracket'. Other than scanning the string and manually replacing < in the XML body with &lt;, what other option can you suggest?

    Read the article

  • How to lazy process an xml documentwith hexpat?

    - by Florian
    In my search for a haskell library that can process large (300-1000mb) xml files i came across hexpat. There is an example in the Haskell Wiki that claims to -- Process document before handling error, so we get lazy processing. For testing purposes i have redirected the output to /dev/null and throw a 300mb file at it. Memory consumption kept rising until i had to kill the process. Now i removed the error handling from the process function: process :: String -> IO () process filename = do inputText <- L.readFile filename let (xml, mErr) = parse defaultParseOptions inputText :: (UNode String, Maybe XMLParseError) hFile <- openFile "/dev/null" WriteMode L.hPutStr hFile $ format xml hClose hFile return () As a result the function now uses constant memory. Why does the error handling result in massive memory consumption? As far as i understand xml and mErr are two seperate unevaluated thunks after the call to parse. Does format xml evaluate xml and build the evaluation tree of 'mErr'? If yes is there a way to handle the error while using constant memory? http://www.haskell.org/haskellwiki/Hexpat/

    Read the article

  • Sending tweets using Android

    - by Saranya.R
    I want to send a tweet from Android.I have executed the following code.But I am not bale to send any tweets.Avtually the button I created is not working.Can anybody tel me wats the prob? This is my code.. package samplecode.sampleapp.sampletwidgitpublicintent; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.os.Bundle; public class TwidgitPublicIntent extends Activity implements OnClickListener { private static final int TWIDGIT_REQUEST_CODE = 2564; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ((Button)findViewById(R.id.tweet_button)).setOnClickListener(this); ((Button)findViewById(R.id.mention_button)).setOnClickListener(this); ((Button)findViewById(R.id.retweet_button)).setOnClickListener(this); ((Button)findViewById(R.id.message_button)).setOnClickListener(this); } public void onClick(View v) { switch(v.getId()) { case R.id.tweet_button: // Standard tweet Intent tIntent = new Intent("com.disretrospect.twidgit.TWEET"); tIntent.putExtra("com.disretrospect.twidgit.extras.MESSAGE", "_message_in_here_"); try { this.startActivityForResult(tIntent, TWIDGIT_REQUEST_CODE); } catch (ActivityNotFoundException e) { // If Twidgit is not installed } break; case R.id.mention_button: // Mention Intent mIntent = new Intent("com.disretrospect.twidgit.MENTION"); mIntent.putExtra("com.disretrospect.twidgit.extras.TO", "_username_to_xmention_"); mIntent.putExtra("com.disretrospect.twidgit.extras.MESSAGE", "_message_in_here_"); try { this.startActivityForResult(mIntent, TWIDGIT_REQUEST_CODE); } catch (ActivityNotFoundException e) { // If Twidgit is not installed } break; case R.id.retweet_button: // Retweet a tweet Intent rtIntent = new Intent("com.disretrospect.twidgit.RETWEET"); rtIntent.putExtra("com.disretrospect.twidgit.extras.MESSAGE", "_message_in_here_"); rtIntent.putExtra("com.disretrospect.twidgit.extras.VIA", "_original_author_of_tweet_name_"); try { this.startActivityForResult(rtIntent, TWIDGIT_REQUEST_CODE); } catch (ActivityNotFoundException e) { // If Twidgit is not installed } break; case R.id.message_button: // Send DM Intent dmIntent = new Intent("com.disretrospect.twidgit.DIRECT_MESSAGE"); dmIntent.putExtra("com.disretrospect.twidgit.extras.TO", "_username_to_send_dm_to_"); dmIntent.putExtra("com.disretrospect.twidgit.extras.MESSAGE", "_message_in_here_"); try { this.startActivityForResult(dmIntent, TWIDGIT_REQUEST_CODE); } catch (ActivityNotFoundException e) { // If Twidgit is not installed } break; } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // Check result code if(resultCode == Activity.RESULT_OK) { // Check requestCode switch(requestCode) { case TWIDGIT_REQUEST_CODE: // Handle successful return break; } } else if(resultCode == Activity.RESULT_CANCELED){ // Handle canceled activity } } }

    Read the article

  • How to parse XML string value using jQuery ?

    - by Vijay
    Hi All, I am new to jquery. I am trying to parse xml string using jquery. I have found one sample code; $(function() { $.get('data.xml', function(d) { var data = ""; var startTag = "<table border='1' id='mainTable'><tbody><tr><td style=\"width: 120px\">Name</td><td style=\"width: 120px\">Link</td></tr>"; var endTag = "</tbody></table>"; $(d).find('url').each(function() { var $url = $(this); var link = $url.find('link').text(); var name = $url.find('name').text(); data += '<tr><td>' + name + '</td>'; data += '<td>' + link + '</td></tr>'; }) $("#content").html(startTag + data + endTag); ; }); }); In this case, I am able to parse and fetch the values from xml file. but now what I am looking for is instead of reading file from desk, I want to read the xml from string. Say, instead of data.xml I want to parse string which consists of well formed xml. does anyone have any idea about this ? Thanks in advance

    Read the article

  • Auto comment all public members in a file

    - by ooo
    I have turned on warnings as errors and now i need to XML comment all of my public methods. just to get my program compiling, i just want to put placeholders for now. Is there anyway to automatically add XML comments to all of the public members in a class or a file. I see ghost doc which gives you good autogenerated XML comments but it still looks like it only does one member at a time.

    Read the article

  • Javascript on mobile os, android and ipad

    - by albanx
    Hello I am trying to do a javascript function compatible on android and ipad, but i notice that android doesnt support ongesture** events? 1.It's really true? .ongesturestart=function(e){ .ongesturechange=function(e){ .ongestureend=function(e){ 2.Since I cant buy niether an Android system nor a Ipad, is there any Android/Ipad simulator for pc/windows/linux around the web? I need them for developenig and simulating web application based on touch/gestures events. 3.Is there possible that google hasnt develop chrome for android platform? and firefox for android/Ipad? Thanks

    Read the article

  • Android - BaseGameUtil Complicated Import

    - by Fabiow Quixadá
    I've seen many topics in stackoverflow, such as Cannot import BaseGameUtils (Eclipse weirdness) and Android: cannot import BaseGameUtils successfully in Eclipse but none resolved my problem. I've followed https://developer.android.com/google/play-services/setup.html#Setup - the Add Google Play Services to Your Project [Using Eclipse with ADT], I THINK my project correctly references the google play services lib since up to that point nothing wrong happened. Then, following https://developers.google.com/games/services/android/quickstart, I've downloaded BaseGameUtils but when I import the two projects [TypeANumber & BaseGameUtil], they came named as main and MainActivity. I've renamed BaseGameUtil as so and have marked it as lib and imported it to my project through Properties Android Library, but I can't extend extend a class from BaseGameUtil because it's not even suggested. Also, I have not installed Android L and Android 4.4W from SDK Manager in Eclipse, altough I think that's no the case. Can anyone please help in this? Thanks so much in advance

    Read the article

  • select nodes from a line of xml code with sql

    - by wondergoat77
    I have a table that stores a huge line/entire document of xml like this: <?xml version="1.0" encoding="utf-16"?> <RealQuestResponse xmlns:xsi="http://www.w3.org /2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Success>true</Success> <Subject> <AmbiguousMatches /> <Assessment> <LandValue>0</LandValue> <ImprovementsValue>0</ImprovementsValue> <TotalValue>0</TotalValue> </Assessment> <RecentSales /> <Warnings> <Score>0</Score> <TrusteesDeedRatio>0</Tr........etc Is there a way to pull any of these fields out of the xml? it is stored in a column in a table called AutomatedRequests That table looks like this: requestid Provider Date Success Response 1 test 1/2/2012 Y <?xml version..... <---this is the xml code stored> Ive seen a couple ways but nothing like this Id basically like something like select xmlnode1, xmlnode2, xmlnode3 from automatedrequests have tried this but not working: select xml.query('RealQuestResponse/Bedrooms/*') from automatedRequests where orderid = 1266162

    Read the article

  • submiting forms values xml flash php

    - by Menew
    I want to dynamically submit form values into this xml file: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <globals soundFXvolume="5" fadeInTime="0.25" glowKnockout="false" glowInner="false" glowQuality="1" glowStrength="1" glowBlurRadius="2" glowAlpha="1"/> however, i was trying to change the original xml file to this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <globals> <soundFXvolume>5</soundFXvolume> <fadeInTime>0.25</fadeInTime> <glowKnockout>false</glowKnockout> <glowInner>false</glowInner> <glowQuality>1</glowQuality> <glowStrength>1</glowStrength> <glowBlurRadius>2</glowBlurRadius> <glowAlpha>1</glowAlpha> </globals> then from there, i will use php to submit the form values. is there a way to submit my form values to the original xml below: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <globals soundFXvolume="want this to be form values" fadeInTime="0.25" glowKnockout="false" glowInner="false" glowQuality="1" glowStrength="1" glowBlurRadius="want this to be form values" glowAlpha="1"/> thanks

    Read the article

  • XML in Authorware 7.01

    - by Mikael
    Let me explain the setup that is being used. Right now I have an authorware program which loads an ocx control. This control receives data in the form on an XML string. This part is working properly. However I need parse this XML string in authorware and have not been successful. I have been trying to use the XMLParser Xtra. The documentation listed here shows how to create a new XMLParser object and then shows how to call the object but never explains how to link the Parser to a XML file or XML string. The information I have been using can be found here https://www.adobe.com/livedocs/authorware/7/using_aw_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Using_Authorware_7&file=09_va110.htm#224295 I need more information on how to Parse XML with this function or if there is another way to do this in Authorware. As a side note the documentation says it cannot create or append to XML, I will need to do this also inside of Authorware. Is this possible and if so, how?

    Read the article

  • Accessing microsoft office web apps (specifically OneNote) from iphone or android

    - by Howiecamp
    I'm trying to access some OneNote notebooks from the iphone and android browsers. On the iphone I can't seem to open the notebook and see it's text. When i click on the notebook it wants to download it And it's a file type that the browser can't understand. When using android the browser crashes everytime i click on the notebook. Interestingly this happens no matter which browser i use on android - The stock browser, skyfire and dolphin all crash the same at this point. I've also tried clicking on the "desktop version" link which forces the app to render the desktop version rather than the mobile version but same result. Finally i tried changing dolphin and skyfire to emulate iphone in firefox but again same results. Has anyone got this working?

    Read the article

  • Getting Android drivers to work on Windows 8 Community Preview

    - by mdkess
    I made a post about this on android.stackexchange.com, and they referred me to here. I have an HTC Flyer and a Motorola Droid X, and for both, I've been unable to connect to USB debugging to do Android development. With the Motorola Droid X, the MotoHelper installer won't run, saying that I'm running an Unknown OS Version. With the HTC Flyer, HTC's Sync software installs successfully, but again the device doesn't connect. I realize that this is beta software, but is there anything that I can do to get this working? I've been relying on switching back to my laptop running Linux to test out my Android builds on the device. Of course, I'm not in any production environment - just playing around with the new OS, but not being able to write code on it makes less fun.

    Read the article

  • Apps crashing - Android 4.3 in VirtualBox

    - by Nasenbaer
    Performance and stability problem with Android 4.3 in VM. Tried with x64 and x86 System. VirtualBox V4.3.2 in use. Android could be installed on x86 only. But there it seems to be successfully, using the "Linux 2.2" template on VirtualBox. 1024MB RAM and 2GB Harddisk defined. Some times Android browser is crashing and closing. In all cases stuff like "Skype" and "Plats vs Zombies" does never startup after installing. Crashes directly. "Plats vs Zombies 2" is not able to install. Is there any way of gettings such stuff work?

    Read the article

  • Firefox 11 sync with Android device

    - by gisek
    I've just installed Firefox 11. I'd like to sync it with the one on my Android device. I tried to follow the instructions they provided and tried to pair device. I entered the code from Android to desktop. This made my phone show a window showing 'Waiting for device' and a progress bar running all over again. Than I tried to use 'I'm not near my computer' option on Android. I am asked for email, password and a recovery key. So I googled a little and found an instruction. I go to Options/Sync. But there are only 2 options: Set Up Firefox Sync Pair a device So how can I get this recovery key?

    Read the article

  • Using jQuery to parse XML returned from PHP script (imgur.com API)

    - by vette982
    Here's my jQuery: var docname = $('#doc').val(); function parseXml(xml) { $(xml).find("rsp").each(function() { alert("success"); }); } $('#submit').click(function() { $.ajax({ type: "GET", url: "img_upload.php", data: "doc=" + docname, dataType: "xml", success: parseXml }); return false; }); Note that #doc is the id of a form text input box and #submit is the submit button's id. If successful, I'd like a simple "success" javascript popup to appear. Here's *img_upload.php* with my API key omitted: <?php $filename = $_GET["doc"]; $handle = fopen($filename, "r"); $data = fread($handle, filesize($filename)); // $data is file data $pvars = array('image' => base64_encode($data), 'key' => <MY API KEY>); $timeout = 30; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://imgur.com/api/upload.xml'); curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars); $xml = curl_exec($curl); curl_close ($curl); ?> When directly accessed with a GET argument for "doc", img_upload.php file returns the following XML format: <?xml version="1.0" encoding="utf-8"?> <rsp stat="ok"> <image_hash>cxmHM</image_hash> <delete_hash>NNy6VNpiAA</delete_hash> <original_image>http://imgur.com/cxmHM.png</original_image> <large_thumbnail>http://imgur.com/cxmHMl.png</large_thumbnail> <small_thumbnail>http://imgur.com/cxmHMs.png</small_thumbnail> <imgur_page>http://imgur.com/cxmHM</imgur_page> <delete_page>http://imgur.com/delete/NNy6VNpiAA</delete_page> </rsp> What's the problem here? Here's the Imgur API page for reference.

    Read the article

  • How to use DataContractSerializer to create xml with tag names that match my known types

    - by mezoid
    I have the following data contract: [CollectionDataContract(Name="MyStuff")] public class MyStuff : Collection<object> {} [DataContract(Name = "Type1")] [KnownType(typeof(Type1))] public class Type1 { [DataMember(Name = "memberId")] public int Id { get; set; } } [DataContract(Name = "Type2")] [KnownType(typeof(Type2))] public class Type2 { [DataMember(Name = "memberId")] public int Id { get; set; } } Which I serialize to xml as follows: MyStuff pm = new MyStuff(); Type1 t1 = new Type1 { Id = 111 }; Type2 t2 = new Type2 { Id = 222 }; pm.Add(t1); pm.Add(t2); string xml; StringBuilder serialXML = new StringBuilder(); DataContractSerializer dcSerializer = new DataContractSerializer(typeof(MyStuff)); using (XmlWriter xWriter = XmlWriter.Create(serialXML)) { dcSerializer.WriteObject(xWriter, pm); xWriter.Flush(); xml = serialXML.ToString(); } The resultant xml string looks like this: <?xml version="1.0" encoding="utf-16"?> <MyStuff xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/"> <anyType i:type="Type1"> <memberId>111</memberId> </anyType> <anyType i:type="Type2"> <memberId>222</memberId> </anyType> </MyStuff> Does anyone know how I can get it to instead use the name of my known types rather than anyType in the xml tag? I'm wanting it to look like this: <?xml version="1.0" encoding="utf-16"?> <MyStuff xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/"> <Type1> <memberId>111</memberId> </Type1> <Type2> <memberId>222</memberId> </Type2> </MyStuff>

    Read the article

  • how to save xml files using Javascript?

    - by user311884
    Dear friends, I tried to 1) load an xml file using javascript as an object, say "note.xml" 2) then save the object to a new xml file, say "note_new.xml" I did 1) but failed 2) I tried to use method save() to do 2). After my failure, I checked ms site and they said save() is not supported.... could some one enlighten me how to do the save? thank you! here is the code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <h1>W3Schools Internal Note</h1> <p><b>To:</b> <span id="to"></span><br /> <b>From:</b> <span id="from"></span><br /> <b>Message:</b> <span id="message"></span> <script type="text/javascript"> if (window.ActiveXObject){ alert("there is ActiveXObject"); var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load("note.xml"); }else{ alert("i am not withActiveXObject!"); xhttp=new XMLHttpRequest(); xhttp.open("GET","note.xml",false); xhttp.send(""); xmlDoc=xhttp.responseXML; } xmlDoc.save("note_new.xml"); </script> </body> </html> update: seems this is related to security issue. I appologize to those experienced programmers for my putting this question in a rush because it seems a newbie question.

    Read the article

  • writing XML with Xerces 3.0.1 and C++ on windows

    - by Jon
    Hi, i have the following function i wrote to create an XML file using Xerces 3.0.1, if i call this function with a filePath of "foo.xml" or "../foo.xml" it works great, but if i pass in "c:/foo.xml" then i get an exception on this line XMLFormatTarget *formatTarget = new LocalFileFormatTarget(targetPath); can someone explain why my code works for relative paths, but not absolute paths please? many thanks. const int ABSOLUTE_PATH_FILENAME_PREFIX_SIZE = 9; void OutputXML(xercesc::DOMDocument* pmyDOMDocument, std::string filePath) { //Return the first registered implementation that has the desired features. In this case, we are after a DOM implementation that has the LS feature... or Load/Save. DOMImplementation *implementation = DOMImplementationRegistry::getDOMImplementation(L"LS"); // Create a DOMLSSerializer which is used to serialize a DOM tree into an XML document. DOMLSSerializer *serializer = ((DOMImplementationLS*)implementation)->createLSSerializer(); // Make the output more human readable by inserting line feeds. if (serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); // The end-of-line sequence of characters to be used in the XML being written out. serializer->setNewLine(XMLString::transcode("\r\n")); // Convert the path into Xerces compatible XMLCh*. XMLCh *tempFilePath = XMLString::transcode(filePath.c_str()); // Calculate the length of the string. const int pathLen = XMLString::stringLen(tempFilePath); // Allocate memory for a Xerces string sufficent to hold the path. XMLCh *targetPath = (XMLCh*)XMLPlatformUtils::fgMemoryManager->allocate((pathLen + ABSOLUTE_PATH_FILENAME_PREFIX_SIZE) * sizeof(XMLCh)); // Fixes a platform dependent absolute path filename to standard URI form. XMLString::fixURI(tempFilePath, targetPath); // Specify the target for the XML output. XMLFormatTarget *formatTarget = new LocalFileFormatTarget(targetPath); //XMLFormatTarget *myFormTarget = new StdOutFormatTarget(); // Create a new empty output destination object. DOMLSOutput *output = ((DOMImplementationLS*)implementation)->createLSOutput(); // Set the stream to our target. output->setByteStream(formatTarget); // Write the serialized output to the destination. serializer->write(pmyDOMDocument, output); // Cleanup. serializer->release(); XMLString::release(&tempFilePath); delete formatTarget; output->release(); }

    Read the article

  • SpringBatch Jaxb2Marshaller: different name of class and xml attribute

    - by user588961
    I try to read an xml file as input for spring batch: Java Class: package de.example.schema.processes.standardprocess; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Process", namespace = "http://schema.example.de/processes/process", propOrder = { "input" }) public class Process implements Serializable { @XmlElement(namespace = "http://schema.example.de/processes/process") protected ProcessInput input; public ProcessInput getInput() { return input; } public void setInput(ProcessInput value) { this.input = value; } } SpringBatch dev-job.xml: <bean id="exampleReader" class="org.springframework.batch.item.xml.StaxEventItemReader" scope="step"> <property name="fragmentRootElementName" value="input" /> <property name="resource" value="file:#{jobParameters['dateiname']}" /> <property name="unmarshaller" ref="jaxb2Marshaller" /> </bean> <bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="classesToBeBound"> <list> <value>de.example.schema.processes.standardprocess.Process</value> <value>de.example.schema.processes.standardprocess.ProcessInput</value> ... </list> </property> </bean> Input file: <?xml version="1.0" encoding="UTF-8"?> <process:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://schema.example.de/processes/process"> <process:input> ... </process:input> </process:process> It fires the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schema.example.de/processes/process", local:"input"). Expected elements are <<{http://schema.example.de/processes/process}processInput] at org.springframework.oxm.jaxb.JaxbUtils.convertJaxbException(JaxbUtils.java:92) at org.springframework.oxm.jaxb.AbstractJaxbMarshaller.convertJaxbException(AbstractJaxbMarshaller.java:143) at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:428) If I change to in xml it work's fine. Unfortunately I can change neither the xml nor the java class. Is there a possibility to make Jaxb2Marshaller map the element 'input' to the class 'ProcessInput'?

    Read the article

  • With jQuery and I need help getting individual table row titles attributes from an xml file

    - by bfsarmi
    I'm usig tablesorter jQuery to parse this xml file <?xml version="1.0" encoding="iso-8859-1"?> <CATALOG> <CD> <TITLE>Title 01</TITLE> <ARTIST>Artist 01</ARTIST> <COUNTRY>Country 01</COUNTRY> <PRICE>10.00</PRICE> <YEAR>2010</YEAR> <INFO>Tooltip Info 01</INFO> </CD> <CD> <TITLE>Title 02</TITLE> <ARTIST>Artist 02</ARTIST> <COUNTRY>Country 02</COUNTRY> <PRICE>9.00</PRICE> <YEAR>2009</YEAR> <INFO>Tooltip Info 02</INFO> </CD> <CD> <TITLE>Title 03</TITLE> <ARTIST>Artist 03</ARTIST> <COUNTRY>Country 03/COUNTRY> <PRICE>8.00</PRICE> <YEAR>2008</YEAR> <INFO>Tooltip Info 03</INFO> </CD> </CATALOG> and with this code <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "GET", url: "file.xml", dataType: "xml", success: function(xml){ $(xml).find("CD").each(function(){ $("#tablebody").append('<tr><td>' + $(this).find("TITLE").text() + '</td><td>'+ $(this).find("ARTIST").text() + '</td><td>'+ $(this).find("COUNTRY").text() + '</td><td>'+ $(this).find("PRICE").text() + '</td><td>'+ $(this).find("YEAR").text() + '</td></tr>'); }); } }); }); </script> I'm new at javascript and have been trying with no luck for a couple of hrs to get the text from the INFO/INFO tags in the xml file to show as title attributes for each table row. The reason for that is that I need to have individual popup tooltips on mouse-over each table row. Many Thanks in advance for any kind of help or suggestions!

    Read the article

  • BroadcastReceiver not receiving an alarm's broadcast

    - by juanjux
    I have a code that sets a new repeating alarm (on production I'll use a inexactRepeating), but the BroadCastReceiver I've registered for handling it is not being called. Here is the code where I set the alarm: newAlarmPeriod = 5000; // For debugging Intent alarmIntent = new Intent(this, GroupsCheckAlarmReceiver.class); PendingIntent sender = PendingIntent.getBroadcast(this, Constants.CHECK_ALARM_CODE, alarmIntent, 0); AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + newAlarmPeriod, newAlarmPeriod, sender); It seems to work and it triggers and alarm every five seconds, as seen in the output of "adb shell dumpsys alarm": DUMP OF SERVICE alarm: Current Alarm Manager state: Realtime wakeup (now=1269941046923): RTC_WAKEUP #1: Alarm{43cbac58 type 0 android} type=0 when=1269997200000 repeatInterval=0 count=0 operation=PendingIntent{43bb1738: PendingIntentRecord{43bb1248 android broadcastIntent}} RTC_WAKEUP #0: Alarm{43ce30e0 type 0 com.almarsoft.GroundhogReader} type=0 when=1269941049555 repeatInterval=5000 count=1 operation=PendingIntent{43d990c8: PendingIntentRecord{43d49108 com.almarsoft.GroundhogReader broadcastIntent}} RTC #1: Alarm{43bfc250 type 1 android} type=1 when=1269993600000 repeatInterval=0 count=0 operation=PendingIntent{43c5a618: PendingIntentRecord{43c4f048 android broadcastIntent}} RTC #0: Alarm{43d67dd8 type 1 android} type=1 when=1269941100000 repeatInterval=0 count=0 operation=PendingIntent{43c4e0f0: PendingIntentRecord{43c4f6c8 android broadcastIntent}} Broadcast ref count: 0 Alarm Stats: android 24390ms running, 0 wakeups 80 alarms: act=android.intent.action.TIME_TICK flg=0x40000004 com.almarsoft.GroundhogReader 26ms running, 2 wakeups 2 alarms: flg=0x4 cmp=com.almarsoft.GroundhogReader/.GroupsCheckAlarmReceiver But for some reason my BroadCastReceiver is not being called when the alarm is triggered. I've declared it on the Manifest: <receiver android:name=".GroupsCheckAlarmReceiver" /> And this is the abbreviated code: public class GroupsCheckAlarmReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, "XXX Alarm worked.", Toast.LENGTH_LONG).show(); Log.d("XXX", "GroupsCheckAlarmReceiver.onReceive"); }

    Read the article

  • GridView: How can I get rid of extra space from my GirdView object?

    - by Lajos Arpad
    Hello, I'm writing an application for Android phones for Human vs. Human chess play over the internet. I was looking at some tutorials, to learn how to develop Android applications and found a very nice example of making galleries (it was a GridView usage example for making a gallery about dogs) and the idea came to draw the chess table using a GridView, because the example project also handled the point & click event and I intended to use the same event in the same way, but for a different purpose. The game works well (currently it's a hotseat version), however, I'm really frustrated by the fact that whenever I rotate the screen of the phone, my GridView gets hysterical and puts some empty space in my chess table between the columns. I realized that the cause of this is that the GridView's width is the same as its parent's and the GridView tries to fill its parent in with, but there should (and probably is) be a simple solution to get rid of this problem. However, after a full day of researching, I haven't found any clue to help me to make a perfect drawing about my chess table without a negative side effect in functionality. The chess table looks fine if the phone is in Portrait mode, but in Landscape mode it's far from nice. This is how I can decide whether we are in Portrait or Landscape mode: ((((MainActivity)mContext).getWindow().getWindowManager().getDefaultDisplay().getWidth()) < ((MainActivity)mContext).getWindow().getWindowManager().getDefaultDisplay().getHeight()) In the main.xml file the GridView is defined in the following way: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gridview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:numColumns="8" android:verticalSpacing="0dp" android:horizontalSpacing="0dp" android:stretchMode="columnWidth" android:gravity="center" > </GridView> ... </LinearLayout> I appreciate any help with the problem and thank you for reading this.

    Read the article

< Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >