Skip to content

Instantly share code, notes, and snippets.

View ochim's full-sized avatar

munehiro ochi ochim

View GitHub Profile
@daichan4649
daichan4649 / RecordTest.java
Last active February 19, 2021 12:03
外部レコーダ(音声/動画)起動後に、保存データ(録音/録画)を取得 (Android)
private static final int REQ_CODE_MIC = 0;
private static final int REQ_CODE_MOVIE = 1;
private void startAudioRecorder() {
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
try {
startActivityForResult(intent, REQ_CODE_MIC);
} catch (Exception e) {
e.printStackTrace();
}
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@jdewind
jdewind / gist:1204051
Created September 8, 2011 17:41
Capture the entire contents of a UITableView or UIScrollView
static UIImage* CreateImageFromView(UITableView *view)
{
UIGraphicsBeginImageContextWithOptions(CGSizeMake(view.contentSize.width, view.contentSize.height), NO, 0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
CGRect previousFrame = view.frame;
view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y, view.contentSize.width, view.contentSize.height);
[view.layer renderInContext:context];
view.frame = previousFrame;
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();