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
| //Update state | |
| PostState curState = [self postStateForPostId:postId]; | |
| PostState newState = kPostStateNA; | |
| switch (curState) | |
| { | |
| case kPostStateNA: | |
| newState = kPostStateNA; | |
| break; | |
| case kPostStatePending: | |
| newState = kPostStatePending; |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <alpha xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:interpolator="@android:anim/accelerate_interpolator" | |
| android:fromAlpha="1.0" android:toAlpha="0.0" | |
| android:duration="300" /> |
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
| dependencies { | |
| compile 'com.android.support:appcompat-v7:18.0.0' | |
| compile 'com.android.support:support-v4:18.0.0' | |
| compile fileTree(dir: 'libs', include: '*.jar') | |
| } |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <item type="id" name="action_delete" /> | |
| <item type="id" name="action_intent" /> | |
| <item type="id" name="action_report" /> | |
| <item type="id" name="action_pause" /> | |
| <item type="id" name="action_play" /> | |
| </resources> |
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
| public class NetworkState { | |
| private static NetworkState sInstance = null; | |
| private boolean mConnected = false; | |
| private NetworkStateListener mListener; | |
| private NetworkState() { | |
| } |
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
| <item> | |
| <shape android:shape="rectangle"> | |
| <solid | |
| android:color="#4C000000" /> | |
| <stroke | |
| android:width="2dp" | |
| android:color="#CCCCCC" /> | |
| <corners | |
| android:radius="1dp" /> | |
| <padding |
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
| - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField | |
| { | |
| if (textField == self.firstTextField) { | |
| [self.secondTextField becomeFirstResponder]; | |
| return NO; | |
| } | |
| return YES; | |
| } |
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
| - (void)thanksYousWithSuccess:(LTTHTTPClientSuccess)success | |
| failure:(LTTHTTPClientFailure)failure | |
| { | |
| NSMutableURLRequest *req = [self requestWithMethod:@"GET" path:@"thank_yous" parameters:nil]; | |
| [self jsonRequest:req success:success failure:failure]; | |
| } |
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
| - (void)validateInviteCode:(NSString *)inviteCode | |
| success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success | |
| failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure | |
| { | |
| // Build parameters | |
| NSMutableDictionary *params = [NSMutableDictionary dictionary]; | |
| [params setObject:inviteCode forKey:@"invite_code"]; | |
| // Send request | |
| NSMutableURLRequest *req = [self requestWithMethod:@"POST" path:@"registration/family" parameters:params]; |
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
| - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
| for (UITouch* t in touches) { | |
| CGPoint touchLocation; | |
| touchLocation = [t locationInView:self]; | |
| NSString *theTruth = "Adam's mom is hot."; | |
| CGPoint point; | |
| point= CGPointMake(touchLocation.x, touchLocation.y); |
NewerOlder