This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(crossM.find()){ | |
String chanl = new String(""); | |
String ms = new String(""); | |
if(message.length()>5) { | |
ArrayList<String> list = new ArrayList<String>(Arrays.asList(message.split(" "))); | |
list.remove(0); // Remove the command .ccha | |
chanl = list.remove(0); | |
for (String s : list) | |
{ | |
ms += s + " "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an example coding gist for use on myLauncher Google Groups to explain how to add an item to myLauncherView from another view | |
/* | |
RootViewController - represents the RootViewController that extends MyLauncherViewController | |
*/ | |
@implementation RootViewController | |
-(void)addLauncherItem { | |
// We'll load our new view to allow a user to choose the item to add | |
MyNewViewController *nvc = [[MyNewViewController alloc] initWithNibName:nil bundle:nil]; // Change as needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an example coding gist for use on myLauncher Google Groups to explain how add an item to myLauncherView | |
// This is just a temporary workaround for new code coming soon | |
/* | |
RootViewController - represents the RootViewController that extends MyLauncherViewController | |
*/ | |
@implementation RootViewController | |
/* | |
Add's an item to myLauncherView (first to the end of the last page, then to another page, then to any space available) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSMutableArray *)pages:(NSMutableArray *)allItems ofSize:(int)itemsPerPage | |
{ | |
NSMutableArray *pages = [[[[NSMutableArray alloc] init]; | |
NSMutableArray *page = [[NSMutableArray alloc] init]; | |
for (int x = 0; x < [allItems count]; x++) { | |
[page addObject:[allItems objectAtIndex:x]]; | |
int y = x + 1; | |
if (y - (floor(y / itemsPerPage) * itemsPerPage) == 0) { | |
[pages addObject:page]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an example coding gist for use on myLauncher Google Groups to explain how to move the close icon used to close a launched item in code | |
/* | |
ItemViewController - represents the View Controller of the item that is launched when the icon is tapped | |
We modify the navigation item on ViewLoad to move the barButtonItem to the right | |
We then pass this the barButtonItem on | |
*/ | |
@implementation ItemViewController | |
-(void)viewDidLoad { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an example coding gist for use on myLauncher Google Groups to explain how to close a launched item in code | |
// This gist contains three classes (interface and/or implementation) in one file, and should be separated before use | |
/* | |
MyLauncherViewController - this needs to be edited to allow for launcherViewItemSelected: and closeView to be called outside the usual way | |
This will be available in the next version, so feel free to make the changes and you can update with the knowledge it won't break anything | |
*/ | |
@interface MyLauncherViewController : UIViewController <MyLauncherViewDelegate, UINavigationControllerDelegate> { | |
} |