[Android] YUV420 Format

Mobile/Android 2013. 8. 26. 10:24

링크 : http://iamflower.tistory.com/235


'Mobile > Android' 카테고리의 다른 글

[dex] Android Decompile  (0) 2013.05.10
[Json] 안드로이드 Json 처리  (0) 2012.06.15
WebView.addJavascriptInterface 활용  (0) 2010.12.11
[Android] 테트리스  (0) 2010.12.06
posted by 뚱2

[dex] Android Decompile

Mobile/Android 2013. 5. 10. 17:53

링크 : http://blog.naver.com/PostView.nhn?blogId=gigar&logNo=60115566766 

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[Json] 안드로이드 Json 처리  (0) 2012.06.15
WebView.addJavascriptInterface 활용  (0) 2010.12.11
[Android] 테트리스  (0) 2010.12.06
posted by 뚱2

링크 : http://www.vogella.com/articles/AndroidJSON/article.html 

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[dex] Android Decompile  (0) 2013.05.10
WebView.addJavascriptInterface 활용  (0) 2010.12.11
[Android] 테트리스  (0) 2010.12.06
posted by 뚱2
package com.google.android.webviewdemo;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;

/**
 * Demonstrates how to embed a WebView in your activity. Also demonstrates how
 * to have javascript in the WebView call into the activity, and how the activity 
 * can invoke javascript.
 * 
 * In this example, clicking on the android in the WebView will result in a call into
 * the activities code in {@link DemoJavaScriptInterface#clickOnAndroid()}. This code
 * will turn around and invoke javascript using the {@link WebView#loadUrl(String)}
 * method.
 * 
 * Obviously all of this could have been accomplished without calling into the activity
 * and then back into javascript, but this code is intended to show how to set up the 
 * code paths for this sort of communication.
 *
 */
public class WebViewDemo extends Activity {

    private static final String LOG_TAG = "WebViewDemo";

    private WebView mWebView;

    private Handler mHandler = new Handler();

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        mWebView = (WebView) findViewById(R.id.webview);

        WebSettings webSettings = mWebView.getSettings();
        webSettings.setSavePassword(false);
        webSettings.setSaveFormData(false);
        webSettings.setJavaScriptEnabled(true);
        webSettings.setSupportZoom(false);

        mWebView.setWebChromeClient(new MyWebChromeClient());

        mWebView.addJavascriptInterface(new DemoJavaScriptInterface(), "demo");

        mWebView.loadUrl("file:///android_asset/demo.html");
    }

    final class DemoJavaScriptInterface {

        DemoJavaScriptInterface() {
        }

        /**
         * This is not called on the UI thread. Post a runnable to invoke
         * loadUrl on the UI thread.
         */
        public void clickOnAndroid() {
            mHandler.post(new Runnable() {
                public void run() {
                    mWebView.loadUrl("javascript:wave()");
                }
            });

        }
    }

    /**
     * Provides a hook for calling "alert" from javascript. Useful for
     * debugging your javascript.
     */
    final class MyWebChromeClient extends WebChromeClient {
        @Override
        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
            Log.d(LOG_TAG, message);
            result.confirm();
            return true;
        }
    }
}



원본

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[dex] Android Decompile  (0) 2013.05.10
[Json] 안드로이드 Json 처리  (0) 2012.06.15
[Android] 테트리스  (0) 2010.12.06
posted by 뚱2

[Android] 테트리스

Mobile/Android 2010. 12. 6. 21:57


회사 교육으로 한달간 안드로이드 학원을 다니고 나서 
이번 주말에 테스트로 만들어본 테트리스 입니다.
레벨업 안되고 다음판 안되고 그냥 시작 종료만 되는 미완성의 테트리스
내부는 Bitmap과 커스텀뷰를 이용해서 일일이 다 그리고 칠한 노가다의 결과 ^^;

ps. 테트리스 알고리즘은 저도 예전에 봤던 책에서 참고 했습니다.

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[dex] Android Decompile  (0) 2013.05.10
[Json] 안드로이드 Json 처리  (0) 2012.06.15
WebView.addJavascriptInterface 활용  (0) 2010.12.11
posted by 뚱2