Search Results

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

Page 189/1032 | < Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >

  • Copying Android source code directory from one computer to an other one

    - by Walidix
    I have downloaded the Android source code on my computer using the repo sync command. Since I have no experience with git and repo , I would like to know if it is possible to copy the mydroid directory (which contains Android source code) to an other computer by just burning it on a DVD and then processing the build without problems. Thanks in advance and sorry if my question is stupid

    Read the article

  • (Android) How to catch a "ring" event?

    - by rockit
    Hi android developers! I'm clearly a newb, and I was wondering if anyone knows how I can detect a "ring" event on my cellphone through the android sdk? Generally I want to do something with the phone when it begins ringing! Any thoughts? If you want to simply point me to a page in the api documents that would be a good answer for me, I just don't know how to start my research!

    Read the article

  • Dice Emulation - ImageView

    - by Michelle Harris
    I am trying to emulate dice using ImageView. When I click the button, nothing seems to happen. I have hard coded this example to replace the image with imageView4 for debugging purposes (I was making sure the random wasn't fail). Can anyone point out what I am doing wrong? I am new to Java, Eclipse and Android so I'm sure I've probably made more than one mistake. Java: import java.util.Random; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.Spinner; import android.widget.Toast; public class Yahtzee4Activity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Spinner s = (Spinner) findViewById(R.id.spinner); ArrayAdapter adapter = ArrayAdapter.createFromResource( this, R.array.score_types, android.R.layout.simple_spinner_dropdown_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); s.setAdapter(adapter); } public void onMyButtonClick(View view) { ImageView imageView1 = new ImageView(this); Random rand = new Random(); int rndInt = 4; //rand.nextInt(6) + 1; // n = the number of images, that start at index 1 String imgName = "die" + rndInt; int id = getResources().getIdentifier(imgName, "drawable", getPackageName()); imageView1.setImageResource(id); } } XML for the button: <Button android:id="@+id/button_roll" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/roll" android:onClick="onMyButtonClick" />

    Read the article

  • Android vs iPhone

    - by Moshe
    I know iPhone development fairly well. From personal experience, how hard would it be for me to get into Android. I am concerned less about code than I am about distribution of my software, given the fragmentation of the Android OS on compatible devices.

    Read the article

  • How to Search and Navigate XML Nodes

    - by edison681
    I have the following XML : <LOCALCELL_V18 ID = "0x2d100000"> <MXPWR ID = "0x3d1003a0">100</MXPWR> </LOCALCELL_V18> <LOCALCELL_V18 ID = "0x2d140000"> <MXPWR ID = "0x3d1403a0">200</MXPWR> </LOCALCELL_V18> <LOCALCELL_V18 ID = "0x2d180000"> <MXPWR ID = "0x3d1803a0">300</MXPWR> </LOCALCELL_V18> I want to get the inner text of each <MXPWR>. however, it is not allowed to use ID# to locate the inner text since it is not always the same. here is my code: XmlNodeList LocalCell = xmlDocument.GetElementsByTagName("LOCALCELL_V18"); foreach (XmlNode LocalCell_Children in LocalCell) { XmlElement MXPWR = (XmlElement)LocalCell_Children; XmlNodeList MXPWR_List = MXPWR.GetElementsByTagName("MXPWR"); for (int i = 0; i < MXPWR_List.Count; i++) { MaxPwr_form_str = MXPWR_List[i].InnerText; } } Any opinion will be appreciated.

    Read the article

  • Android - Display Image Caption Below Images in Gridview

    - by Tyler
    Hello - I am utilizing a version of the "Grid View" example from the Android Developers site: http://developer.android.com/resources/tutorials/views/hello-gridview.html And I would like to display a small text caption below each of the images. Can someone please give an example of how this might be accomplished (i.e. what needs to be edited)? Thanks!

    Read the article

  • XML Doc to JSP to TIFF

    - by SPD
    We have around 100 word templates, every time user gets a business request he goes into shared folder select the template he/she wants and enter information and save it as tiff, these tiffs later processed by some batch program. I am trying to automate this process. So I defined an XML which has Template information like <Template id="1"> <Section id="1"> <fieldName id="1">Date</fieldName> <fieldValue></fieldValue> <fieldtype></fieldType> <fieldProperty>textField</fieldProperty> </Section> <Section id="2"> <fieldName id="2">Claim#</fieldName> <fieldValue></fieldValue> <fieldtype></fieldType> <fieldProperty>textField</fieldProperty> </Section> </Template> Based on the template values I generate the JSP on fly. Now I would like to generate a TIFF file out of it in specified format. I am not sure how to handle this requirement. *edited the original question.

    Read the article

  • java: how to parse html-like xml

    - by Yang
    I have an html-like xml, basically it is html. I need to get the elements in each . Each element looks like this: <line tid="744476117"> <attr>1414</attr> <attr>31</attr><attr class="thread_title">title1</attr><attr>author1</attr><attr>date1</attr></line> My code is as below, it does recognize that there are 50 in the file, but it gives me NULLPointException when parsing NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("attr"); Any idea why this is happening? The same code has been used for other applications without problems. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); InputSource is = new InputSource(); is.setCharacterStream(new StringReader(cleanxml)); Document doc = db.parse(is); doc.getDocumentElement().normalize(); System.out.println("Root element " + doc.getDocumentElement().getNodeName()); NodeList nodeLst = doc.getElementsByTagName("line"); for (int s = 0; s < nodeLst.getLength(); s++) { System.out.println(nodeLst.getLength()); Node fstNode = nodeLst.item(s); if (fstNode.getNodeType() == Node.ELEMENT_NODE) { Element fstElmnt = (Element) fstNode; NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("attr"); Element fstNmElmnt = (Element) fstNmElmntLst.item(0); NodeList fstNm = fstNmElmnt.getChildNodes(); System.out.println("attr : " + ((Node) fstNm.item(0)).getNodeValue()); } }

    Read the article

  • Two AJAX asynchronus GET call: Only one get the xml file

    - by Woho87
    Hi! I have two AJAX GET calls that are set to asynchcronus = true; I want to obtain two XML files on my server. The two AJAX calls and rendering are defined in function foo & koo. And are called simultaneously. function foo(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ var xmlDoc = xmlhttp.responseXML; //Do something } } xmlhttp.open('get', 'url', true); xmlhttp.send(); } function koo(){ //Almost the same as function foo } foo(); koo(); I've noticed that inside the if statement in the first function call(foo), the code their will never compile. While in the second function call(koo). The code inside the if statement can be compiled. If I set both asynchronus to false, then there is no problem at all. If I remove the second function call(koo) from the code, than the code inside the if statement can be compiled. What can I do to have both asynchronus AJAX calls?

    Read the article

  • Processing XML comments in order using SAX & Cyberneko

    - by Joel
    I'm using cyberneko to clean and process html documents. I need to be able to process all the comments that occur in the original html documents. I've configured the cyberneko sax parser to process comments like so: parser.setProperty("http://xml.org/sax/properties/lexical-handler", consumer); ...using the same consumer as I am for DOM events. I get a callback for each of the comments: @Override public void comment(char[] arg0, int arg1, int arg2) throws SAXException { System.out.println("COMMENT::: "+new String(arg0, arg1, arg2)); } The problem I have is that all the comments are processed first, out of context of the DOM. i.e. I get a callback for all the comments before the document head, body etc.... What I'd like is for the comment callbacks to occur in the order they occur in the DOM. Edit: what I'm actually trying to do is parse the instructions for IE in the original html, such as: <!--[if lte IE 6]><body class="news ie"><![endif]--> At the moment they are all dropped, I need to include them in the cleaned HTML document.

    Read the article

  • How to display data in spinner from json

    - by user1605913
    I am retrieving values from a json url and then storing it in a string variable. Now I want to display that value in a spinner. I have created an array list in my strings.xml file. The xml file contains following code: <string name="credit_card_title">Card Type</string> <string-array name="credit_card"> <item >Select</item> <item >Visa</item> <item >MC</item> <item >Amex</item> <item >Discover</item> my spinner code is: <Spinner android:id="@+id/crdtcrd_crdtype" android:layout_width="match_parent" android:layout_height="wrap_content" android:entries="@array/credit_card" android:prompt="@string/credit_card_title" /> After retriving the value from the json url I am storing it in variable name String cardtype Now how can I display the value of cardtype in the Spinner crtdcrd_crdtype.... the json url is: http://mygogolfteetime.com/iphone/login/[email protected]/123456 From this URL I have to retrieve the value of cardtype and after retrieving the value i have to display it in the spinner.. There are different values for cardype like visa, mc, amex and discover All these values are in my strings.xml file and after retrieving the value I have to display it in Spinner.. Help needed still not able to find the solution.. Thanks in advance...

    Read the article

  • Android - How to Create Intent to open the activity that displays the "Accounts & Sync settings" scr

    - by bryan
    I have seen the below log message when navigating to the Account & sync settings screen but I am confused as to how to create an Intent to navigate there. INFO/ActivityManager(53): Starting activity: Intent { cmp=com.android.providers.subscribedfeeds/com.android.settings.ManageAccountsSettings } I dont seem to have access to the ManageAccountsSettings for development. I just wanted to create an Intent such as below, but I cant call out ManageAccountsSettings Intent i =new Intent(this,ManageAccountsSettings.class); //Then start the activity startActivity(intent);

    Read the article

  • iPhone/Android app development tutorials?

    - by Decipher
    Hi, I'm looking at jumping on the band-wagon and knock out a couple iPhone and Android apps. I'm not a complete beginner as I have programmed in quite a few languages, with my current focus on PHP and Drupal development, but I have not developed for either the iPhone or Android before. I have downloaded the respective SDKs, but I was hoping to find some good quality tutorials that with step-by-step guides getting your development environment up and building your first app.

    Read the article

  • Modify attribute of certain XML elements

    - by hgpc
    I would like to modify an attribute of a very long xml like this: <element index="0"> <subelement bla="asdf" /> <subelement bla="asdf" /> </element> <element index="1"> <subelement bla="asdf" /> <subelement bla="asdf" /> </element> ... I need to add N the value of each index attribute. Say N=5. The result would be: <element index="5"> <subelement bla="asdf" /> <subelement bla="asdf" /> </element> <element index="6"> <subelement bla="asdf" /> <subelement bla="asdf" /> </element> ... What's the easiest way to do this? I presume it would be with XSLT, but I don't know how to do it. Thanks!

    Read the article

  • Android googlemap Out of memory

    - by Xiaofeng
    Hi, I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often. I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory". How to save memmory usage in a googlemap api, or how to enlarge android api memmory limit. Thanks a lot!

    Read the article

  • XSD problem: The value of attribute on element is not valid with respect to its type

    - by Tom Brito
    (First of all, I'm trying to learn how to handle xsd files, I know very little) I got this xsd, and just copy to Eclipse IDE, and it says there an error on line 26: <xs:element name="Issuer" type="dkx:IssuerType" /> saying: cvc-attribute.3: The value 'dkx:IssuerType' of attribute 'type' on element 'xs:element' is not valid with respect to its type, 'QName'. Any idea what is this? (as this is an example file, I'm assuming it is an independent file, hope it is)

    Read the article

  • What's the closest thing to Apple's SpriteKit on Android devices? [on hold]

    - by Krumelur
    I've been playing around with the iOS 7 SpriteKit APIs and I totally love them. As I'm pretty much a n00b on Android, I'm wondering what the best Alternative would be if I wanted to go cross platform? I find Cocos2D learning curve pretty steep, where with SpriteKit it's a matter of minutes to get something on the screen. Then there's MonoGame and Cocos 2D for MonoGame - haven't tried either one I must admit.

    Read the article

  • Using database in Android

    - by Paul
    Does anyone know a good step by step tutorial for using sqlite on Android? I've found this: http://developer.android.com/guide/topics/data/data-storage.html#db and it ok to start with, but then it wants me to jump into other source code then its difficult to follow. I've tried others on the web, one from screaming penguin and that just kept causing errors with JVM. Advice greatly appreciated. I need to: Create database, with several tables (auto id, declare type) update get

    Read the article

  • how to display bigger resolution images in android?

    - by UMMA
    dear friends, referring to the code example of mine http://stackoverflow.com/questions/2997703/android-remote-image-getting-problem how can i accommodate bigger resolution images in android. when i try to display bigger resolution image from internet it give me null bitmap. any one guide me whats the solution? any help would be appreciated.

    Read the article

  • Android Test testPreconditions

    - by user1184113
    In Android developers I've seen that testPreconditions() method is supposed to be launch before all tests. But in my app test, it's acting like a normal test. It does not run before all tests. Is there something wrong ? Here is the description about testPreconditions() from android developer : "A preconditions test checks the initial application conditions prior to executing other tests. It's similar to setUp(), but with less overhead, since it only runs once."

    Read the article

< Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >