Search Results

Search found 12950 results on 518 pages for 'field activities'.

Page 12/518 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • passing int into android activities

    - by Dawood Abbasi
    i pass int to next activity using this code Intent intent = new Intent(A.this, B.class); intent.putExtra("selectedType", i); startActivity(intent); and then receive this in activity B Intent intent = new Intent(); int i = intent.getIntExtra("selectedType", 0); Toast.makeText(getApplicationContext(), String.valueOf(i), Toast.LENGTH_LONG).show(); but when in this activity, it always display 0.

    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

  • Factor Clojure code setting many different fields in a Java object

    - by chris
    How do I factor code setting many different fields in a Java object? I would like to factor (set! (. employee name) "Chris") (set! (. employee age) 100) (set! (. employee salary) 5000) to (doseq [field '((name "Chris") (age 100) (salary 5000))] (set! (. employee (first field)) (second field))) However this won't work because the period is a macro, and tries to evaluate (first field) literally. By the way, I understand that setting fields is not good practice. I need to inter-operate with legacy code.

    Read the article

  • mysql - union with creating demarcated field

    - by Qiao
    I need UNION two tables with creating new field, where 1 for first table, and 2 for second. I tried ( SELECT field, 1 AS tmp FROM table1 ) UNION ( SELECT field, 2 AS tmp FROM table2 ) But in result, tmp field was full of "1". How it can be implemented?

    Read the article

  • What happens when you add/remove current site as trusted site?

    - by kasey
    What happens when you add/remove the current site, while logged on, as a trusted site? When users do this on our website, and then try to click on a link or close the browser, they get the following JavaScript exception: "Microsoft JScript runtime error: 'type' is null or not an object" in the below library code at the line "var etype = this.type = e.type.toLowerCase();" Sys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) { /// <summary locid="M:J#Sys.UI.DomEvent.#ctor" /> /// <param name="eventObject"></param> /// <field name="altKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.altKey"></field> /// <field name="button" type="Sys.UI.MouseButton" locid="F:J#Sys.UI.DomEvent.button"></field> /// <field name="charCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.charCode"></field> /// <field name="clientX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientX"></field> /// <field name="clientY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientY"></field> /// <field name="ctrlKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.ctrlKey"></field> /// <field name="keyCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.keyCode"></field> /// <field name="offsetX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetX"></field> /// <field name="offsetY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetY"></field> /// <field name="screenX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenX"></field> /// <field name="screenY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenY"></field> /// <field name="shiftKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.shiftKey"></field> /// <field name="target" locid="F:J#Sys.UI.DomEvent.target"></field> /// <field name="type" type="String" locid="F:J#Sys.UI.DomEvent.type"></field> var e = Function._validateParams(arguments, [ {name: "eventObject"} ]); if (e) throw e; var e = eventObject; var etype = this.type = e.type.toLowerCase(); this.rawEvent = e; this.altKey = e.altKey; if (typeof(e.button) !== 'undefined') { this.button = (typeof(e.which) !== 'undefined') ? e.button : (e.button === 4) ? Sys.UI.MouseButton.middleButton : (e.button === 2) ? Sys.UI.MouseButton.rightButton : Sys.UI.MouseButton.leftButton; } if (etype === 'keypress') { this.charCode = e.charCode || e.keyCode; } else if (e.keyCode && (e.keyCode === 46)) { this.keyCode = 127; } else { this.keyCode = e.keyCode; } this.clientX = e.clientX; this.clientY = e.clientY; this.ctrlKey = e.ctrlKey; this.target = e.target ? e.target : e.srcElement; if (!etype.startsWith('key')) { if ((typeof(e.offsetX) !== 'undefined') && (typeof(e.offsetY) !== 'undefined')) { this.offsetX = e.offsetX; this.offsetY = e.offsetY; } else if (this.target && (this.target.nodeType !== 3) && (typeof(e.clientX) === 'number')) { var loc = Sys.UI.DomElement.getLocation(this.target); var w = Sys.UI.DomElement._getWindow(this.target); this.offsetX = (w.pageXOffset || 0) + e.clientX - loc.x; this.offsetY = (w.pageYOffset || 0) + e.clientY - loc.y; } } this.screenX = e.screenX; this.screenY = e.screenY; this.shiftKey = e.shiftKey; } Note: the site does not require trusted privileges to function correctly.

    Read the article

  • JPA Is there a way to do something like SELECT <field>, count(*) FROM <table> GROUP BY <field>

    - by javydreamercsw
    I've been looking in the web for examples on the aggregates like count but it seems all of them are using the aggregate alone. SELECT field, count(*) FROM table GROUP BY field Should have something like: field.value1, x1 field.value2, x2 .... I'm looking for a pure JPA answer for this one. If not I guess I can then do further queries just for the count part but that seems unefficient. Any ideas?

    Read the article

  • How do I get parameters between activities?

    - by Matt
    I am working on an app that has multiple tabs. In the first tab the user will enter values. In the other tabs it will display the results of calculations based off of those values. Like in tab 1, the user will enter "3" and "2". In tab 2, the program will add them and display "5". In tab 2 how do I access the ints "3" and "2"? Thanks

    Read the article

  • Android ArrayList<Location> passing between activities

    - by squixy
    I have simple class Track, which stores information about route: import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import android.location.Location; public class Track implements Serializable { private static final long serialVersionUID = -5317697499269650204L; private Date date; private String name; private int time; private double distance, speed; private ArrayList<Location> route; public Track(String name, int time, double distance, ArrayList<Location> route) { this.date = new Date(); this.name = name; this.time = time; this.distance = distance; this.speed = distance / (time / 3600.); this.route = route; } public String getDate() { return String.format("Date: %1$td-%1$tb-%1$tY%nTime: %1$tH:%1$tM:%1$tS", date); } public String getName() { return name; } public int getTime() { return time; } public double getDistance() { return distance; } public float getSpeed() { return (float) speed; } public ArrayList<Location> getRoute() { return route; } @Override public String toString() { return String.format("Name: %s%nDate: %2$td-%2$tb-%2$tY%nTime: %2$tH:%2$tM:%2$tS", name, date); } } And I'm passing it from one activity to another: Intent showTrackIntent = new Intent(TabSavedActivity.this, ShowTrackActivity.class); showTrackIntent.putExtra("track", adapter.getItem(position)); startActivity(showTrackIntent); Where (Track object is element on ListView). I get error during passing Track object: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = classes.Track) What is happening?

    Read the article

  • Sharepoint Custom Field default template

    - by Mina Samy
    Hi all I want to develop a custom lookup field for sharepoint. I created a class as the following public class CustomLookupControl:BaseFieldControl and overided this method protected override string DefaultTemplateName { get { return base.DefaultTemplateName; } } but when I edit an item I find that the place of the field is empty. my question is that I don't want to implement a custom rendering template for the field, I want to use the default template of the lookup field how can this be achieved.

    Read the article

  • Playing BG Music Across Activities in Android

    - by scarface
    Hello! First time to ask a question here at stackoverflow. Exciting! Haha. We're developing an Android game and we play some background music for our intro (we have an Intro Activity) but we want it to continue playing to the next Activity, and perhaps be able to stop or play the music again from anywhere within the application. What we're doing at the moment is play the bgm using MediaPlayer at our Intro Activity. However, we stop the music as soon as the user leaves that Activity. Do we have to use something like Services for this? Or is MediaPlayer/SoundPool enough? If anyone knows the answer, we'd gladly appreciate your sharing it with us. Thanks!

    Read the article

  • SearchView - Choose between two target Activities according to the query result

    - by vitorgreati
    My application has to do the following: - if the user enters a query that matches exactly an object in my database, a Activity that shows this object should appear; - if the query doesn't match an exact object, a ArrayList with related objects will be returned and an Activity will display this list. So, as I'm using a SearchView on my ActionBar, I want to know how to open the right Activity based on the result of the query, something like this: if(objectFound) openActivityThatShowsThisObject(); else openActivityWithRelatedResults(); I saw in other question that I could use a facade Activity, but I don't know if that is a good approach. Any help will be appreciated, thanks!

    Read the article

  • mySQL: Order by field size/length

    - by Sadi
    Here is a table structure (e.g. test): __________________________________________ | Field Name | Data Type | |________________|_________________________| | id | BIGINT (20) | |________________|_________________________| | title | varchar(25) | |________________|_________________________| | description | text | |________________|_________________________| A query like: SELECT * FROM TEST ORDER BY description; But I would like to order by the field size/length of the field description. The field type will be TEXT or BLOB.

    Read the article

  • Can I control Caption sequence numbering from styles other than "Heading "?

    - by Carl Witthoft
    Similar question to Wrong caption using 'Appendix' header style , so the answer may well be "I can't." I created a style called "Appendix" which is based on "Heading 1" , is at "level 1" , and is numbered A,B,C... . I use the standard "Insert Caption" to get Figure or Table captions. I then modded the first field code to be STYLEREF "Appendix" \s and that properly displays the Appendix letter sequence. However, the second field code, SEQ \s 1 refers to the last "Heading 1" . I've tried things like SEQ \s "Appendix" to no avail. Is there any way around this? Should I generate a new "Appendix caption"-ish style which is a "numbered list" and manually set the 'restart at 1' counting in each Appendix?

    Read the article

  • App crashes on back button / Activities & Intents

    - by paradroid666
    I have an android application which starts a new activity Intent startAuthorization = new Intent(AndroidActivity, AuthorizeUser.class); startActivityForResult(startAuthorization,4711); When that new activity is done (a ok button is clicked) I call setResult(RESULT_OK, returnResult); finish(); Which works fine. In case the user doesn't click the okay button but uses the return button of the phone (this arrow pointing around to the left) the application has a force close. I have set a breakpoint on the first line of my method onActivityResult but the debugger never stops there. I have no idea where the issue comes up - how can I find out? Is there a method I have to overwrite to handle this back button?

    Read the article

  • Calling a network State check from other activities

    - by Laurent
    I realize this question has been answered before but couldn't find an answer that deals with my specific case. I want to create a class called "InternetConnectionChecks" that will handle checking a network state and http timeouts. I'll call the methods twice in the app (once at the beginning to get data from a server, and once at the end to send user orders to the server). For good form I'd like to put all these methods in a single class rather than copy/paste at different points in my code. To check the network state, I'm using ConnectivityManager; thing is, getSystemService requires a class that extends Activity. package arbuckle.app; import android.app.Activity; import android.app.Service; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class InternetConnectionChecks extends Activity { public boolean isNetworkAvailable(){ ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); if ((activeNetworkInfo != null)&&(activeNetworkInfo.isConnected())){ return true; }else{ return false; } } } QUESTION: if I call the method isNetworkAvailable from another activity, am I: - going to hit up serious errors. - violating good coding form? *If this isn't the right way to do things, can you point me in the right direction to set up a separate class I can call on to check internet connection? Thanks everyone!

    Read the article

  • Navigating between activities and tasks

    - by Alex Orlov
    The situation: I have an activity "A" that is a delegator activity, in simple words, it's only purpose is to call activity "B" (via startActivityForResult()) depending on data it receives. Activity "B" has launchMode set to "singleTask", so it always runs in a single task. When activity "A" gets started from another task (for example as a share from gallery) it immediately returns ACTION_CANCELLED for activity "B", finishes, and task of activity "B" comes to front (which is an expected behavior). So, what happens, is that we jump from our Gallery app task, to my activity "B" task. Everything is fine until user presses back. Since we are already in a different task, the back button doesn't lead us back to gallery. It navigates in the stack of activity "B" task. The question: is there any way to navigate from one task, to previously shown task (navigate from activity "B" to gallery)? Or maybe there is a way to take currently running activity "B" and move it to another task?

    Read the article

  • How to create a generic Android XML layout for all activities

    - by zabawaba
    I have an application that needs the same items [5 buttons acting as tabs] in every screen. Is it possible to create a "base XML layout" that has these 5 buttons and then have all the other XML files extend from the bas layout in some way so that I don't have to have multiple buttons that will ultimately have the same functionality. Is there a better approach to this problem that can be supported by API 9

    Read the article

  • Start all tab's activities for pre-cache

    - by Pentium10
    I have a TabActivity with three tabs defined. The first tab is light-weight and renders in acceptable time. But the 2nd and 3rd tab, does need a couple of seconds to get visually rendered, after I click them. I would like to launch them, after I've loaded my first tab, in background for pre-cache. Once they are loaded, I can switch quickly between them. So I am wondering how can I launch the 2nd and 3rd tab. They are intents loaded in the view area.

    Read the article

  • repair broken packages-"dpkg: error: conflicting actions -f (--field) and -r (--remove)"

    - by yinon
    Ubuntu 12.04 LTS. if more information will be needed, tell me and'll give. the main problem is: tzach@tzach-pc:~$ sudo apt-get install docky [sudo] password for tzach: Reading package lists... Done Building dependency tree Reading state information... Done docky is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not going to be installed or java6-runtime-headless openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). tzach@tzach-pc:~$ and also: tzach@tzach-pc:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. **The following packages have unmet dependencies: ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not installed or java6-runtime-headless openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not installed E: Unmet dependencies. Try using ******* so we tryied the guide here in messege #9: http://ubuntuforums.org/showthread.php?t=947124 we run all the first 4 commands and the last one-"sudo apt-get autoremove" gave us: tzach@tzach-pc:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: **ca-certificates-java** : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not installed or java6-runtime-headless **openjdk-7-jre-lib** : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not installed E: Unmet dependencies. Try using -f. so we run the last command twice: sudo dpkg --remove -force --force-remove-reinstreq ca-certificates-java and sudo dpkg --remove -force --force-remove-reinstreq openjdk-7-jre-lib but both of them gives: tzach@tzach-pc:~$ sudo dpkg --remove -force --force-remove-reinstreq ca-certificates-java [sudo] password for tzach: dpkg: error: conflicting actions -f (--field) and -r (--remove) Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Options marked [*] produce a lot of output - pipe it through `less' or `more' ! EDIT FOR green7-output of "sudo apt-get -f install": tzach@tzach-pc:~$ sudo apt-get -f install [sudo] password for tzach: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: icedtea-7-jre-cacao icedtea-7-jre-jamvm java-common openjdk-7-jre-headless tzdata-java Suggested packages: default-jre equivs sun-java6-fonts ttf-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts The following packages will be REMOVED: ttf-mscorefonts-installer The following NEW packages will be installed: icedtea-7-jre-cacao icedtea-7-jre-jamvm java-common openjdk-7-jre-headless tzdata-java 0 upgraded, 5 newly installed, 1 to remove and 355 not upgraded. 5 not fully installed or removed. Need to get 0 B/29.6 MB of archives. After this operation, 88.5 MB of additional disk space will be used. Do you want to continue [Y/n]? y debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: warning: there's no installed package matching ttf-mscorefonts-installer:amd64 Setting up tzdata (2012e-0ubuntu0.12.04) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing tzdata (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: tzdata E: Sub-process /usr/bin/dpkg returned an error code (1) EDIT2 FOR green7: tzach@tzach-pc:~$ sudo apt-get remove --purge tzdata [sudo] password for tzach: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not going to be installed or java6-runtime-headless libc6 : Depends: tzdata but it is not going to be installed libc6:i386 : Depends: tzdata:i386 libical0 : Depends: tzdata but it is not going to be installed openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not going to be installed python-dateutil : Depends: tzdata but it is not going to be installed ubuntu-minimal : Depends: tzdata but it is not going to be installed util-linux : Depends: tzdata (>= 2006c-2) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). EDIT3 FOR green7: tzach@tzach-pc:~$ sudo apt-get install openjdk-7-jre-headless [sudo] password for tzach: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: openjdk-7-jre-headless : Depends: tzdata-java but it is not going to be installed Depends: java-common (>= 0.28) but it is not going to be installed Recommends: icedtea-7-jre-cacao (= 7~u3-2.1.1~pre1-1ubuntu3) but it is not going to be installed Recommends: icedtea-7-jre-jamvm (= 7~u3-2.1.1~pre1-1ubuntu3) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). some things in the text also supposed to be bolded. but not critic (: Thanks for the editing! Thanks a lot for your assistance.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >