Search Results

Search found 3983 results on 160 pages for 'activity'.

Page 5/160 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • iPhone xcode - Activity Indicator with tab bar controller and multi table view controllers

    - by Frames84
    I've looked for a tutorial and can't seem to find one for a activity indicator in a table view nav bar. in my mainWindow.xib I have a Tab Bar Controller with 4 Tabs controllers each containing a table view. each load JSON feeds using the framework hosted at Google. In one of my View Controller I can add an activity indicator to the nav bar by using: UIActivityIndicatorView *activityIndcator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0,0,20,20)]; [activityIndcator startAnimating]; UIBarButtonItem *activityItem = [[UIBarButtonItem alloc] initWithCustomView:activityIndcator]; self.navigationItem.rightBarButtonItem = activityItem; however and can turn it off by using: self.navigationItem.rightBarButtonItem.enabled = FALSE; But if i place this in my viewDidLoad event it shows all the time. I only want it to show when I select a row in my table view. so I added it at the top of didSelectRowAtIndexPath and the stop line after I load a feed. it shows but takes a second or two and only shows for about half a second. is the an event that firers before the didSelectRowAtIndexPath event a type of loading event? if not what is the standard menthord for implementing such functionality?

    Read the article

  • Associate activity with database ID

    - by Mohit Deshpande
    I have a main ListView that is based on an adapter from my database. Each database id is "assigned" to an Activity via the ListView. And in my AndroidManifest, each activity has an intent filter with a custom action. Now with this, I have had to create this class: public final class ActivityLauncher { private ActivityLauncher() { } public static void launch(Context c, int id) { switch(id) { case 1: Intent intent = new Intent(); intent.setAction(SomeActivity.ACTION_SOMEACTIVITY); c.startActivity(intent); break; case 2: ... break; ... } } private static void st(Context context, String action) { Intent intent = new Intent(); intent.setAction(action); context.startActivity(intent); } } So I have to manually create a new case for the switch statement. This would get troublesome if I have to rearrange or delete an id. Is there any way to get around this?

    Read the article

  • Structuring database for multi-object "activity" and "following" functionalities

    - by romaninsh
    I am working on a web application which operate with different types of objects such as user, profiles, pages etc. All objects have unique object_id. When objects interact it may produce "activity", such as user posting on the page or profile. Activity may be related to multiple objects through their object_id. Users may also follow "objects" and they need to be able to see stream of relevant activity. Could you provide me with some data structure suggestions which would be efficient and scalable? My goal is to show activity limited to the objects which user is following I am not limited by relational databases. Update As I'm getting advices on ORM and how index things, I'd like to again, stress my question. According to my current design model the database structure looks like this: As you can see - it's quite easy to implement database like that. Activity and Follower tables do contain much larger amount of records than the upper level but it's tolerable. But when it comes for me to create a "timeline" table, it becomes a nightmare. For every user I need to reference all the object activities which he follows. In terms of records it easily gets out of control. Please suggest me how to change this structure to avoid timeline creation and also be abel to quickly retrieve activity for any given user. Thanks.

    Read the article

  • Activity in Android

    - by leduchuy89vn
    Normally, a Java p'rogram starts from an object, then that object will create some GUI objects (window) and call the "Show" method So, is there any way to do the same thing in Android, since, by default in Android, a program runs from an object created by a class which extended from Activity class?

    Read the article

  • Force Tab Activity creation?

    - by Daniel
    I have a TabHost and several tabs added to it. Problem: The activities on these tabs are not created until the tab is pressed. My tabhost is broadcasting intents but my broadcast receivers are not registered until onCreate in my tab activities is called. Is there any way to force activity creation? Maybe my tabhost can call setCurrentTab and switch back to main tab(0), but is that really the best option available?

    Read the article

  • capturing another activity's screen in android

    - by discoHR
    is it possible to have a service (A) which will launch an activity (B) and then periodically capture B's screen? also, is it possible to send onTouch events from A to B? basically, i'd like to make a bot which would use an application so i don't have to. i guess it's not possible but had to ask.

    Read the article

  • [JAVA] Activity Stream- Producing X amount of objects in a panel on app load

    - by Matthew De'Loughry
    Hi guys, Just wondering if you could help wanting to produce an activity stream in Java, the idea was to have a JLabel and text area followed by a divider be displayed on a screen and then repeated X amount of times according to what data was in a database. What I was wondering is how could I possibly repeat the placing the jlabel, text area, and diveder on the screen above the last rendered objects on the fly and all displayed correctly no matter the size of the text area of each set of object sort of like the image below. Hope I made it clear as I could thanks

    Read the article

  • Android TabHost: update tabs from tab's activity

    - by joshuadlillie
    I have a TabActivity and am going to have 3 or 4 tabs. In TabA, I would like to have an ExpandableListView, which will list products. I would like TabC to act as a sort of "shopping cart", probably with a ListView of itself. So, my question is: is there a way to interact with the TabHost from the Activity? I would like to be able to click a button inside of TabA and have it update and switch to TabC. Is this possible? Can I get the Tab's activities call it's parents methods?

    Read the article

  • Make Android Activity looks like dialog

    - by Matroska
    Hi, I am trying to open a dialog on widget click. I have solved the problem skinning the activity started on click with android:theme="@android:style/Theme.Dialog". Unfortunately I cannot reach the same look of a dialog. This is the outcome: http://i50.tinypic.com/n15lcy.png while I would like to reach this result (except for the button, of course): h ttp://i48.tinypic.com/2ithqpc.png (the widget dialog you can see keeping the screen pushed) As you can see there are some differences: the color of the list items, the color of the text and the list item separator. Is there a predefined theme/style to obtain the same look of a standard dialog? If not, what are the steps to follow to reach that result? I have seen that the widget provided by FoxyRing has the behaviour I would like to have. Thanks

    Read the article

  • Activity restart on rotation Android

    - by Isaac Waller
    In my Android application, when I rotate the device (slide out the keyboard) then my activity is restarted (onCreate is called). Now, this is probably how it's supposed to be, but I do a lot of initial setting up in the onCreate method, so I need either: 1. Put all the initial setting up in another function so it's not all lost on device rotation or 2. Make it so onCreate is not called again and the layout just adjusts or 3. Limit the app to just portrait so that onCreate is not called.

    Read the article

  • Error when starting an activity

    - by Adam
    I'm starting an activity when a button is pressed, and normally (in other apps) haven't had an issue. But when I press the button in this app, I get an "unable to marshal value" error. Exact(ish) error from LogCat: 03-22 02:49:02.883: WARN/System.err(252): java.lang.RuntimeException: Parcel: unable to marshal value {CLASSNAME}@44dcf1b8 I feel that this might be related to the extra that I'm passing to the intent. I'm passing an ArrayList as a serializable to this new intent. My concern is that the data structure that the ArrayList contains isn't being serialized (as it's a personal data structure). Is the array list content data structure causing this? Something else that I'm missing?

    Read the article

  • Return back to the parent activity from subactivity

    - by ZelluX
    My application supports twitter and needs to open browser for OAuth. When the user clicks the Share on Twitter button, the main activity will create another subactivity (TwitterActivity) to handle twitter authentication issues. Here is a flow graph showing how activities are invoked currently. Main is short for MainActivity and Twit for TwitterActivity. startActivity() OAuth intent OAuth callback finish() Main ---------------> Twit ------------> Browser --------------> Twit --------> Browser As you may notice, after the TwitterActivity calls finish() to stop, it will now return back to MainActivity, but Browser instead. How can I make it return back to MainActivity? Many thanks

    Read the article

  • Windows Workflows - While Activity for creating multiple tasks not working

    - by Georgil Mathew
    I am using a while activity for creating multiple tasks for a workflow. The code is executed fine and the task is created when the loop runs only once. But when the loop runs twice or more, only one task is getting created. Also the WF status shows as Error Occured. All I want to do here is create multiple tasks (no of tasks depends on an entered column value) for the same user. Is it posible to use 'while' in this scenario? Or is there any other way to go ahead? NB: I am using state machine workflow.

    Read the article

  • calling a service from an activity

    - by newbie
    Hi,I have been stuck on this issue for quite some time now.Have read the documentation and many tutorials and they just confuse me more.I hope someone will provide me a straightforward answer.It's really important.Thank you.. Ok ..so i want an activity to get some input from the user as and then send that string to a service.Then i want my service to run in a way so that i can use other applications while this one keeps running in the background.Also i don't want the service to keep running every second.What i want is for the service to get updated location of my current position every 10 minutes so i was thinkin if there could be a way to make my service to go to sleep n wake up evry 10 mins n check for updates.I don't want to show the update on the UI so i dont think i need to use an AIDL approach and also dont need to bind to the service.I js simply want to start the service as soon as the user enters the string and keep the service runing every 10 mins.I think it is really simple but m very confused.Please help.

    Read the article

  • Call other activities in an activity?

    - by Mohit Deshpande
    Say I have 2 activities (ActivityOne and ActivityTwo). How would I call ActivityTwo from ActivityOne? Then how would I return to ActivityOne from ActivityTwo? For example, I have a listview with all the contacts on the host phone. When I tap on a contact, another activity shows information and allows editing of that contact. Then I could hit the back button, and I would go back to the exact state that ActivityOne was in before I called ActivityTwo. I was thinking an Intent object, but I am not sure. Could someone post some code?

    Read the article

  • TFS 2010 Build Custom Activity for Merging Assemblies

    - by Jakob Ehn
    *** The sample build process template discussed in this post is available for download from here: http://cid-ee034c9f620cd58d.office.live.com/self.aspx/BlogSamples/ILMerge.xaml ***   In my previous post I talked about library builds that we use to build and replicate dependencies between applications in TFS. This is typically used for common libraries and tools that several other application need to reference. When the libraries grow in size over time, so does the number of assemblies. So all solutions that uses the common library must reference all the necessary assemblies that they need, and if we for example do a refactoring and extract some code into a new assembly, all the clients must update their references to reflect these changes, otherwise it won’t compile. To improve on this, we use a tool from Microsoft Research called ILMerge (Download from here). It can be used to merge several assemblies into one assembly that contains all types. If you haven’t used this tool before, you should check it out. Previously I have implemented this in builds using a simple batch file that contains the full command, something like this: "%ProgramFiles(x86)%\microsoft\ilmerge\ilmerge.exe" /target:library /attr:ClassLibrary1.bl.dll /out:MyNewLibrary.dll ClassLibrary1.dll ClassLibrar2.dll ClassLibrary3.dll This merges 3 assemblies (ClassLibrary1, 2 and 3) into a new assembly called MyNewLibrary.dll. It will copy the attributes (file version, product version etc..) from ClassLibrary1.dll, using the /attr switch. For more info on ILMerge command line tool, see the above link. This approach works, but requires a little bit too much knowledge for the developers creating builds, therefor I have implemented a custom activity that wraps the use of ILMerge. This makes it much simpler to setup a new build definition and have the build automatically do the merging. The usage of the activity is then implemented as part of the Library Build process template mentioned in the previous post. For this article I have just created a simple build process template that only performs the ILMerge operation.   Below is the code for the custom activity. To make it compile, you need to reference the ILMerge.exe assembly. /// <summary> /// Activity for merging a list of assembies into one, using ILMerge /// </summary> public sealed class ILMergeActivity : BaseCodeActivity { /// <summary> /// A list of file paths to the assemblies that should be merged /// </summary> [RequiredArgument] public InArgument<IEnumerable<string>> InputAssemblies { get; set; } /// <summary> /// Full path to the generated assembly /// </summary> [RequiredArgument] public InArgument<string> OutputFile { get; set; } /// <summary> /// Which input assembly that the attibutes for the generated assembly should be copied from. /// Optional. If not specified, the first input assembly will be used /// </summary> public InArgument<string> AttributeFile { get; set; } /// <summary> /// Kind of assembly to generate, dll or exe /// </summary> public InArgument<TargetKindEnum> TargetKind { get; set; } // If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { string message = InputAssemblies.Get(context).Aggregate("", (current, assembly) => current + (assembly + " ")); TrackMessage(context, "Merging " + message + " into " + OutputFile.Get(context)); ILMerge m = new ILMerge(); m.SetInputAssemblies(InputAssemblies.Get(context).ToArray()); m.TargetKind = TargetKind.Get(context) == TargetKindEnum.Dll ? ILMerge.Kind.Dll : ILMerge.Kind.Exe; m.OutputFile = OutputFile.Get(context); m.AttributeFile = !String.IsNullOrEmpty(AttributeFile.Get(context)) ? AttributeFile.Get(context) : InputAssemblies.Get(context).First(); m.SetTargetPlatform(RuntimeEnvironment.GetSystemVersion().Substring(0,2), RuntimeEnvironment.GetRuntimeDirectory()); m.Merge(); TrackMessage(context, "Generated " + m.OutputFile); } } [Browsable(true)] public enum TargetKindEnum { Dll, Exe } NB: The activity inherits from a BaseCodeActivity class which is an internal helper class which contains some methods and properties useful for moste custom activities. In this case, it uses the TrackeMessage method for writing to the build log. You either need to remove the TrackMessage method calls, or implement this yourself (which is not very hard… ) The custom activity has the following input arguments: InputAssemblies A list with the (full) paths to the assemblies to merge OutputFile The name of the resulting merged assembly AttributeFile Which assembly to use as the template for the attribute of the merged assembly. This argument is optional and if left blank, the first assembly in the input list is used TargetKind Decides what type of assembly to create, can be either a dll or an exe Of course, there are more switches to the ILMerge.exe, and these can be exposed as input arguments as well if you need it. To show how the custom activity can be used, I have attached a build process template (see link at the top of this post) that merges the output of the projects being built (CommonLibrary.dll and CommonLibrary2.dll) into a merged assembly (NewLibrary.dll). The build process template has the following custom process parameters:   The Assemblies To Merge argument is passed into a FindMatchingFiles activity to located all assemblies that are located in the BinariesDirectory folder after the compilation has been performed by Team Build. Here is the complete sequence of activities that performs the merge operation. It is located at the end of the Try, Compile, Test and Associate… sequence: It splits the AssembliesToMerge parameter and appends the full path (using the BinariesDirectory variable) and then enumerates the matching files using the FindMatchingFiles activity. When running the build, you can see that it merges two assemblies into a new one:     And the merged assembly (and associated pdb file) is copied to the drop location together with the rest of the assemblies:

    Read the article

  • How to have Android Service communicate with Activity

    - by Scott Saunders
    I'm writing my first Android application and trying to get my head around communication between services and activities. I have a Service that will run in the background and do some gps and time based logging. I will have an Activity that will be used to start and stop the Service. So first, I need to be able to figure out if the Service is running when the Activity is started. There are some other questions here about that, so I think I can figure that out (but feel free to offer advice). My real problem: if the Activity is running and the Service is started, I need a way for the Service to send messages to the Activity. Simple Strings and integers at this point - status messages mostly. The messages will not happen regularly, so I don't think polling the service is a good way to go if there is another way. I only want this communication when the Activity has been started by the user - I don't want to start the Activity from the Service. In other words, if you start the Activity and the Service is running, you will see some status messages in the Activity UI when something interesting happens. If you don't start the Activity, you will not see these messages (they're not that interesting). It seems like I should be able to determine if the Service is running, and if so, add the Activity as a listener. Then remove the Activity as a listener when the Activity pauses or stops. Is that actually possible? The only way I can figure out to do it is to have the Activity implement Parcelable and build an AIDL file so I can pass it through the Service's remote interface. That seems like overkill though, and I have no idea how the Activity should implement writeToParcel() / readFromParcel(). Is there an easier or better way? Thanks for any help.

    Read the article

  • Android Activity is displayed after user unlocks the screen

    - by Dave
    Hi, I was wondering if anyone understood how to make your application be displayed when you unlock the screen. I have an application where the user turns on a Bluetooth device, it connects to the phone, and the user should be presented with a UI. Having them hunt for the app or using the notification menu is not a workable option (too much work and not the obvious behavior). The problem is that: When the screen is unlocked: - you can popup the activity from the background service when Bluetooth connects to a device - User is happy because the UI is right there When the screen is locked: - The application gets started but is destroyed - User unlocks the phone and nothing is there but the homescreen One work around would be to disable the keyguard when the application gets woken up but the nuclear option is a pretty bad option. PS: I know the standard Android assumption is that you shouldn't do this. In the normal case this behavior is fine, but in this case I explicitly did something I want the phone to respond without adding more work for the user to do. As per Google's guidelines if you don't like this behavior there can be an option for you to turn this off or you can not use the application.

    Read the article

  • Android - Looping Activity to Repeat MediaPlayer

    - by Austin Anderson
    I'm trying to create a soundboard for longer audio files and can't figure out how to stop an audio file and start it again without closing the activity. Let's say each audio file is one minute long. If I play the first audio file for 20 seconds and start the next audio file, the first stops playing and the second starts playing. However, if I click the first audio file again, the second stops playing and the first does not. I need help. This is driving me insane. bAudio1 = (ImageButton) findViewById(R.id.bAudio1); bAudio2 = (ImageButton) findViewById(R.id.bAudio2); mpAudio1 = MediaPlayer.create(this, R.raw.audio1); mpAudio2 = MediaPlayer.create(this, R.raw.audio2); bAudio1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } else { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } mpAudio1.start(); } } }); bAudio2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } else { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } mpAudio2.start(); } } }); Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >