Search Results

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

Page 55/755 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Showing edittext obliquely in android

    - by Chandra Sekhar
    I have an EditText, which generally shows parallel to the screen X-axis. I want to show it obliquely (around 45 degree to horizontal axis). Is it possible to do this in Android. Please guide me in a direction so that I can try for it. After getting the two links in the answer by pawelzeiba, I proceed a little bit in solving this, but stuck again so I put another question on this. here is the link. So please help me to solve this.

    Read the article

  • Moving between android activities on button clicks

    - by cppdev
    I am writing a android application where, on startup activity view, I have a button "DoIt". When user clicks "DoIt" button, I start another activity with different layout. On newly started activity, I have a button "Back" which should take me to the first activity. How to accomplish this. What code should I write on OnClick method of "Back" button. Also, I want the newly created activity to die after back button is pressed and application comes back to start-up activity.

    Read the article

  • Context module for block visibility

    - by calebthorne
    I have a site built in Drupal 6 that requires a number of blocks that are only visible to certain roles or on specific pages. Normally, I would use the block configuration settings to control page and role visibility. However I recently ran across the context module that effectively splits the site into "sections" or "groups" of related attributes. My question is: When is it appropriate to control block visibility from context rather than the block configuration settings? Should I only use one or the other or a combination of both?

    Read the article

  • Determine Android phone's proximity to known point while conserving power

    - by ahsteele
    I am trying to determine if an Android user has had a close proximity to a list of predetermined locations. I'd like to do this with the least amount of drain on the phone's battery. The two mechanisms I see for accomplishing this are proximity alerts and requesting location updates. What are the pros and cons of the two methods? Will one have less affect on the battery than the other? In either case I would guess the specific location manager used would affect power usage (existing Stack Overflow answer).

    Read the article

  • Best practice for error handling in an Android Service

    - by Omar Kohl
    I have an Android Service that does some background processing on an image using a separate Thread. If an error occurs in this Service or even worse in the thread, what is the best practice to inform the launching Activity of the problem and allow the application to recover to a stable state (i.e. the state it was in before launching the service). From within the Service I could post a Toast or a Notification, but that doesn't help me. I would like to inform the user about the problem but at the same time recover the application to a stable state.

    Read the article

  • Data not displayed first time in android after copying the file from assets to data folder

    - by Thinkcomplete
    Description I have used the code tip from http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ to copy a pre-filled data file to the target and handled this in a asynch task Problem : On starting the application it gives error and shuts down first time, starting again without any change it works perfectly fine. So first time after the file is copied, the error comes but after that no issues. Please help Code attached:.. private class CopyDatabase extends AsyncTask<String, Void, Boolean> { private final ProgressDialog dialog = new ProgressDialog(BabyNames.this); protected void onPreExecute() { this.dialog.setMessage("Loading..."); this.dialog.show(); } @Override protected Boolean doInBackground(String... params) { // TODO Auto-generated method stub try { namesDBSQLHelper.createDatabase(); return null; } catch(IOException ioe){ ioe.printStackTrace(); } return null; } protected void onPostExecute(final Boolean success){ if (this.dialog.isShowing()){ this.dialog.dismiss(); } } }

    Read the article

  • Android Shopping App And SQLite

    - by Melih Mucuk
    I want to develop shopping app for android and it should works like tinypay.me Users can sign up and they sell items or buy items immediately. I need to database. I want to use SQLite but I don't find any answer to these questions: SQLite database files are stored on the user's phone, isn't it ? If it's true, here is the scenario: User logged in, then he/she wants to sells something on app. He/she creates ad and he/she published it on the app. These variables writing their database. When other users logged in, will they see this ad? If it's possible, how can sync database between users ? Thanks for attention.

    Read the article

  • Scratchable Ticket kind Custom View Item in Android ?

    - by Andhravaala
    Hi All, I need to develop a Instant Lottery game app. I need an idea/procedure to implement Scratchable custom widget similar to instant Lottery Tickets in Android. The requirement is like, the actual content(secret number) should be covered by some image(which indicates scratch area). When the user touch and scratch the image, the image has to disappear slowly and the background content(secret number) should appear accordingly. Please let me know the best way to implement this. I am in real need of it. Thanks in advance.

    Read the article

  • How to reference an object in a lower fragment in android

    - by Silas Greenback
    I am trying to build a help screen that is going to go on a mediaplayer. The idea is to put a fragment with a transparent theme on top of the current view. (See How do I create a help overlay like you see in a few Android apps and ICS? for the basic idea). Now, I understand the steps in the mentioned link, but how do I connect the circles and arrows and paragraphs next to each one (explaining what each one was) to the lower object? Example, I have an object: R.id.music_button and I want there to be and arrow that points to music button. Trying to support as many devices as we do it will be very difficult to just draw a few pictures as part of the top layout and expect them to line up. Again, how do I reference an object on a fragment below the top level? Thanks

    Read the article

  • Android - How to launch Google map intent in android app with certain location, zoom level and marker

    - by umirza47
    Map Intent not working with specific zoom level as well as custom marker float lat = 40.714728f; float lng = -73.998672f; String maplLabel = "ABC Label"; final Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q="+lat+","+lng+"&z=16 (" + maplLabel + ")")); startActivity(intent); Anybody know what is wrong? or how to do so? I want to show map of certain (lat,lng) with a custom label-marker at a specific zoom level.

    Read the article

  • Get rid of all user data of Android application after bigger update

    - by Johe Green
    Hi, I completely revamped an app. Tested it for a while on my device and emulator. The app worked fine. However when I updated the app through the Android market, my users experienced crashes. Since there is no way to properly debug this procedure I asume the crash is caused by old data which is not being removed from the device (probably from the onsavedstate bundle?!). Is there a way to do a "clean/total" reinstall without having the user to do it manually? Best Regards Johe

    Read the article

  • How Android 2.2 interacting with Flash 10.1?

    - by zxcat
    Hi! I'm searched adobe and android developers sites, but can't find any details on this. Is it possible to use Flash as a part of my app? E.g. like a widget/GUI element? Or it's integrated in browser only and can't be simple accessible? I know, Adobe AIR apps are supported as standalone .apk. So it must be some API/SDK (from Google) to connect with Flash player. Is there any details, how to program it (more clear: launch swf from my app and interact with it)? Thank you!

    Read the article

  • Location accuracy of Google Analytics for Android

    - by BadCash
    When testing Google Analytics (version 2) for an Android project, I noticed that the Real Time map shows my location to be about 200 miles from my actual location. I'm running my project on a physical device, which leads me to believe that Google Analytics doesn't actually send any location information, but rather gets it from the phones IP address when the data is sent to Googles server. Is there any way to alter this behavior and provide my own location data using getLastKnownLocation() for example? Sending it as an actual Label/Action string would of course work, but that means I can't use Google Analytics fancy map feature to view where my users are coming from.

    Read the article

  • [Android] Pass variable/intent to an activity when launched from a Widget

    - by Pelly
    Hi, Currently within an activity in my application I can call another activity and pass a variable to it in the following manner: Intent myIntent = new Intent(parentView.getContext(), ShowStations.class); myIntent.putExtra("stationName", stations[position].StationName); startActivity(myIntent); This works fine, but now I want to be able to do the same from my Widget. Currently this code works fine for launching a specific activity from my widget: Intent WidgetIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER).setComponent(new ComponentName("grell.com", "grell.com.FavStations")); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, WidgetIntent, 0); updateViews.setOnClickPendingIntent(R.id.widget_main, pendingIntent); So now I am wondering how can I launch the same activity as shown in the first example but also pass through the 'stationName' variable. Any help would be greatly appreciated. Cheers

    Read the article

  • Android bug with buttons and editText

    - by khatereh
    I have some android code (textView, editText, button) and I add all strings in string.xml. I call these data in this way: Button vibro; setVibro((Button) findViewById(R.id.vibro)); vibro.setText(getString(R.string.vibro_button)); vibro = (Button)findViewById(R.id.vibro); and also I create set and get method for it. This is one part of my main.xml: android:id="@+id/editme" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/username" / <Button android:id="@+id/buttons" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/bfirst" /> and this is one part of my string.xml: Register The problem is that I see the buttons and edit text and everything in all my pages. I am sure that I call them in a correct way. But what can cause a problem?

    Read the article

  • Android layout issue - table/grid/linear

    - by phpmysqlguy
    I am trying to wrap my head around some basic layout issues in android. Here is what I want as my final goal: As you can see, various fields set up like that. The fields get filled in based on XML data. There could be 1 set of fields, or there could be more. I tried a tablelayout, but couldn't get it set up right even when layout_span for Field 7. It worked ok, but when I tried to change the widths of Field 1 thru 5, the spanned row below it didn't conform to the changes (not like an HTML table would). The fields in each group need to lineup if there are more than one (see red lines in image). Can someone point me in the right direction on how I should approach this? Thanks

    Read the article

  • API for configuring static IP addresses in an android application

    - by awoodland
    Is it possible to set the IP address of an interface in Android within an application? I can query the available interfaces and their current addresses using java.net.NetworkInterface, but this doesn't provide a facility to change these. Did I just miss something somewhere or is it not allowed? I was hoping to be able to make my application either change or add an alias to one or more of the existing interfaces at runtime on an "off the shelf" device. (2.1/2.2). Ideally I'd like to do this for both IPv4 and v6 addresses.

    Read the article

  • Android application: showing overlay items in AsyncTask

    - by user1707887
    I am building an android application that uses google maps to overlay items. The latitude and longitude for the items I get from a MySQL database. To do this I connect to a php script using HTTP in Async Task. My code for displaying items on the map is in the onPostExecute() method of Async Task. Everything works fine but when I for example rotate the phone all my overlayed items disappear. How can I resolve this issue? Should overlaying the items happen in the main thread? If so, I need to somehow pass the information from the async taks to the main thread, which I have looked into but have not been able to get that working. If somebody knows a good and right way to do this, I would really appreciate the help.

    Read the article

  • Add CalendarView button to Google Maps API V2 - Android

    - by nirk
    I want to implement CalendarView / DatePicker button into my Google Map How can i do it ? On click of this button i want a small calendar to open and enable to pick a date from the calendar,when the date is picked i want to execute a function that i wrote. Thank you ! **The area marked with red doesn't exist right now : I want this button to open a datePicker https://imagizer.imageshack.us/v2/390x695q90/633/VyWT4l.jpg my activity xml right now looks like: <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/map" tools:context=".MapsActivity" android:name="com.google.android.gms.maps.SupportMapFragment"/>

    Read the article

  • Android Terminal and Log Dumping

    - by J3hova
    I am trying to send terminal commands programmaticly from an android activity. At the moment I'm using something like the following: Process process = null; DataOutputStream os = null; process = Runtime.getRuntime().exec("su"); os = new DataOutputStream(process.getOutputStream()); os.writeBytes("./data/program1\n"); os.writeBytes("./data/program2\n"); os.writeBytes("exit\n"); os.flush(); However, my program1 is failing to run successfully and I believe it is due to inadequate user permissions. Now for my question: Does anyone know how I can dump the terminal to a file and save it on the phone or sdcard? The program is tying into the terminal to feed it commands, I want to know a way to open a connection the otherway and access the (what is normally visual on a terminal screen) output.

    Read the article

  • Making simple tabs in android

    - by user2910566
    I am new to Android. I am making a tab Activity that has 3 tabs in it. . I came across reading some interesting articles that tab can be made in three ways:: Regular TabHost Using simple Fragments Using Action Bar Sherlock I have a set of questions Which is a better choice & why ? Which gives more flexibility, efficiency & performance ? Which would be the preferd choice in case of requirement changes happen in future ? My research indicate :: ActionBarsherlock is better ! Is there something better than this ? If so what is it ?

    Read the article

  • Android ratings and listviews

    - by puppetmaster04
    I'd like to add a list of reviews of books to my Android app. Basically what I'm after is a fixed rating using the RatingBar and a ListView containing the snippet of the review for each review. Once clicked I want the list item to expand and fill with the text of the full review. I have the content of the snippet, full text, and rating, but don't know how best to go about the layout. Any ideas are ok, I don't need full code, but I would much prefer to keep it to XML layout.

    Read the article

  • Store multiple XML files in Android

    - by Federico Perez
    I am developing a survey android app so that: Each survey is downloaded from server as XML file. A survey can have multiple versions (new survey, new XML). When a new XML is downloaded it should overwrite its corresponding previous XML. I would like to store the files in a sqlite database. How can I insert my files into the db? Should I use BLOB or store the content of the XML as string? In any case how should I do it?

    Read the article

  • Async & Await in C# with Xamarin

    - by Wallym
     One of the great things about the .NET Framework is that Microsoft has worked long and hard to improve many features. Since the initial release of .NET 1.0, there has been support for threading via .NET threads as well as an application-level threadpool. This provided a great starting point when compared to Visual Basic 6 and classic ASP programming. The release of.NET 4 brought significant improvements in the area of threading, asynchronous operations and parallel operations. While the improvements made working with asynchronous operations easier, new problems were introduced, since many of these operations work based on callbacks. For example: How should a developer handle error checking? The program flow tends to be non-linear. Fixing bugs can be problematic. It is hard for a developer to get an understanding of what is happening within an application. The release of .NET 4.5 (and C# 5.0), in the fall of 2012, was a blockbuster update with regards to asynchronous operations and threads. Microsoft has added C# language keywords to take this non-linear callback-based program flow and turn it into a much more linear flow. Recently, Xamarin has updated Xamarin.Android and Xamarin.iOS to support async. This article will look at how Xamarin has implemented the .NET 4.5/C# 5 support into their Xamarin.iOS and Xamarin.Android productions. There are three general areas that I'll focus on: A general look at the asynchronous support in Xamarin's mobile products. This includes async, await, and the implications that this has for cross-platform code. The new HttpClient class that is provided in .NET 4.5/Mono 3.2. Xamarin's extensions for asynchronous operations for Android and iOS. FYI: Be aware that sometimes the OpenWeatherMap API breaks, for no reason.  I found this out after I shipped the article in.

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >