目前日期文章:201205 (96)

瀏覽方式: 標題列表 簡短摘要

未命名  

範例下載

 

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

未命名  

範例下載

 

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

%EC%A0%9C%EB%AA%A9_%EC%97%86%EC%9D%8C  

package
{

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

002  

anytest.mxml
<?xml version="1.0" encoding="utf-8"?>

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

002  

anytest.mxml
<?xml version="1.0" encoding="utf-8"?>

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

SC20110918-184723  

anytest.mxml
<?xml version="1.0" encoding="utf-8"?>

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

%EC%A0%9C%EB%AA%A9_%EC%97%86%EC%9D%8C  

http://www.adobe.com/devnet-apps/flex/tourdeflex/web/


shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

%EC%A0%9C%EB%AA%A9_%EC%97%86%EC%9D%8C  

http://code.google.com/intl/ko/apis/maps/documentation/flash/

1.

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

device-2011-07-12-005540device-2011-07-12-005604  

package com.spintest;
 
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
 
public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        /* * Full Screen */
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
        setContentView(new GameView(this));
    }
 
    class GameView extends View {
     int Screen_Width, Screen_Height;
     int Current_X, Current_Y;
     int Player_Width, Player_Height;
     Bitmap Arrow[] = new Bitmap[1];
     int Touch_X, Touch_Y;
     int Angle;
     Bitmap RotatedBmp;
     /* * Matrix */
     Matrix Rot = new Matrix();
     Matrix Scale = new Matrix();
     Matrix Trans = new Matrix();
 
 
     public GameView(Context context) {
      super(context);
 
      Display display = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
      Screen_Width = display.getWidth();
      Screen_Height = display.getHeight();
      Current_X = Screen_Width/2;
      Current_Y = Screen_Height/2;
 
      Arrow[0] = BitmapFactory.decodeResource(getResources(), R.drawable.a0);
      Player_Width = Arrow[0].getWidth()/2;
      Player_Height = Arrow[0].getWidth()/2;
 
      mHandler.sendEmptyMessageDelayed(0, 10);
     }//GameView
 
     public void onDraw(Canvas canvas) {
      /* * Matrix Setting */
      Scale.setScale(1, 1);
      Rot.setRotate(Angle, Player_Width, Player_Height);
      Trans.setTranslate(Current_X, Current_Y);
      Trans.setConcat(Trans, Rot);
      Rot.setConcat(Rot, Scale);
 
      /* * Print Angle String */
      Paint p = new Paint();
      p.setTextSize(20);
      p.setColor(Color.WHITE);
      canvas.drawText("Angle"+Angle, 0, 20, p);
 
      /* * Draw */
      canvas.drawBitmap(Arrow[0], Trans, null);
     }//onDraw
 
     Handler mHandler = new Handler() {
      public void handleMessage(Message msg) {
       invalidate();
       mHandler.sendEmptyMessageDelayed(0, 10);
      }
     };//Handler
 
     public boolean onTouchEvent(MotionEvent event) {
      if(event.getAction() == MotionEvent.ACTION_DOWN) {
       Touch_X = (int) event.getX();
       Touch_Y = (int) event.getY();
 
       Angle = (int) getDegreeFromCartesian(Touch_X, Touch_Y, Current_X, Current_Y);
      }
 
      return true;
     }//Touch
 
     private double getDegreeFromCartesian(float nowX, float nowY, float centerX, float centerY){
      double nowRadian = 0.0;
      int nowDegree = 0;
 
      if(nowX - centerX > 0) {
       nowRadian = Math.atan((nowY-centerY)/(nowX-centerX)) + Math.PI/2;
      } else if(nowX - centerX < 0){
       nowRadian = Math.atan((nowY-centerY)/(nowX-centerX)) + Math.PI/2*3;
      }
      nowDegree = (int) Math.toDegrees(nowRadian);
 
      return nowDegree;
     }//getDegreeFromCartesian
    }//GameView
}//Activity

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

SC20110817-163225SC20110817-163230SC20110817-163234  

1
2

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

SC20110826-183818  

 
package com.gpsnmaptest;

shadow 發表在 痞客邦 PIXNET 留言(1) 人氣()

device-2011-07-01-195158  

<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:required="true" android:name="com.google.android.maps"></uses-library> 

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

Geocoder geoCoder = new Geocoder( this, Locale.KOREAN);
     try { 
List<Address> addresses = geoCoder.getFromLocation(location.getLatitude(), location.getLongitude(), 5);

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

String strMessage = "消息";
 
String strURL = "https://market.android.com/details?id=包名稱";

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

Core Location is a powerful yet simple iOS framework allowing easy access to the iPhone’s GPS. You can access the coordinates of the device with GPS or cell triangulation, compass, and direction and speed of travel.

Apple’s description:

The Core Location framework lets you determine the current location or heading associated with a device. The framework uses the available hardware to determine the user’s position and heading. You use the classes and protocols in this framework to configure and schedule the delivery of location and heading events. You can also use it to define geographic regions and monitor when the user crosses the boundaries of those regions.

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

AndroidManifest.xml  
 <permission android:name="org.cocos2dx.Baedal.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="org.cocos2dx.Baedal.permission.C2D_MESSAGE"/>

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

一、通過動畫實現
定義res/anim/loading.xml如下:
<?xml version="1.0" encoding="UTF-8"?>

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

讀取Android系統的通訊錄時一般會先讀取連絡人然後再讀取其號碼,嵌套迴圈讀取。如果通訊錄人數不多速度尚可,但是通訊錄裡有1-2百人恐怕就比較慢了,如果硬體再差點體驗就更差了。可以使用

 

ContactsContract.CommonDataKinds.Phone.CONTENT_URI(對 應contacts2.db的資料視圖view_data_restricted)視圖來讀取避免嵌套讀取,而對於 PhoneLookup.CONTENT_FILTER_URI確不能直接使用,這裡分享一下小技巧。

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

 

DSC06421

在康是美買的紫雲膏,一盒要價280元新台幣

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

function test(){

$('<form/>').attr({method:"GET",action:"/blabla.do"}).submit();

}

shadow 發表在 痞客邦 PIXNET 留言(0) 人氣()

1 2345