2012-03-21 4 views
1

Android에서 새로운 기능입니다. 멀티 캐스팅에 대한 프로젝트를 진행 중입니다. 이제 마커에서 탭하면 맵에 표시 할 풍선이 필요합니다. 대화 상자가 필요하지 않습니다. 버튼과 텍스트 뷰가있는 풍선보기가 필요합니다. 먼저 텍스트 뷰를 표시하고 싶습니다.이 코드로 무엇을하는지 알지 못합니다. 여러 번 시도했습니다.하지만 아무 생각이 들지 않습니다. HTTP : //www.actionshrimp errors.Is LayoutInflator 내가 여관이 사이트에 언급 된 코드의 onCreate.Most 부분 만 정의와마커를 탭하면 거품을 표시하는 방법

다음
  protected boolean onTap(int index) 
      { 
    System.out.println("Tapped"); 

    //To display the bubble for robots: 
    //LayoutInflater inflater = this.getLayoutInflater(); 
    //bubble_view = (LinearLayout) inflater.inflate(R.layout.window_view, bubble_view); 

TextView venueName = (TextView) bubble_view.findViewById(R.id.name1); 
    venueName.setText("Hello SK"); 

    GeoPoint rPoint = null; 
MapView.LayoutParams params = new MapView.LayoutParams(
     LayoutParams.WRAP_CONTENT, 200, 
      rPoint, MapView.LayoutParams.BOTTOM_CENTER); 

      bubble_view.setLayoutParams(params); 
      System.out.println("sgdhgsetlumstmwejfsd"); 
    map.addView(bubble_view); 

        Runnable r = new Runnable() { 
      public void run() { 

       bubble_view.setVisibility(View.VISIBLE);  
       } 
     }; 
      //Projection projection = ((MapView) map).getProjection(); 
     //Point p = new Point(); 

     //projection.toPixels(rPoint, p); 
     //p.offset(0, -(bubble_view.getMeasuredHeight()/2)); 
     //GeoPoint target = projection.fromPixels(p.x, p.y); 

     //mapController = ((MapView) map).getController(); 
     //mapController.setZoom(16); 


     //mapController.animateTo(target, r); 

    //Toast.makeText(mContext,"Device Name: "+index,Toast.LENGTH_SHORT).show(); 
    //return bubble_view != null; 
    return true; 
} 



private LayoutInflater getLayoutInflater() { 
    // TODO Auto-generated method stub 
    return null; 
} 
    } 

내 code.It이 있습니다 : 이것은 내 ONTAP 코드입니다. co.kr/tag/android-2/

정확 하 게 작성해주세요.

답변