분류 전체보기
- [iOS][MacOS] class-dump로 Application 뜯어 보자. 2010.12.09
- [Java] java.util.Calendar 사용해서, 원하는 Date 값 얻기. 2010.12.08
- [iOS] UITextField 에서 Money Format 자동완성하게 하기 2010.12.07
- [Android] File I/O 2010.12.06
- [Android] JUnit에서 Context 사용하기 2010.12.05
- [Android] Activity 의 시작과 종료. 2010.12.05
- [Android] strings.xml 에 정의된 string을 Java소스에서 사용하기. 2010.12.04
- [Android] EditText에서 숫자만 입력받기 2010.12.04
- [iOS] MGTwitterEngine 사용하기 2010.12.01 1
- [iOS] OCUnit에서 UIImage imageNamed: 사용하기. 2010.11.30
[iOS][MacOS] class-dump로 Application 뜯어 보자.
[Java] java.util.Calendar 사용해서, 원하는 Date 값 얻기.
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());
[iOS] UITextField 에서 Money Format 자동완성하게 하기
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;
}
[Android] File I/O
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.
|
[Android] JUnit에서 Context 사용하기
[Android] Activity 의 시작과 종료.
public abstract void startActivity (Intent intent)
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.
Parameters
intent | The description of the activity to start. |
---|
Throws
ActivityNotFoundException |
See Also
public void finish ()
Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().
[Android] strings.xml 에 정의된 string을 Java소스에서 사용하기.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World</string>
</resources>
someTextView.setText(getString(R.string.hello));
[Android] EditText에서 숫자만 입력받기
<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());
[iOS] MGTwitterEngine 사용하기
[iOS] OCUnit에서 UIImage imageNamed: 사용하기.
@implementation NSBundle(OCUnit)
+(NSBundle *) mainBundle {
return [NSBundle bundleForClass:[TestClass class]];
}
@end