Search Results

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

Page 51/1032 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Android getting XML values

    - by Nils
    Hello, I have the following XML code, which I got by a UPnP device and like to get the res value - the RTSP URL. In this case rtsp://10.42.0.103:554/live.sdp How can I do this? I heard that Android has some built-in support for reading XML. Is that true? <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"> <item id="11" parentID="1" restricted="1"> <dc:title>Network Camera Stream 1</dc:title> <upnp:class>object.item.videoItem</upnp:class> <res protocolInfo="rtsp-rtp-udp:*:video/mpeg4-generic:*" resolution="640x480">rtsp://10.42.0.103:554/live.sdp</res> </item> <item id="12" parentID="1" restricted="1"> <dc:title>Network Camera Stream 2</dc:title> <upnp:class>object.item.videoItem</upnp:class> <res protocolInfo="rtsp-rtp-udp:*:video/mpeg4-generic:*" resolution="176x144">rtsp://10.42.0.103:554/live2.sdp</res> </item> </DIDL-Lite>

    Read the article

  • Android: duplicate items in ListVew. Maybe getView() called too many times?

    - by gonzobrains
    Hi, I am trying to create a simple program which displays a "shopping cart" list of items, along with a few buttons below it to manage the cart. The biggest problem is that items are getting duplicate entries in the list view. That is, for every item I want to enter I see it appear two times in the list view. What's the problem? Also, the scrollable area of my cart is not big enough. How do I set it so that it is bigger but I can still see my buttons? Perhaps I should put the buttons above the cart? Here is my shopping cart's layout XML: Here is the layout for individual row items: <LinearLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent"> <TextView android:id="@+id/BookTitle" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:singleLine="true" android:gravity="center_vertical" / <TextView android:id="@+id/BookPrice" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:singleLine="true" android:ellipsize="marquee" / Thanks, gb

    Read the article

  • Passing Activity A's data into Activity B

    - by user1058153
    What i am trying to show here is that I am trying to pass the data in Activity A to Activity B. Activity A mainly there are 3 textbox for me to key in something then a button to go to Activity B(Confirmation Page) and in Activity B, i am able to show what i have keyed in Activity A. I am new to Android, so can someone guide me through this? In Activity A @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activitya); Textview01 = (EditText) this.findViewById(R.id.txtView1); Textview02 = (EditText) this.findViewById(R.id.txtView2); Textview03 = (EditText) this.findViewById(R.id.txtView3); mButton = (Button) findViewById(R.id.button); mButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent i = new Intent(ActivityA.this, ActivityB.class); i.putExtra("Textview01", txtView1.getText().toString()); i.putExtra("Textview02", txtView2.getText().toString()); i.putExtra("Textview03", txtView3.getText().toString()); startActivity(i); In Activity B. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.confirmbooking); TextView txtPickup = (TextView) this.findViewById(R.id.txtPickup); TextView txtLocation = (TextView) this.findViewById(R.id.txtLocation); TextView txtDestination = (TextView) this.findViewById(R.id.txtDestination); txtLocation.setText(getIntent().getStringExtra("Location")); txtPickup.setText(getIntent().getStringExtra("Pick Up Point")); txtDestination.setText(getIntent().getStringExtra("Destination")); In my Activity B XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="txtView01:" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView01"></TextView> <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="txtView02:"></TextView> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView02"></TextView> <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="txtView03:"></TextView> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView03"></TextView> <Button android:id="@+id/btnButton" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Book now" /> </LinearLayout> Can someone tell me if this is correct? I'm getting some error like a popup Instrumental.class. LogCat shows : 11-26 17:27:40.895: INFO/ActivityManager(52): Starting activity: Intent { cmp=ActivityA/.ActivityB (has extras) } 11-26 17:27:42.956: DEBUG/dalvikvm(252): GC_EXPLICIT freed 156 objects / 11384 bytes in 346ms 11-26 17:27:47.815: DEBUG/dalvikvm(288): GC_EXPLICIT freed 31 objects / 1496 bytes in 161ms

    Read the article

  • Android on Eclipse - Adding jar files to an Eclipse Android Project

    - by Shalini
    I am developing an Android App that uses the Google APIs Client Library for Java version 1.12.0. I have added the jar files to the /libs folder (and not to a new /lib folder). I get the following error: Dx trouble processing "javax/xml/namespace/QName.class": Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library. I am NOT using Maven though, and all the answers by others seem to make use of Maven. Android version - 4.1.2 API level 16 Eclipse - Java EE Juno Any suggestions on how I can solve this?

    Read the article

  • Android: Why my user Interface does not get drawn when I Inflate the resource layout file?

    - by Einiosaurus
    First of all, I'm a newbie on Android programming, so please be detailed in your answers. I have a layout main.xml file with format similar to <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:orientation = "vertical" android:layout_width = "fill_parent" android:layout_height = "fill_parent"> <LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:orientation = "horizontal"   android:layout_width = "fill_parent" android:layout_height = "fill_parent"> <EditText android:id="@+id/a" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:id="@+id/xSquared" android:layout_width = "fill_parent" android:layout_height = "wrap_content" android:text = "@string/equationPart1" /> </LinearLayout> <LinearLayout ... </LinearLayout> </LinearLayout> In my Java source file, I inflate the UI using command: setContentView(R.layout.main); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } However, when I run the emulator, the UI does not show up like what I expect. Instead, it just display a simple EditText text box. I wonder what is going wrong. Is it because I put a layout inside another layout? I don't think there is any problem with that right?

    Read the article

  • "No XML content. Please add a root view or layout to your document."

    - by ez4nick
    I am trying to follow this tutorial : http://developer.android.com/training/basics/firstapp/building-ui.html as I am new to android developing and this is what my "activity_main.xml" file looks like : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <EditText android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" /> When I click run I get an error that says "No XML content. Please add a root view or layout to your document." and I noticed there is a new file generated called "activity_main.out.xml". What could I be doing wrong?

    Read the article

  • Is it possible to restart the phone with Android SDK or NDK?

    - by J Andy
    Is it possible to programmatically restart the phone from a application (service) running on top of the Dalvik VM? If the SDK does not provide this functionality, then how about using the NDK and calling some functions provided by the kernel? I know this option is not preferred (not stable enough libs), but if it's the only option, I'll have to consider that as well.

    Read the article

  • editText not centering

    - by Will Nasby
    I have a large editText that no matter what I try, won't center. I have tried putting it in a horizontal and vertical linear layout and then setting that gravity to center because setting the imageText's gravity to center, it still hugs the left of my activity. <EditText android:id="@+id/editText1" android:layout_width="250dp" android:layout_height="wrap_content" android:ems="10" android:gravity="center" android:lines="8" android:maxLines="8" android:minLines="8" > </EditText> And here is what it is doing:

    Read the article

  • How to set Camera View as background with views over it?

    - by Android Student
    So, I'm trying to make the background to one of my apps look "futuristic." I thought of an idea to make the screen look almost transparent yet have views over it. So, it would look something like this: I'm thinking that I can use the camera to capture the background of the phone (without taking a picture, just having the real time view in the background) and then, if possible, place a semi-transparent slightly blurred ImageView over that. Finally, on top of that I can place the other views including the ImageButtons. So, my question is how would I go about doing this? I have searched but haven't found anything relevant. It must be possible; its just how to do it? I don't expect you to give me all the code as an answer, just if you have any ideas that can help or links or code that can point me in the right direction, it would be greatly appreciated! Thanks!

    Read the article

  • Android - How to circular zoom/magnify part of image?

    - by IZI_Shadow_IZI
    I am trying to allow the user to touch the image and then basically a cirular magnifier will show that will allow the user to better select a certain area on the image. When the user releases the touch the magnified portion will dissapear. This is used on several photo editing apps and I am trying to implement my own version of it. The code I have below does magnify a circular portion of the imageview but does not delete or clear the zoom once I release my finger. I currently set a bitmap to a canvas using canvas = new Canvas(bitMap); and then set the imageview using takenPhoto.setImageBitmap(bitMap); I am not sure if I am going about it the right way. The onTouch code is below: zoomPos = new PointF(0,0); takenPhoto.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction(); switch (action) { case MotionEvent.ACTION_DOWN: zoomPos.x = event.getX(); zoomPos.y = event.getY(); matrix.reset(); matrix.postScale(2f, 2f, zoomPos.x, zoomPos.y); shader.setLocalMatrix(matrix); canvas.drawCircle(zoomPos.x, zoomPos.y, 20, shaderPaint); takenPhoto.invalidate(); break; case MotionEvent.ACTION_MOVE: zoomPos.x = event.getX(); zoomPos.y = event.getY(); matrix.reset(); matrix.postScale(2f, 2f, zoomPos.x, zoomPos.y); canvas.drawCircle(zoomPos.x, zoomPos.y, 20, shaderPaint); takenPhoto.invalidate(); break; case MotionEvent.ACTION_UP: //clear zoom here? break; case MotionEvent.ACTION_CANCEL: break; default: break; } return true; } });

    Read the article

  • Why do apps from Android 2.1 stop working with 2.2?

    - by poeschlorn
    Hi guys, I've just updated my nexus one to 2.2. Now all of my (own and some from the market) apps throw exceptions and were closed. It's weird, in the app I'm developing atm, there it displays only my start page with buttons, but when I tap on one button to fire an intent to another activity my app gets closed with an exception. Yesterday before the update everything worked fine. The same thing in my emulator: I have two devices, one with API level 7 and one with level 8. Level 7 worked fine, but level 8 killed my app :( What is the problem and how can I solve this? I'm desperatly trying to get it working again :( I hope someone can help me fixing this

    Read the article

  • Why do we need URIs for XML namespaces?

    - by Patryk
    I am trying to figure out why we need URIs for XML namespaces and I cannot find a purpose for that. Can anyone brighten me a little showing their use on a concrete example? EDIT: Ok so for instance: I have this from w3schools <root xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="http://www.w3schools.com/furniture"> <h:table> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> <f:table> <f:name>African Coffee Table</f:name> <f:width>80</f:width> <f:length>120</f:length> </f:table> </root> So what should http://www.w3schools.com/furniture hold ?

    Read the article

  • You Don’t Need to Install a Task Manager: How to Manage Running Apps on Android

    - by Chris Hoffman
    Google Play is full of task managers for Android. These utilities can show you apps running in the background, kill running apps, and otherwise manage your apps — but you don’t need to install any third-party software to do this. We’ll show you how to quickly and easily kill and manage your running apps using only the software included with your Android phone. Third-party task managers are unnecessary and many include harmful features, like task killers.    

    Read the article

  • Best Platform/Engine for turn based Client/Server Android game

    - by Paradine
    I'm currently designing a turn based game for tablets. Initially for Android with porting to iOS later considered in design. I'm having trouble narrowing down the available technologies to even know where to spend my research time. I am hoping that if I explain what I am trying to achieve someone may be able to suggest a platform and/or engine. I've looked into some of the open source Engines ( http://www.cuteandroid.com/ten-open-source-android-2d-or-3d-game-engine-for-android-developers ) and some appear to handle much of what I might require - although with a higher focus on graphics than i need. Mages looks interesting although development appears to have ceased. If I could somehow leverage GoogleApps that would be excellent. Here is what I am trying to achieve: PvP turn based strategy game over internet - minimal animation and bandwidth required Players match up online using MetaGame system MatchID created on Resolution Server and Game starts Clients have 30 second countdown to select MoveString Clients sends small secure timestamped and MatchIDed MoveString to Resolution server Resolution server looks up Move String for each player, Resolves and Updates Players status in MatchID on Server Resolution server updates Client Views Repeat until victory conditions met - MatchID Closed, Rewards earned in MetaGame There will also need to be a full social and account system and metagame backend - but this could be running on separate system(s) Tablet in Offline mode would be catalog browsing and perhaps single player AI - bum I'm focusing on the Resolution Server at this point I'm not even certain if I would be looking at an Android App or a WebApp at this stage! I want a custom GUI so I guess an app - but maybe as I have little animation a WebApp might also work. Probably some combination of both. There will be very small overhead in data between client server - essentially a small text string every 30 seconds sent to the Resolution server which looks up the Effect and applies it to the Opponents string and determines some results to apply to the match. The client view is updated minimally with the results (only 5 in game Integers tracked) - perhaps triggering small animations/popups on the client to show the end result. e.g Explosion. If you have suggestions for a good technology or platform to best achieving the Resolution Server I'd love to hear. Also if you have experience with open source Engines - and could narrow down which (if any ) might be most suitable that would be a big help. Thanks in advance

    Read the article

  • Guidance for Web XML Api's

    - by qstarin
    I have to create an API for our application that is accessible over HTTP. I envision the API's responses to be simple XML documents. It won't be a REST API (not in the strict sense of REST). I am fairly new to this space - of course I've had to consume some Web API's in my work, but often they are already wrapped in language native libraries (i.e., TweetSharp). I'm looking for information to guide the design of an API. Are there any articles, blog posts, etc. that review and expound upon the design choices to be made in a Web API? Design choices would be things like how to authenticate, URL structure, when users submit should the URL they POST to determine the action being performed or should all requests go to a common URL and some part of the POST'd data is responsible for routing to a command, should all responses have the same document root or should errors have a different root, etc., etc. Ideally, such articles or blog posts would enumerate through the common variations for any given point of design and expound on the advantages and disadvantages, such that they would inform me to make my own decision (as opposed to articles that simply explain one single way to do something). Does anyone have any links or wisdom they can share?

    Read the article

  • Best Platform/Engine for turn based Client/Server Android game

    - by Paradine
    I'm currently designing a turn based game for tablets. Initially for Android with porting to iOS later considered in design. I'm having trouble narrowing down the available technologies to even know where to spend my research time. I am hoping that if I explain what I am trying to achieve someone may be able to suggest a platform and/or engine. I've looked into some of the open source Engines ( http://www.cuteandroid.com/ten-open-source-android-2d-or-3d-game-engine-for-android-developers ) and some appear to handle much of what I might require - although with a higher focus on graphics than i need. Mages looks interesting although development appears to have ceased. If I could somehow leverage GoogleApps that would be excellent. Here is what I am trying to achieve: PvP turn based strategy game over internet - minimal animation and bandwidth required Players match up online using MetaGame system MatchID created on Resolution Server and Game starts Clients have 30 second countdown to select MoveString Clients sends small secure timestamped and MatchIDed MoveString to Resolution server Resolution server looks up Move String for each player, Resolves and Updates Players status in MatchID on Server Resolution server updates Client Views Repeat until victory conditions met - MatchID Closed, Rewards earned in MetaGame There will also need to be a full social and account system and metagame backend - but this could be running on separate system(s) Tablet in Offline mode would be catalog browsing and perhaps single player AI - bum I'm focusing on the Resolution Server at this point I'm not even certain if I would be looking at an Android App or a WebApp at this stage! I want a custom GUI so I guess an app - but maybe as I have little animation a WebApp might also work. Probably some combination of both. There will be very small overhead in data between client server - essentially a small text string every 30 seconds sent to the Resolution server which looks up the Effect and applies it to the Opponents string and determines some results to apply to the match. The client view is updated minimally with the results (only 5 in game Integers tracked) - perhaps triggering small animations/popups on the client to show the end result. e.g Explosion. If you have suggestions for a good technology or platform to best achieving the Resolution Server I'd love to hear. Also if you have experience with open source Engines - and could narrow down which (if any ) might be most suitable that would be a big help. Thanks in advance

    Read the article

  • Inserting data to database from Android

    - by Angel
    I have to build an application where the requirement is that my clients will send data from their Android device and I have to save that data to a database. I have done the part of coding that inserts data from Android emulator to my XAMPP database on localhost, now I have to implement the real thing. How can I connect the devices where my application will be installed to the XAMPP database I have created so that the data they send can be inserted into it?

    Read the article

  • android third party libraries

    - by Terrance
    Its hard to believe that there aren't a ton of awesome third party (possibly open source) libraries out on the web for android using java but, I cant say I have found a great many so far but, droid seems like the only notable one I've come across. Any other majorly useful android libraries out there? Sorry in advanced if there is a dupe out there somewhere (seems like there should be) but if there is by all means post it and let me know.

    Read the article

  • How to Use Quick Toggles on Your Android Phone

    - by Chris Hoffman
    One of the big new features in Apple’s iOS 7 is Control Center, which allows you to quickly access and toggle common setting from anywhere. However, Android phones have had quick toggles for a long time. Android now has its own built-in quick toggles, while popular manufacturer-customized interfaces like Samsung’s TouchWiz have their own quick toggles, which work differently. You can also add custom quick toggles in different places.    

    Read the article

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