Hi,
Ive got two activities in the same application.
the first one is with gui(main activity)
the second one is a listener which works infinite without gui.
Wierd problem occurs:
i am running the second activity with a diffrent thread so i could keep on
manipulate the gui..
but for some reason, the gui losing it's focus for some reason, only when i press 'home' and come back to it, then i can continune maniuplate the gui.
it feels like after i launch the second activity, the gui activity(the main) is losing the focus.
how come?
in my mainactivity i have:
setContentView(R.layout.main);
and its setted as the launcher in the manifest.
thanks,
ray.
I have a table view in which if each cell is touched video plays. Each cell have image of the video cell.imageView.image. And on the image I have a button (UIButton) with play symbol.
If I touch the play button the corresponding video should be played same like the when cell is touched.
I have a selector for the play button. How can I relate the corresponding cell to the play button.
Thank You.
I've been looking at the Stanford University iphone videos on iTunes U. And saw the teacher trying to do something similar to this code but he realised and said it didn't work though I didn't get why:
- (IBAction)flashPressed{
if (window.backgroundColor == [UIColor magentaColor]){
window.backgroundColor = [UIColor redColor];
}else {
window.backgroundColor = [UIColor magentaColor];
}
}
Objective-C, windows based application. Not sure what else you need to know.
I want to resize my table view cells from inside the cell instead of from the UITableViewDelegate. I am resizing them based on asynchronous content, so I can't size them in the delegate.
I tried setting self.frame inside the cell, but the table view was really unhappy about that. Cells were overlapping and all kinds of craziness was going on.
hi any one know iphone uislider with two thumbsindicators, i have tried to manipulate it, any one have idea means please guide me. Am new to iphone development please help me.
thanks in advance
I have UITableView. I customized the cell height (increased).
I have 4 labels(UILabel) and 1 image(UIImage) and 3 buttons (UIButton). one of the button is delete button. By touching the cell or button(play button) on the image a video is loaded and played.
I need to delete the cell by touching delete button. If I touched the delete button the corresponding video is deleted from library . But, how to delete the cell and all remaining data in it ? I am not able to delete the cells or the data in the cells.
How to do it ?
Thank you.
Hi,
I have this code:
CGPoint arrowMiddle = CGPointMake((arrowOne.x + arrowTo.x)/2, (arrowOne.y + arrowTo.y)/2);
CGPoint arrowLeft = CGPointMake(arrowMiddle.x-40, arrowMiddle.y);
CGPoint arrowRight = CGPointMake(arrowMiddle.x, arrowMiddle.y + 40);
[arrowPath addLineToScreenPoint:arrowLeft];
[arrowPath addLineToScreenPoint:arrowMiddle];
[arrowPath addLineToScreenPoint:arrowRight];
[[mapContents overlay] addSublayer:arrowPath];
[arrowPath release];
with this output:
http://yfrog.com/edschermafbeelding2010032p
What have i to add to get the left and right the at same degree of the line + 30°.
If someone has the algorithm of drawing an arrow on a line, pleas give it. It doesn't matter what programming language it is...
Thanks
I'm looking to choose a namespace for a library I'm writing and I'd like to avoid conflicts with other namespaces.
Does anyone know of a website that lists all of the class prefixes in use?
Simply, I have placed an image with the Interface Builder in a UIView. Now I want to run a method/function when I am touching that image, for example when another image should be loaded.
My Code:
- (void)touchesended:(NSSet*) touches withEvent:(UIEvent *)event {
// UITouch *touch = [touch anyObject];
bild_1_1.image = [UIImage imageNamed:@"t_1_4.jpg"];
//}
}
I'm amazed at Transmission, a BT client. It has a Mac, a GTK+, a QT, a Web Client and a CLI interface to it.
I tried reading some of it's source to understand how he creates all these interfaces, but no luck.
Does the developer creates them using a single ide? Or does he create the interface logic in each specific environment (specially mac), "exports" this window code and integrates with the main logic?
How did the developers create this software with so many interfaces?
I have a UIToolBar *toolbar1. I have 3 buttons on the toolbar. And the tool bar is at the bottom of the view.
The buttons are like library button, moreApps button, recordVideo button. If I touch the library button a new view(a UITableViewController) appears. I used presentModelViewController for it. If I touch moreApps button a new view (a UIViewController) appears and it loaded from http//. The recordButton touch gives another UIViewController view.
When the moreApps button is touched and the view is loaded, it have the content from web and a UIToolBar *toolbar2 at the bottom the view. It has a refresh button and done button.
The problem is when I touch the toolbar2 (not on the refresh button and done button) the previous views button are activated and corresponding views of previous buttons(library button, playVideo button) are loaded. I am not able to understand about this problem.
Thank you.
My colleagues have a heated debate on what is the future of web development. One side is supporting HTML5 and the other is supporting Silverlight. There is no conclusion of the debate yet.
In my humble opinion as a programmer, HTML5 will not improve programming productivity, while Silverlight will. In my understanding, programmers still need to program in JavaScript to take advantage of HTML5. For Silverlight, we can use C# which is static-type language. A lot of coding defects can be found in compilation time.
For HTML5, different browsers might still have different behavior even though there is spec. For Silverlight, generally what works in IE will work the same way in other browsers.
Just my thoughts. Any idea on how to choose future direction of web development?
I want to add an image using the cell.imageView setImage: method. However, depending on field from an array (in the form of an NSString and called using [dog types]) I need the image to change to an image which reflects the type of dog.
How do I go about doing this? Thanks.
Hello,
In my app I move the table view (in order to make the text fields visible when the keyboard appears). The view is looks following:
This is the code I use for resizing the view and moving it up:
static const NSUInteger navBarHeight = 44;
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
tableView.frame = CGRectMake(0, navBarHeight, appFrame.size.width, appFrame.size.height-navBarHeight-216); //216 for the keyboard
NSIndexPath *indPath = [self getIndexPathForTextField:textField]; //get the field the view should scroll to
[tableView scrollToRowAtIndexPath:indPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
The problem is that when the view is moved up it also moves 3 pixels into right direction (it is hard to see the difference in the screenshot, but it is visible when the animation is on and I measured the difference with PixelStick tool). Here it is how it looks after the move:
My analysis shows that scrolling the table does not influence the move to the right.
Any ideas what is wrong in the code above that makes the view move to the right?
I am looking for ideas as to how all of you can think to solve this issue. I am going to be using an Android Tablet as basically a touch screen input for a project. I need to be able to control servos and solenoids and such, so I will be using a Raspberry Pi to do this. I am looking for ideas on how to get the tablet and the Raspberry Pi to talk. Here are a few that I have though of so far.
Use Wifi (which I really do not want to, Ethernet would be okay) to ssh into the Raspberry Pi (with an external library) and run scripts that way from the Android app.
Use a com port for Android (maybe Andropod if there hardware becomes available?) and run scripts on the Raspberry Pi.
Those are probably two of the "best" ideas that I can think of for now.
Can anyone think of any other "better" ideas?
Thanks in advance for the help,
Dan
Hi,
I'm a new user to this interesting forum!
I want start developing an application for android and before starting i want learn about some android features...
The first android feature is how to correlate finger motion on the screen with java...
Are there any source code examples that show how to draw with your finger on an android screen?
Can you suggest a good place for me to download an example?
thanks
I've read this post about mocking location with custom provider, but I am looking for a way to mock the location during a presentation, is that possible?
I have a Class that I need to copy with the ability to make changes the value of a variable on both Classes. Simply put the classes need to remain clones of each other at all times. My understanding of the documentation is that I can do this using a shallow copy of the Class which has also been declared mutable. By shallow copying the pointer value for the variable will be cloned so that it is an exact match in both classes. So when I update the variable in the original the copy will be updated simultaneously. Is this right?
As you can see below I have used mutableCopyWithZone in the class I want to copy. I have tried both NSCopyObject and allocWithZone methods to get this to work. Although I'm able to copy the class and it appears as intended, when updating the variable it is not changing value in the copied Class.
- (id)mutableCopyWithZone:(NSZone *)zone {
//ReviewViewer *copy = NSCopyObject(self, 0, zone);
ReviewViewer *copy = [[[self class] allocWithZone:zone] init];
copy->infoTextViews = [infoTextViews copy];
return copy;
}
infoTextViews is a property declared as nonatomic, retain in the header file of the class being copied. I have also implemented the NSMutableCopying protocol accordingly.
Any help would be great.
how does one use code to do this:
produce 15 random numbers that are not in any order, and that only occur once
eg.
1 4, 2, 5, 3, 6, 8, 7, 9, 10, 13, 12, 15, 14, 11
rand() or arc4rand() can repeat some, which is not what im after.
Thanks