- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
UIImage *img = [[UIImage imageNamed:@"image.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:10];
[stretchableView setImage:img];
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
UIImage *img = [[UIImage imageNamed:@"image.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:10];
[stretchableView setImage:img];
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR,hour);
cal.set(Calendar.MINUTE,min);
cal.set(Calendar.SECOND,0);
cal.set(Calendar.MILLISECOND, 0);
Date expectedDate = cal.getTime();
cal.setTime(new Date());
UIKIT_EXTERN NSString *const UITextFieldTextDidChangeNotification;
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSString *newText = [textField.text stringByReplacingCharactersInRange:range withString:string];
[textField setText:newText];
return NO;
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSString *newText = [textField.text stringByReplacingCharactersInRange:range withString:string];
[textField setText:[DataFormatter moneyFormat:newText]];
return NO;
}
Open a private file associated with this Context's application package for reading.
|
|
Open a private file associated with this Context's application package for writing.
|
Delete the given private file associated with this Context's application package.
|
Launch a new activity. You will not receive any information about when the activity exits.
Note that if this method is being called from outside of an Activity
Context, then the Intent must include the FLAG_ACTIVITY_NEW_TASK
launch flag. This is because, without being started from an existing Activity, there is no existing task in which to place the new activity and thus it needs to be placed in its own separate task.
This method throws ActivityNotFoundException
if there was no Activity found to run the given Intent.
intent | The description of the activity to start. |
---|
ActivityNotFoundException |
Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World</string>
</resources>
someTextView.setText(getString(R.string.hello));
<EditText android:layout_height="wrap_content"
android:id="@+id/TimeEditText" android:layout_weight="1" android:layout_width="fill_parent"
android:inputType="number"
>
</EditText>
EditText editText = (EditText) mAlertLayout.findViewById(R.id.TimeEditText);
mins = Integer.parseInt("" + editText.getText());